Sovran_SystemsOS/DIY Install Sovran_SystemsOS.md

252 lines
12 KiB
Markdown
Raw Normal View History

2024-09-12 13:34:39 -07:00
# Sovran Systems offers limited support of a DIY install of Sovran_SystemsOS. You can reach out to others in the matrix room https://matrix.to/#/#DIY_Sovran_SystemsOS:anarchyislove.xyz.
2024-09-12 13:36:32 -07:00
# These instructions will change over time due to new software development and Sovran Systems creator finding more efficient ways to install Sovran_SystemsOS. 9-12-2024
# Also, to fully complete the install, the Bitcoin blockchain will have to download. This could take up to 3 weeks.
# Lastly, if you gift to the computer movement <https://zaps.sovransystems.com> to receive a Sovran Pro, you do not have to do any of this. It is all done for you. On top of that, the Bitcoin blockchain is already installed. 😉
### Requirements
2024-09-13 19:17:04 -07:00
1. First computer with Linux OS already installed (like NixOS, Ubuntu, Arch, etc.) to download and burn the NixOS image to a USB thumb drive.
2. USB thumb drive 16GB or larger
2024-09-13 19:17:04 -07:00
3. Second computer that is ready to have Sovran_SystemsOS installed (Safe Boot turned off in the UEFI[BIOS] and be prepared for the entire storage drive to be ERASED!).
4. Second computer needs the following hardware specs:
- Intel or AMD processor (NO ARM processors)
2024-09-12 13:34:39 -07:00
- 32GB of RAM or Larger
- First main NVME internal drive to install Sovran_SystemsOS (500GB or larger)
- Second NVME internal drive to store the Bitcoin blockchain and the automatic backups (NVME 4TB or larger)
2024-09-12 13:51:38 -07:00
- Also, the second NVME internal drive needs to be installed FIRST into a USB enclosure. You will need a NVME USB enclosure. The USB enclosure will be plugged into the first Linux machine.
2024-09-13 19:17:04 -07:00
5. Working Internet connection for both computers
2024-09-12 13:34:39 -07:00
6. Personalized Domain names already purchased from Njal.la. See the explanation here: https://sovransystems.com/how-to-setup/
7. Your Router with ports open (Port Forwarding) to your second machine's internal IP address. This will usually be `192.168.1.(some number)` You will complete this at the end.
- Port 80
- Port 443
- Port 22
- Port 5349
- Port 8448
## Preparing the Second Internal Drive
2024-09-13 19:17:04 -07:00
1. Install the second NVME internal drive into the USB enclosure, NOT into the Second computer yet.
2. Plug in the USB enclosure into the first computer with Linux OS already installed into one of its available USB ports.
3. **Please Make Sure You Know The Existing Storage Names On This First Linux Computer. If You Run The Script Below And You Do Not Know What You Are Doing, You Could Potentially Erase Your First Linux Computer's Data. I Am Not Responsibly For Your Errors**
4. Open a terminal in the first Linux computer and log in as root.
2024-09-12 13:44:32 -07:00
5. Type in or copy and paste:
```bash
wget https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/for_new_sovran_pros/sdpsp.sh
```
then press enter.
2024-09-12 13:50:19 -07:00
6. Now, type `bash sdpsp.sh` then press enter.
2024-09-13 19:17:04 -07:00
7. Then the screen will ask for "what block..." which will be the drive in the list that is not mounted, which will be the drive you just plugged in. It might be labeled `sda`, or `sdb` etc. Type in the drive name and press `enter`.
8. Then the screen will ask for "what partition...,"which will be whatever you typed into the first prompt, but with a "1" on it. For example, `sda1` or `sdb1`. Type it into the terminal and press `enter`.
2024-09-12 13:50:19 -07:00
9. Since the script is made to copy the blockchain from another Sovran Pro that already has the full blockchain installed it will throw an error. However, it should complete the setup just fine.
2024-09-13 19:17:04 -07:00
10. Once complete, remove the second drive from the USB enclosure and install it into your second computer in which you are installing Sovran_SystemsOS.
## Preparing the First Main Internal Drive
### Procedure One - Installing base NixOS
2024-09-13 19:17:04 -07:00
1. Still on the first computer with Linux OS already installed, download the latest NixOS <u>minimal</u> (64-bit Intel/AMD) image from here: https://nixos.org/download
2. Burn that ISO image onto the USB thumb drive.
2024-09-13 19:17:04 -07:00
3. Insert the newly created USB thumb drive with the ISO image into the second computer (the one you are installing Sovran_SystemsOS).
4. Reboot the second computer while the USB thumb drive is inserted and boot into the USB thumb drive. This may require you to press the F7 or F12 key at boot. (Also, make sure the second computer has "safe boot" turned off in the UEFI[BIOS]).
5. Proceed with the NixOS boot menu
6. Once at the command prompt type in `sudo su` to move to the root user
7. Once logged into the root user type in `passwd` then set the root user password to `a`
8. Type in `ip a` to get your internal IP address. It will usually be `192.1681.1.(somenumber)` make a note of this IP as you will need it later.
9. Now, that you are logged in as the root user type in or copy and paste:
2024-02-01 22:17:38 -08:00
```bash
2024-09-12 13:34:39 -07:00
curl https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/for_new_sovran_pros/psp_physical_ram.sh -o psp_physical_ram.sh
```
2024-02-01 22:17:38 -08:00
the command to install the base NixOS and press enter.
2024-09-13 19:17:04 -07:00
10. Now, type `bash psp_physical_ram.sh` then press enter.
2024-09-14 10:14:39 -07:00
11. The script will ask for name of first main internal drive. It usually will be `nvme0n1`. Basically, it will be the drive without any data and it will not be mounted per the list on the screen. Type in the name and press enter on the keyboard.
12. Then the script will ask for the 'Boot' partition. It will be the SMALLER partition and usually named `nvme0n1p1`. Type in the name and press enter on the keyboard.
13. Then it will ask for the 'Primary' partition. It will be the LARGER partition usually named `nvme0n1p2`. Type in the name and press enter on the keyboard.
2024-09-12 13:34:39 -07:00
14. The script will finish installing the base NixOS. At the end it will ask for a root password. Type `a` and press enter and type `a` again to confirm and press enter.
2024-09-13 19:17:04 -07:00
15. The machine will reboot into a very basic install of NixOS command prompt.
16. Remove the USB thumb drive from the second computer.
2024-09-13 19:17:04 -07:00
2024-09-13 19:23:34 -07:00
### Procedure Two - Opening The Ports on Your Router - Internal IP
2024-09-13 19:17:04 -07:00
1. Go to port forwarding on your router and open the above mentioned ports to the internal IP (the one you found above) of your new Sovran_SystemsOS machine
2024-09-13 19:23:34 -07:00
### Procedure Three - Installing Sovran_SystemsOS
2024-09-13 19:23:34 -07:00
1. Now at the basic install of NixOS from Procedure One, type `root` to log into root and type the password `a` when asked then press enter.
2. Now you are logged in as `root`.
3. Now type in or copy and paste:
2024-02-01 22:17:38 -08:00
```bash
wget https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS/raw/branch/main/for_new_sovran_pros/sp.sh
```
then press enter.
4. Type in `bash sp.sh` then press enter.
5. Next the script will ask for your domain names from Njal.la. Type them in the corresponding prompts and then press enter for each prompt.
6. Then it will ask for an email for the SSL certificates. Type it in and press enter.
7. The script is long so it will take some time.
2024-09-13 15:18:00 -07:00
8. It will finish by stating `All Finished! Please Reboot then Enjoy your New Sovran Pro!`
2024-09-13 19:17:04 -07:00
9. Press the power button on the machine for it to turn off THEN press it again to power the machine
## Finishing the Install
2024-09-12 14:34:51 -07:00
### Putting the External IP of your New DIY Sovran Pro into your new domain names you just bought at [njal.la](https://njal.la)
2024-09-13 19:23:34 -07:00
1. On your New DIY Sovran Pro, log into your [njal.la](https://njal.la) account
2. Make a "dynamic" record for each subdomain
2024-09-12 14:09:00 -07:00
3. Njal.la will now display a `curl` command for each sub-domain.
4. Open the `Terminal` on your New DIY Sovran Pro and type in or copy and paste:
2024-09-12 14:05:51 -07:00
2024-09-12 14:12:20 -07:00
```bash
ssh root@localhost
```
It will as you for a password which is `gosovransystems` as this is the default temporary password from Sovran Systems.
2024-09-12 14:34:51 -07:00
2024-09-12 14:12:20 -07:00
Now you will be logged in as root.
2024-09-12 14:05:51 -07:00
2024-09-12 14:16:23 -07:00
5. Now type:
2024-09-12 14:05:51 -07:00
2024-09-12 14:09:00 -07:00
`nano /var/lib/njalla/njalla.sh`
2024-09-12 14:05:51 -07:00
2024-09-12 14:12:20 -07:00
and press enter.
2024-09-12 14:05:51 -07:00
2024-09-12 14:16:23 -07:00
3. Paste the `curl` commands from njal.la's website for each sub-domain. Each `curl` command gets a new line. For example:
2024-02-01 22:23:07 -08:00
2024-02-04 08:48:27 -08:00
```bash
2024-09-13 19:17:04 -07:00
...
2024-02-04 08:48:27 -08:00
curl "https://njal.la/update/?h=test.testsovransystems.com&k=8n7vk3afj-jkyg37&a=${IP}"
2024-09-12 14:16:23 -07:00
curl "https://njal.la/update/?h=zap.testsovransystems.com&k=8no*73afj-jkygi2ea=${IP}"
2024-09-13 19:17:04 -07:00
...
2024-02-04 08:48:27 -08:00
```
2024-09-12 14:12:20 -07:00
##### Make sure the default `&auto` from njal.la is replaced by `&a=${IP}` at the end of each `curl` command in the `/var/lib/njalla/njalla.sh` as in the example above.
2024-09-12 14:05:51 -07:00
7. After you have added all the sub-domins into `/var/lib/njalla/njalla.sh`, press `ctrl + s` then press `ctrl + x` to save and exit `nano`.
2024-09-12 14:24:29 -07:00
8. Close the `Terminal`.
### Setting the Desktop
2024-09-13 19:17:04 -07:00
1. Open the `Terminal` again and type in: `dconf load / < /home/free/Downloads/Sovran_SystemsOS-Desktop`. Do NOT log in as root.
2024-09-12 14:24:29 -07:00
2. Close the `Terminal`.
### Setting Up Nextcloud and Wordpress
2024-02-04 08:48:27 -08:00
#### Nextcloud
2024-02-01 22:17:38 -08:00
1. Open a web browser and navigate to your domain name you bought from [njal.la](https://njal.la) for example "cloud.myfreedomsite.com" you attributed to your Nextcloud instance.
2. Nextcloud will as you to set up a new account to be used as a log in. Do so.
3. Nextcloud will also ask you where you want the data directory. Type in `/var/lib/nextcloud/data`
4. Nextcloud will ask you to connect the database:
1. Choose `Postgresql` from the optoins.
2. Database username is `ncusr`
3. Database name is `nextclouddb`
4. Database password is found by doing this:
2024-09-12 14:34:51 -07:00
1. Open the `Terminal` again, then type in or copy and paste:
2024-02-01 22:17:38 -08:00
```bash
ssh root@localhost
```
Now you will be logged in as root.
2024-09-12 14:34:51 -07:00
2. Now type:
2024-02-01 22:17:38 -08:00
`cat /var/lib/secrets/nextclouddb`
2024-02-01 22:17:38 -08:00
and press enter.
2024-09-12 14:34:51 -07:00
3. Your database password will be displayed in the `Terminal` window.
2024-02-01 22:17:38 -08:00
4. Type that into the password field
2024-09-12 14:24:29 -07:00
2024-09-12 14:34:51 -07:00
5. Now, press `Install` on the Nextcloud website and Nextcloud will be installed. It will take a few minutes. Follow the on screen prompts.
#### Wordpress
1. Open a web browser and navigate to your domain name you bought from [njal.la](https://njal.la) for example "myfreedomsite.com" you attributed to your Wordpress instance.
2. Wordpress will ask you to connect the database:
1. Database username is `wpusr`
2. Database name is `wordpressdb`
2024-09-12 14:34:51 -07:00
4. Database password is found by doing this:
1. Open the `Terminal` again, then type in or copy and paste:
```bash
ssh root@localhost
```
Now you will be logged in as root.
2. Now type:
`cat /var/lib/secrets/wordpressdb`
and press enter.
2024-09-12 14:34:51 -07:00
3. Your database password will be displayed in the `Terminal` window.
4. Type that into the password field
2024-09-12 14:24:29 -07:00
2024-09-12 14:34:51 -07:00
5. Now, press `Install` on the Wordpress website and Wordpress will be installed. It will take a few minutes. Follow the on screen prompts.
2024-09-13 19:23:34 -07:00
### Final Install for Coturn, Flatpak, and Nextcloud
2024-09-12 14:24:29 -07:00
1. Staying in the `Terminal` type in or copy and paste:
2024-09-12 14:24:29 -07:00
```bash
sed -i '$e cat /var/lib/nextcloudaddition/nextcloudaddition' /var/lib/www/nextcloud/config/config.php
2024-09-12 14:24:29 -07:00
chown caddy:php /var/lib/www -R
2024-09-12 14:34:51 -07:00
chmod 700 /var/lib/www R
2024-09-12 14:24:29 -07:00
```
and press enter.
2024-09-12 14:24:29 -07:00
2. Now type or copy and paste:
2024-09-12 14:24:29 -07:00
```bash
set DOMAIN $(cat /var/lib/domains/matrix) && cp -n /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/{$DOMAIN}/{$DOMAIN}.crt /var/lib/coturn/{$DOMAIN}.crt.pem && cp -n /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/{$DOMAIN}/{$DOMAIN}.key /var/lib/coturn/{$DOMAIN}.key.pem && chown turnserver:turnserver /var/lib/coturn -R && chmod 770 /var/lib/coturn -R && systemctl restart coturn
```
2024-09-12 14:36:34 -07:00
and press enter.
2024-09-13 15:18:00 -07:00
3. Now type or copy and paste:
```bash
sudo -u free flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
```
and press enter.
2024-09-13 19:25:26 -07:00
It will ask for your `Administrator` password and to get the password open a new `Terminal` window and type:
2024-09-13 19:17:04 -07:00
```bash
ssh root@localhost
```
press enter.
Now you will be logged in as root.
Now type:
```bash
cat /var/lib/secrets/main
```
Then the `Administrator`'s password will be displayed. Copy and paste the password into the other `Terminal` window that is open. Then press enter.
Now you can close the `Terminal`.
2024-02-01 22:31:36 -08:00
### Everything now will be installed regarding Sovran_SystemsOS. The remaining setup will be only for the front-end user account creations for BTCpayserver, Vaultwarden, connecting the node to Sparrow wallet and Bisq.
2024-09-12 13:34:39 -07:00
### Congratulations! 🎉