2023-09-11 20:21:40 +00:00
# Install and run a Veilid Node
2023-08-02 02:37:38 +00:00
## Server Grade Headless Nodes
2023-08-18 21:33:58 +00:00
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.
2023-09-12 14:19:14 +00:00
## Install
2023-08-18 13:34:58 +00:00
2023-09-12 14:19:14 +00:00
### Debian
Follow the steps here to add the repo to a Debian based system and install Veilid.
2023-08-18 21:33:58 +00:00
2023-09-12 13:43:09 +00:00
**Step 1**: Add the GPG keys to your operating systems keyring.
2023-08-18 13:34:58 +00:00
*Explanation*: The `wget` command downloads the public key, and the `sudo gpg` command adds the public key to the keyring.
2023-09-12 13:43:09 +00:00
2023-08-18 21:33:58 +00:00
```shell
2023-08-02 02:37:38 +00:00
wget -O- https://packages.veilid.net/gpg/veilid-packages-key.public | sudo gpg --dearmor -o /usr/share/keyrings/veilid-packages-keyring.gpg
```
2023-09-12 13:43:09 +00:00
2023-09-12 14:19:14 +00:00
**Step 2**: Identify your architecture< br / >
2023-08-18 13:34:58 +00:00
*Explanation*: The following command will tell you what type of CPU your system is running
2023-09-12 13:43:09 +00:00
2023-08-18 13:34:58 +00:00
```shell
dpkg --print-architecture
```
2023-09-12 14:19:14 +00:00
**Step 3**: Add Veilid to your list of available software.< br / >
*Explanation*: Use the result of your command in **Step 2** and run **one** of the following:
2023-08-18 13:34:58 +00:00
- For **AMD64** based systems run this command:
2023-09-12 13:43:09 +00:00
2023-09-12 14:19:14 +00:00
```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
```
2023-09-12 13:43:09 +00:00
2023-08-18 13:34:58 +00:00
- For **ARM64** based systems run this command:
2023-09-12 13:43:09 +00:00
2023-09-12 14:19:14 +00:00
```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
```
2023-09-12 13:43:09 +00:00
2023-08-18 13:34:58 +00:00
*Explanation*:
2023-08-18 21:33:58 +00:00
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.
2023-08-18 13:34:58 +00:00
2023-09-12 14:19:14 +00:00
**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.
2023-09-12 13:43:09 +00:00
2023-08-02 02:37:38 +00:00
```shell
2023-08-24 17:41:35 +00:00
sudo apt update
2023-08-02 02:37:38 +00:00
```
2023-08-18 13:34:58 +00:00
2023-09-12 13:43:09 +00:00
**Step 5**: Install Veilid.
2023-08-02 02:37:38 +00:00
```shell
2023-08-24 17:41:35 +00:00
sudo apt install veilid-server veilid-cli
2023-08-02 02:37:38 +00:00
```
2023-08-18 13:34:58 +00:00
2023-09-12 14:19:14 +00:00
### RPM-based
Follow the steps here to add the repo to
RPM-based systems (CentOS, Rocky Linux, AlmaLinux, Fedora, etc.)
and install Veilid.
2023-09-12 13:43:09 +00:00
**Step 1**: Add Veilid to your list of available software.
2023-08-02 02:37:38 +00:00
```shell
2023-09-12 14:19:14 +00:00
sudo yum-config-manager --add-repo https://packages.veilid.net/rpm/veilid-rpm-repo.repo
```
**Step 2**: Install Veilid.
```shell
sudo dnf install veilid-server veilid-cli
2023-08-02 02:37:38 +00:00
```
2023-09-12 13:43:09 +00:00
2023-09-11 20:21:40 +00:00
## Start headless node
To start a headless Veilid node, run as root:
2023-09-12 13:43:09 +00:00
2023-08-02 02:37:38 +00:00
```shell
2023-09-11 20:21:40 +00:00
systemctl start veilid-server.service
2023-08-02 02:37:38 +00:00
```
2023-09-11 20:21:40 +00:00
To have your Veilid node start at boot:
```shell
systemctl enable --now veilid-server.service
```
> **Not recommended:**
> In cases where you must run `veilid-server`
> without `systemd` (e.g., systems that use OpenRC, or containers),
> you _must_ run the `veilid-server`
> as the `veilid` user.
> Do this manually by running as root:
>
> ```shell
> # Force-allow login by setting shell
> usermod -s /bin/bash veilid
> # Run veilid-server as veilid user
> # Note that by default, veilid user is still passwordless.
> sudo -u veilid veilid-server
> ```