Merge branch '253-clarify-install-instructions' into 'main'

[#253] clean up INSTALL.md and add instructions to run veilid-server

See merge request veilid/veilid!184
This commit is contained in:
TC 2023-09-15 21:20:20 +00:00
commit 5d3932f19a

View File

@ -1,71 +1,99 @@
# Install a Veilid Node # Install and run a Veilid Node
## Server Grade Headless Nodes ## Server Grade Headless Nodes
These network support nodes are heavier than the node a user would establish on their phone in the form of a chat or social media application. A cloud based virtual private server (VPS), such as Digital Ocean Droplets or AWS EC2, with high bandwidth, processing resources, and uptime availability is crucial for building the fast, secure, and private routing that Veilid is built to provide. These network support nodes are heavier than the node a user would establish on their phone in the form of a chat or social media application. A cloud based virtual private server (VPS), such as Digital Ocean Droplets or AWS EC2, with high bandwidth, processing resources, and uptime availability is crucial for building the fast, secure, and private routing that Veilid is built to provide.
### Add the repo to a Debian based system and install a Veilid node ## Install
This is a multi-step process. ### Debian
**Step 1**: Add the GPG keys to your operating systems keyring. Follow the steps here to add the repo to a Debian based system and install Veilid.
**Step 1**: Add the GPG keys to your operating systems keyring.<br />
*Explanation*: The `wget` command downloads the public key, and the `sudo gpg` command adds the public key to the keyring. *Explanation*: The `wget` command downloads the public key, and the `sudo gpg` command adds the public key to the keyring.
```shell ```shell
wget -O- https://packages.veilid.net/gpg/veilid-packages-key.public | sudo gpg --dearmor -o /usr/share/keyrings/veilid-packages-keyring.gpg wget -O- https://packages.veilid.net/gpg/veilid-packages-key.public | sudo gpg --dearmor -o /usr/share/keyrings/veilid-packages-keyring.gpg
``` ```
**Step 2**: Identify your architecture **Step 2**: Identify your architecture<br />
*Explanation*: The following command will tell you what type of CPU your system is running *Explanation*: The following command will tell you what type of CPU your system is running
```shell ```shell
dpkg --print-architecture dpkg --print-architecture
``` ```
**Step 3**: Add Veilid to your list of available software. **Step 3**: Add Veilid to your list of available software.<br />
*Explanation*: Using the command in **Step 2** you will need to run **one** of the following: *Explanation*: Use the result of your command in **Step 2** and run **one** of the following:
- For **AMD64** based systems run this command: - For **AMD64** based systems run this command:
```shell ```shell
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null echo "deb [arch=amd64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null
``` ```
- For **ARM64** based systems run this command: - For **ARM64** based systems run this command:
```shell ```shell
echo "deb [arch=arm64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null echo "deb [arch=arm64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null
``` ```
*Explanation*: *Explanation*:
Each of the above commands will create a new file called `veilid.list` in the `/etc/apt/sources.list.d/`. This file contains instructions that tell the operating system where to download Veilid. Each of the above commands will create a new file called `veilid.list` in the `/etc/apt/sources.list.d/`. This file contains instructions that tell the operating system where to download Veilid.
**Step 4**: Refresh the package manager. **Step 4**: Refresh the package manager.<br />
*Explanation*: This tells the `apt` package manager to rebuild the list of available software using the files in `/etc/apt/sources.list.d/` directory. This is invoked with "sudo" to grant superuser permission to make the changes. *Explanation*: This tells the `apt` package manager to rebuild the list of available software using the files in `/etc/apt/sources.list.d/` directory.
```shell ```shell
sudo apt update sudo apt update
``` ```
**Step 5**: Install Veilid. **Step 5**: Install Veilid.
*Explanation*: With the package manager updated, it is now possible to install Veilid! This is invoked with "sudo" to grant superuser permission to make the changes.
```shell ```shell
sudo apt install veilid-server veilid-cli sudo apt install veilid-server veilid-cli
``` ```
### Add the repo to a Fedora based system and install a Veilid node ### RPM-based
Follow the steps here to add the repo to
RPM-based systems (CentOS, Rocky Linux, AlmaLinux, Fedora, etc.)
and install Veilid.
**Step 1**: Add Veilid to your list of available software. **Step 1**: Add Veilid to your list of available software.
*Explanation*: With the package manager updated, it is now possible to install Veilid!
```shell ```shell
yum-config-manager --add-repo https://packages.veilid.net/rpm/veilid-rpm-repo.repo sudo yum-config-manager --add-repo https://packages.veilid.net/rpm/veilid-rpm-repo.repo
``` ```
**Step 2**: Install Veilid. **Step 2**: Install Veilid.
*Explanation*: With the package manager updated, it is now possible to install Veilid!
```shell ```shell
dnf install veilid-server veilid-cli sudo dnf install veilid-server veilid-cli
```
## Start headless node
### With systemd
To start a headless Veilid node, run:
```shell
sudo systemctl start veilid-server.service
```
To have your headless Veilid node start at boot:
```shell
sudo systemctl enable --now veilid-server.service
```
### Without systemd
`veilid-server` must be run as the `veilid` user.
To start your headless Veilid node without systemd, run:
```shell
sudo -u veilid veilid-server
``` ```