Vultr setup

Create one Ubuntu server, point a wildcard DNS record at it, then run the setup command.

1. Create the server

2. Add your SSH key

If you do not have an SSH key yet, create one locally:

ssh-keygen -t ed25519 -C "you@example.com"

Copy your public key:

cat ~/.ssh/id_ed25519.pub

In Vultr, go to Account, then SSH Keys, add the public key, and select it when creating the server.

3. Configure Vultr DNS

In the Vultr Console, go to Products, expand Network, then select DNS. Click Add Domain, enter your domain, select the Vultr instance for the default A record, then click Add.

At your domain registrar, change the domain to use Vultr's nameservers:

ns1.vultr.com
ns2.vultr.com

Open the domain in Vultr DNS, then create or confirm these A records:

A     example.com      YOUR_SERVER_IPV4
A     *.example.com    YOUR_SERVER_IPV4

For the wildcard record, choose type A, enter * in the Name field, and enter the server IPv4 address in the Data field.

After the nameserver change has propagated, this should return Vultr nameservers:

dig NS example.com +short

4. Create a Vultr DNS token

The server uses Caddy with Vultr DNS for wildcard TLS certificates.

In Vultr, go to Account, then API. Enable API access if needed, then copy your API key.

If API Access Control is enabled, allow the server's IPv4 address. Vultr API keys do not work until the calling IP is allowed.

The server installer asks for this key as the DNS API key.

5. Run server install

SSH into the server as root, then run:

curl -fsSL https://pack.sh/server.sh | sudo env PACK_DNS_PROVIDER=vultr sh

When the installer asks for the app domain, enter your apex domain, like example.com. When it asks for the DNS API key, paste the Vultr API key.

After the installer finishes, check that the deploy user works:

ssh pack@example.com

Use example.com as the deploy host during local install. The installer will save it as pack@example.com. Use example.com as the release domain.