LanternlyDocs

Run things

Servers

Servers are the machines that run your services. Any Ubuntu 24.04 VM you can reach over SSH works, from any cloud or your own hardware.

Prepare a server

On the new VM, copy the repo's agent/ folder and run its setup as root, with the console's SSH public key (shown under Servers and printed when you set up the deployer VM):

sudo DEPLOYER_PUBLIC_KEY="ssh-ed25519 AAAA… deployer" \
     ACME_EMAIL=you@example.com \
     AGENT_ROOT=/opt/lanternly AGENT_NAMESPACE=lanternly \
     ./setup-clubs-vm.sh
VariableRequiredMeaning
DEPLOYER_PUBLIC_KEYyesThe console's SSH public key. It's added to the deployer user, locked to clubctl.
ACME_EMAILyesEmail Let's Encrypt writes to about certificates.
AGENT_ROOTnoFolder where services live. Default /opt/avrosphere.
AGENT_NAMESPACEnoPrefix of container names and labels. Default avrosphere.
GHCR_USER, GHCR_TOKENnoLets the server pull private images from ghcr.io (token with read:packages).

The script installs Docker, adds swap, starts Caddy, installs clubctl and its files, and prints the server's host key at the end. It's safe to run again; running it again is also how you update clubctl.

Pick your names on day one

AGENT_ROOT and AGENT_NAMESPACE are written to <AGENT_ROOT>/agent.conf and can't change once the server has services.

Add it to the console

Open Servers → Add existing server and fill in:

  • Name: anything that helps you recognise it, such as Frankfurt 1.
  • Address (for SSH): a host name or IP the deployer VM can reach. The user is always deployer, the one the setup made.
  • Public IP: where service domains point. Shown to people adding a custom domain.
  • Host key: the line printed at the end of the setup (ssh-ed25519 AAAA…). The console refuses to talk to a server whose key doesn't match.
  • Memory (MB): the server's RAM. With it set, new services only go on when their memory limits fit. 1 GB is kept for Caddy, the system and the database engine.
  • Most services it may hold (optional) and Takes new services: untick it to stop new services landing on a server you're emptying.

The console connects straight away and shows the server's live memory and disk on the Servers page.

Capacity

Every app, image and database has a memory limit (256 MB unless you change it). Creating a service, or giving one more memory, is refused when the memory already given out on its server would go over the server's figure. When every server is full, add another server or raise a limit.

A project lives on one server, so all of a project's services share that server's room.

Lock down SSH

Only the console needs SSH. In your provider's firewall, allow port 22 on services VMs from the deployer VM's IP only (plus your provider's browser console, if you use it). Ports 80 and 443 stay open to everyone for your services.

Updating clubctl

When a new Lanternly release changes anything under agent/, run the setup script again on each server, or run the Set up a VM workflow (target the services VM). Existing services keep running while it updates. Release notes say when this is needed.

Removing a server

Move or remove its projects and services first. Then open Edit on the server and press Delete this server's record. This only removes it from the console: delete the VM at your provider yourself.

Servers made by the AWS plugin can be deleted for real from the console, with a final snapshot.

Creating servers from the console

With the AWS plugin turned on, owners can press Create server to make a new Lightsail VM that sets itself up and joins the list in about 10 minutes. See Create a server.

Edit this page on GitHub