2023-09-11 16:21:40 -04:00
# Install and run a Veilid Node
2023-08-01 22:37:38 -04:00
## Server Grade Headless Nodes
2023-08-18 17:33:58 -04: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 10:19:14 -04:00
## Install
2023-08-18 09:34:58 -04:00
2023-09-12 10:19:14 -04:00
### Debian
Follow the steps here to add the repo to a Debian based system and install Veilid.
2023-08-18 17:33:58 -04:00
2023-09-15 16:38:32 -04:00
**Step 1**: Add the GPG keys to your operating systems keyring.< br / >
2023-08-18 09:34:58 -04:00
*Explanation*: The `wget` command downloads the public key, and the `sudo gpg` command adds the public key to the keyring.
2023-09-12 09:43:09 -04:00
2023-08-18 17:33:58 -04:00
```shell
2023-08-01 22:37:38 -04: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 09:43:09 -04:00
2023-09-12 10:19:14 -04:00
**Step 2**: Identify your architecture< br / >
2023-08-18 09:34:58 -04:00
*Explanation*: The following command will tell you what type of CPU your system is running
2023-09-12 09:43:09 -04:00
2023-08-18 09:34:58 -04:00
```shell
dpkg --print-architecture
```
2023-09-12 10:19:14 -04: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 09:34:58 -04:00
2024-07-17 12:17:54 -04:00
- For *STABLE* releases
- **AMD64** based systems run this command:
2023-09-12 09:43:09 -04:00
2023-09-12 10:19:14 -04: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 09:43:09 -04:00
2024-07-17 12:17:54 -04:00
- **ARM64** based systems run this command:
2023-09-12 09:43:09 -04:00
2023-09-12 10:19:14 -04: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
```
2024-07-19 15:08:25 -04:00
2024-07-17 12:17:54 -04:00
- For *NIGHTLY* (bleeding edge) releases
- **AMD64** based systems run this command:
```shell
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt nightly main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null
```
- **ARM64** based systems run this command:
```shell
echo "deb [arch=arm64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt nightly main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null
```
2023-09-12 09:43:09 -04:00
2023-08-18 09:34:58 -04:00
*Explanation*:
2023-08-18 17:33:58 -04: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 09:34:58 -04:00
2023-09-12 10:19:14 -04: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 09:43:09 -04:00
2023-08-01 22:37:38 -04:00
```shell
2023-08-24 13:41:35 -04:00
sudo apt update
2023-08-01 22:37:38 -04:00
```
2023-08-18 09:34:58 -04:00
2023-09-12 09:43:09 -04:00
**Step 5**: Install Veilid.
2023-08-01 22:37:38 -04:00
```shell
2023-08-24 13:41:35 -04:00
sudo apt install veilid-server veilid-cli
2023-08-01 22:37:38 -04:00
```
2023-08-18 09:34:58 -04:00
2024-07-19 15:08:25 -04:00
***Step 6***: Start veilid-server.service
Go to [Start headless node ](#start-headless-node )
***Step 7***: View Node Activity
Invoke the Veilid CLI utility.
```shell
veilid-cli
```
2023-09-12 10:19:14 -04: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 09:43:09 -04:00
**Step 1**: Add Veilid to your list of available software.
2024-07-19 15:08:25 -04:00
- For *STABLE* releases
2023-08-01 22:37:38 -04:00
```shell
2024-07-19 15:08:25 -04:00
sudo dnf config-manager --add-repo https://packages.veilid.net/rpm/stable/x86_64/veilid-stable-x86_64-rpm.repo
2023-09-12 10:19:14 -04:00
```
2024-07-19 15:08:25 -04:00
- For *NIGHTLY* (bleeding edge) releases
```shell
sudo dnf config-manager --add-repo https://packages.veilid.net/rpm/nightly/x86_64/veilid-nightly-x86_64-rpm.repo
```
2023-09-12 10:19:14 -04:00
**Step 2**: Install Veilid.
```shell
sudo dnf install veilid-server veilid-cli
2023-08-01 22:37:38 -04:00
```
2023-09-12 09:43:09 -04:00
2024-07-19 15:08:25 -04:00
***Step 3***: Start veilid-server.service
Go to [Start headless node ](#start-headless-node )
***Step 4***: View Node Activity
Invoke the Veilid CLI utility.
```shell
veilid-cli
```
2024-01-02 12:16:50 -05:00
### macOS
Veilid is available [via Homebrew ](https://formulae.brew.sh/formula/veilid ).
```shell
brew install veilid
```
You can then run `veilid-server` and `veilid-cli` from the command line.
2023-09-11 16:21:40 -04:00
## Start headless node
2023-09-15 16:38:32 -04:00
### With systemd
To start a headless Veilid node, run:
2023-09-12 09:43:09 -04:00
2023-08-01 22:37:38 -04:00
```shell
2023-09-15 16:38:32 -04:00
sudo systemctl start veilid-server.service
2023-08-01 22:37:38 -04:00
```
2023-09-11 16:21:40 -04:00
2023-12-04 21:06:56 -05:00
*-OR-*
2023-09-15 16:38:32 -04:00
To have your headless Veilid node start at boot:
2023-09-11 16:21:40 -04:00
```shell
2023-09-15 16:38:32 -04:00
sudo systemctl enable --now veilid-server.service
2023-09-11 16:21:40 -04:00
```
2023-09-15 16:38:32 -04:00
### 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
```
2024-04-22 09:52:47 -04:00
2024-05-22 17:22:46 -04:00
## Network Considerations
2024-04-22 09:52:47 -04:00
2024-05-22 17:22:46 -04:00
> **note:** if you're interested in using a veilid-server node for local development, you're better off reading the [Developer Book](https://veilid.gitlab.io/developer-book/), though the implementation to enable local development using a veilid-server node is still forthcoming.
2024-06-06 05:25:56 -04:00
Veilid nodes need to be internet facing or behind a firewall that allows inbound connections via port 5150 for both TCP and UDP. This will allow veilid-server to access other nodes in the wider network since 5150 is the port that the process uses by default. If the port is not available, veilid-server will wait for it to become available.
2024-05-07 06:41:17 -04:00
2024-06-06 05:25:56 -04:00
In the event the listening port is not opened in the firewall, an application may still operate, though in a fairly degraded mode that relies on another node to relay incoming RPC messages to them.