2023-09-18 22:28:56 -04:00
# Starting a Generic/Public Veilid Bootstrap Server
2023-09-18 10:10:19 -04:00
## Instance Recommended Setup
2023-09-18 22:28:56 -04:00
2024-10-23 17:58:29 -04:00
CPU: Single< br >
RAM: 1GB< br >
Storage: 25GB< br >
IP: Static v4 & v6< br >
Firewall: 5150/TCP/UDP inbound allow all< br >
2023-09-18 10:10:19 -04:00
## Install Veilid
2023-09-18 22:28:56 -04:00
2023-09-18 10:10:19 -04:00
Follow instructions in [INSTALL.md ](./INSTALL.md )
2023-09-18 22:28:56 -04:00
## Configure Veilid as Bootstrap
### Stop the Veilid service
```shell
2023-09-21 09:24:09 -04:00
sudo systemctl stop veilid-server.service
2023-09-18 10:10:19 -04:00
```
### Setup the config
2023-09-18 22:28:56 -04:00
2023-09-18 10:10:19 -04:00
In _/etc/veilid-server/veilid-server.conf`_ ensure _bootstrap: ['bootstrap.<your.domain>']_ in the _routing_table:_ section
2023-09-18 22:28:56 -04:00
If you came here from the [dev network setup ](./dev-setup/dev-network-setup.md ) guide, this is when you set the network key.
2023-09-18 10:10:19 -04:00
**Switch to veilid user**
2023-09-18 22:28:56 -04:00
2023-09-18 10:10:19 -04:00
```shell
sudo -u veilid /bin/bash
```
### Generate a new keypair
2023-09-18 22:28:56 -04:00
2023-09-21 09:24:09 -04:00
Copy the output to secure storage such as a password manager. This information will be used in the next step and can be used for node recovery, moving to a different server, etc.
2023-09-18 22:28:56 -04:00
2023-09-18 10:10:19 -04:00
```shell
2023-11-26 11:42:08 -05:00
veilid-server --generate-key-pair VLD0
2023-09-18 10:10:19 -04:00
```
### Create new node ID and flush existing route table
2023-09-18 22:28:56 -04:00
2023-09-21 09:24:09 -04:00
Include the brackets [] when pasting the keys. Use the public key in the command. Secret key will be requested interactively and will not echo when pasted.
2023-09-18 22:28:56 -04:00
2023-09-18 10:10:19 -04:00
```shell
veilid-server --set-node-id [PUBLIC_KEY] --delete-table-store
```
2023-09-18 22:28:56 -04:00
2023-09-18 10:10:19 -04:00
### Generate the DNS TXT record
2023-09-18 22:28:56 -04:00
2023-09-21 09:24:09 -04:00
Copy the output to secure storage. This information will be use to setup DNS records.
2023-09-18 22:28:56 -04:00
2023-09-18 10:10:19 -04:00
```shell
veilid-server --dump-txt-record
```
2023-09-18 22:28:56 -04:00
### Start the Veilid service
2023-09-21 09:24:09 -04:00
Disconnect from the Veilid user and start veilid-server.service.
```shell
exit
```
2023-09-18 22:28:56 -04:00
```shell
2023-09-21 09:24:09 -04:00
sudo systemctl start veilid-server.service
2023-09-18 10:10:19 -04:00
```
2023-09-18 22:28:56 -04:00
Optionally configure the service to start at boot `sudo systemctl enable veilid-server.service`
2023-09-18 10:10:19 -04:00
_REPEAT FOR EACH BOOTSTRAP SERVER_
## Enter DNS Records
2023-09-18 22:28:56 -04:00
2023-09-18 10:10:19 -04:00
Create the following DNS Records for your domain:
(This example assumes two bootstrap serves are being created)
| Record | Value | Record Type |
|-----------|-----------------------------|-------------|
|bootstrap | 1,2 | TXT |
|1.bootstrap| IPv4 | A |
|1.bootstrap| IPv6 | AAAA |
|1.bootstrap| output of --dump-txt-record | TXT |
|2.bootstrap| IPv4 | A |
|2.bootstrap| IPv6 | AAAA |
|2.bootstrap| output of --dump-txt-record | TXT |