What this covers
How to get the Levelrail control plane (levelrail) running on a Linux host, confirm it works, and upgrade or remove it later. The node agent is levelrail-agent, and levelrail-cli is the client. All three are static Go binaries.
Want only the CLI, to control an instance from your laptop? Jump to Installing just the CLI. install.sh sets up the server, not a remote client.
install.sh
Recommended. One command provisions Docker, a systemd unit, and the control plane on a real Linux server.
Docker
Already running everything else as containers? Pull the published images instead.
Build from source
For contributors, unreleased commits, or trying Levelrail locally without a server.
Requirements
Confirm these before you provision a server.No official minimum has been benchmarked or published (see the roadmap). The sizes above are a starting point, not a hard requirement. The control plane itself checks no minimum.
install.sh preflight checks: root, architecture, OS, systemd, curl, Docker version, RAM, free disk and ports 80/443/8080. It stops on a failed check unless you pass --force. RAM below 1 GB only warns (LEVELRAIL_MIN_RAM_MB); free disk below 10 GB on the data directory’s filesystem fails (LEVELRAIL_MIN_DISK_GB).
After install: levelrail-cli doctor (GET /api/v1/system/doctor) checks Docker reachability, free disk (warns below 1 GiB by default), data-directory writability, and that ports 80/443 are free to bind. It checks no memory or CPU floor. If a port is blocked, see Domains and ingress: firewall.
Dashboard port 8080
Right after the install, the dashboard answers on port 8080 over plain HTTP, on every interface. Treat it as an admin-only port.-
What the installer opens. Nothing, unless you set
LEVELRAIL_CONFIGURE_UFW=1. Then it allows SSH, 80/tcp, 443/tcp and 443/udp in ufw. It does not open 8080, so under ufw the direct address times out until you open the port yourself. -
Recommended: an SSH tunnel. It works with only SSH, 80 and 443 open, and exposes nothing else. The installer prints the same command.
Leave it running and open
http://localhost:8080/login#setup=<token>. - Alternative: open 8080 to your own IP only. Add one inbound rule in the cloud firewall or security group (and in the host firewall if one is active) with your address as the source. Remove it once HTTPS is on. Per-provider steps are in Install on a cloud VM.
-
After HTTPS is on. Once the dashboard URL is
https://, sign-in over plain HTTP is refused, includinglevelrail-cli login --code. Use the https address from then on and close 8080. - If 8080 was taken, the installer picks the next free port and prints it. Use the port from your output everywhere this page says 8080.
Option 1: install.sh (recommended)
- Runs the preflight table and stops on a failed check (
--forcecontinues anyway). - Installs Docker via
get.docker.comif missing. - Downloads the newest release for
linux/amd64orlinux/arm64and verifies its SHA-256 checksum. - Installs
levelrail-clito/usr/local/binfrom the same release (skip withLEVELRAIL_INSTALL_CLI=0). - Writes a
levelrail.servicesystemd unit, starts it, and waits forGET /healthz. - Checks that ports 80 and 443 answer on the server’s public IP, and prints the
ufw/firewalldcommands to open them if not. - Prints the dashboard URL, the one-time setup token for the first admin, and a reminder to back up
<data dir>/master.key.
--profile minimal|standard|suite to choose how much starts (default standard); see Server profiles.
Pass --domain HOST --email ADDRESS to turn on HTTPS once the install is healthy. The installer checks that HOST resolves to this server and that ports 80 and 443 answer from outside, then enables HTTPS with a Let’s Encrypt staging certificate and prints the command that switches to the trusted one. If any check fails it prints what failed and the exact command to run later; the install itself still succeeds, and nothing is retried. When ports 80 and 443 are blocked, it also prints the firewall rules for your cloud provider (the same as levelrail-cli doctor cloud).
Pass --runtime auto|docker|podman|existing (or set LEVELRAIL_RUNTIME) to choose the container runtime (default auto); see Container runtimes.
If the install fails
If the install fails
A missing
checksums.txt is a hard failure unless you set LEVELRAIL_SKIP_CHECKSUM=1. The installer picks the newest stable release; choose explicitly with LEVELRAIL_CHANNEL=stable|beta. A release with no binary for your architecture is skipped with a warning. Some providers never route a server’s own public IP back to itself, so treat a failed reachability test as a hint, not proof.First sign-in
1
Open the setup link
Open one of the
http://<ip>:8080/login#setup=<token> links from the install summary. The summary prints the token and these links only in an interactive terminal; in cloud-init or CI it points to setup-token instead. The public address is printed first, then private addresses. Container bridge addresses are hidden.8080 is only the default. If that port was taken, install.sh picks the next free one (LEVELRAIL_DASHBOARD_PORT) and prints the real one. Use the port from your own output.2
Create the admin account
After you create the admin account, the first-run screen opens: enable HTTPS in one click, then deploy your first app.
3
Enable HTTPS
The dashboard shows a “connection is not encrypted” banner until you enable HTTPS. Once you have an
https:// dashboard URL, sign-in over plain HTTP is refused, so switch to the https address right after. The certificate contact email defaults to your admin account email; change it if you want notices elsewhere.- Dashboard
- CLI
- Own domain
Open the Domains page and click Enable HTTPS (the email field is prefilled from your admin account). It issues a Let’s Encrypt certificate for
<dashed-ip>.sslip.io, no DNS needed. That hostname is a test address: it works only while your resolver answers for sslip.io, so use your own domain for production. See Domains and ingress.Lost the setup token or the dashboard port?
Lost the setup token or the dashboard port?
Print the token again on the server. The dashboard port is also in the unit file:
Create the admin without the setup token
Create the admin without the setup token
Set
APP_ADMIN_USERNAME and APP_ADMIN_PASSWORD in the unit (via sudo systemctl edit levelrail) before the first start.The https URL broke and I am locked out
The https URL broke and I am locked out
Allow plain HTTP sign-in temporarily. Run
sudo systemctl edit levelrail, add the lines below, then restart:APP_EXPERIMENTAL, see experimental features.
Common scenarios
Optional environment variables
Optional environment variables
Check the server first
install.sh --check is a read-only readiness report. It changes nothing and runs without root (port owners are then only partly visible).
- Before install
- After install (CLI)
- After install (API)
sudo iptables -L INPUT -v -n --line-numbers yourself, see Host firewall), and whether the domain you give resolves to this server. It ends with the recommended mode, own ports or behind your existing proxy, and the exact command to run next. It exits non-zero when a check fails.
Server already runs a proxy
After coexist mode, Migrate on the same server covers staging your apps and moving ports 80 and 443 to Levelrail with a rollback. Coolify, Traefik, nginx or Caddy on the same box already hold ports 80 and 443, so a default install would start but never serve or issue certificates. The installer checks this before it changes anything (ss, and docker ps --filter publish=<port> to name a container and image):
--no-coexist (or LEVELRAIL_COEXIST=0) to fail preflight instead.
In coexist mode Levelrail does not own 80 and 443, so the one-click HTTPS on an sslip.io address does not work as it does on a fresh server. How certificates are issued then depends on your existing proxy, see Run behind an existing proxy.
The installer never prompts. Pass
--coexist (or LEVELRAIL_COEXIST=1) to choose the mode up front, for example to move a server whose ports are currently free:
--domain only fills in the next command, which the installer prints at the end:
sudo sh install.sh upgrade --coexist.
See Behind an existing proxy for the proxy side. Let’s Encrypt only validates on 80/443, so certificates for these domains are issued by your existing proxy, not Levelrail.
Where the installer's settings live
Where the installer's settings live
Every address the installer chooses (
APP_HTTP_ADDR, APP_INGRESS_HTTP_ADDR, APP_INGRESS_HTTPS_ADDR, and APP_PUBLIC_HOST when you set it) is written to a systemd drop-in, /etc/systemd/system/levelrail.service.d/10-install.conf, never into the main unit.install.sh upgradereads it back and does not rewrite it, so custom ports survive upgrades, including the socket-activation switch that regenerates the main unit.- Installs made before the drop-in existed are migrated on their next upgrade (ports are read from the old main unit).
- If the main unit no longer matches what the installer would write (hand edits or an older installer),
upgradewarns and, if it has to regenerate the unit, keeps a copy atlevelrail.service.pre-upgrade. - Keep your own overrides in a later-sorting drop-in such as
override.conf(systemctl edit levelrail).
Verifying release binaries
Each release publisheschecksums.txt (SHA-256 of every CLI, agent and control plane binary), a keyless cosign signature bundle for it (checksums.txt.sigstore.json), and a GitHub build provenance attestation for the binaries. Releases cut before signing was added carry no bundle.
install.sh always verifies the SHA-256 checksum and refuses to install on a mismatch. It also verifies the signature when cosign is installed and the release ships a bundle.
Signed releases only, once verified. The first time a release signature verifies on a host (by
install.sh, levelrail self-upgrade, or the dashboard upgrade), a root-owned marker is written to <data dir>/release-signature.pin. From then on auto behaves like require: a release with no signature bundle, or a host that has never been able to load the Sigstore trust data, is refused instead of falling back to checksum only. This closes the downgrade where an attacker who controls a release strips its signature, since checksums.txt comes from the same release as the binary. A fresh install, or an install of a release cut before signing, behaves as before until the first signature verifies.
levelrail self-upgrade and the dashboard upgrade verify the signature inside the server and need no cosign binary. The server downloads the Sigstore trust data once, in the background, when it starts and when a newer release appears, and keeps it under <data dir>/sigstore-tuf. Later checks, including offline ones, use that saved copy. Until the first download succeeds, Settings > Updates shows a plain “retrying automatically” note and an unpinned host falls back to checksum only. Only install.sh uses cosign, and only when it is present.
Until the pin exists, levelrail-cli doctor shows not signature verified as a warning, and Settings > Updates notes that the next upgrade verifies the signature and pins the host. There is nothing to install or run: just upgrade.
The escape hatches are explicit and never silent: APP_INSTALL_VERIFY=off (or self-upgrade --verify off) skips the signature for that one run and prints a warning that it overrides the pin, and sudo levelrail self-upgrade --unpin-signature removes the pin (logged) until the next verified signature writes it again.
cosign is installed for you
cosign is installed for you
When
cosign is not on PATH, install and upgrade download a pinned cosign release (v3.1.3, linux/amd64 or linux/arm64) from the official sigstore GitHub releases, check it against a SHA-256 pinned inside install.sh, and place it at /usr/local/bin/cosign. An existing cosign is never touched.If the download fails (offline host, blocked GitHub, wrong checksum) the installer warns and carries on with checksum-only verification. Opt out with --no-cosign or LEVELRAIL_NO_COSIGN=1.To install it on its own, for example to clear the Settings > Updates warning (this subcommand does fail loudly if it cannot install):Verify a download by hand
Verify a download by hand
Option 2: Docker
Already running everything else as containers? See Docker fordocker run and docker-compose.yml examples.
Images (both linux/amd64 and linux/arm64, multi-arch):
ghcr.io/glincker/levelrail(control plane)ghcr.io/glincker/levelrail-agent(node agent)
:latest and :vX.Y only move on a stable tag; :beta moves on every prerelease tag. :edge moves only when someone manually triggers a build against main, not on every push. Pin an exact :vX.Y.Z tag for anything you care about staying still.
Verifying image signatures
Every image is signed keylessly with cosign via GitHub Actions OIDC (no long-lived signing key). Verify a pulled image against this repository’s release workflow:levelrail-agent and any tag from the table above.
Reading SBOM and provenance
Reading SBOM and provenance
SBOM (SPDX) and provenance (SLSA) are attached as build attestations, not the older
cosign attach-sbom format, so cosign download sbom does not find them. Read them with docker buildx imagetools inspect:Option 3: build from source
The path for contributors, anyone running an unreleased commit, or trying Levelrail on a laptop without a server. See.github/CONTRIBUTING.md in the repository for branch and commit conventions and how to run the tests.
Requirements: Go 1.27 or newer, a running Docker daemon, and Node.js with npm only if you build the frontend yourself.
web/, embedded into the control plane binary at build time, so production runs no Node process. See web/README.md for the frontend commands.
:8080 by default. For a throwaway instance on your laptop, see Run it on your laptop.
Installing just the CLI
levelrail-cli is a separate, small client binary for your own laptop or a CI runner, the same shape as aws or gh: install it locally, point it at a running instance, authenticate over the network, no SSH key and no inbound port on the server. The dashboard prints these same steps under Settings, CLI access, with a copy button on each command.


1
Install the binary
- Linux
- macOS
- Homebrew
- npm
- Windows
cosign is installed) the same way install.sh does, and installs to ~/.local/bin, no root needed. For a system-wide install, run with sudo: root installs to /usr/local/bin.levelrail-cli is not found afterwards, the install folder is not on your PATH yet: open a new terminal, or add the folder yourself.2
Point it at your instance
3
Log in
- Pairing code (a person, fastest)
- Device login (a person)
- API token (CI or scripts)
levelrail-cli login --api-url ...) prints the dashboard page to approve it on and a two digit number to type there, and opens the page when a desktop browser is available.Other ways to install the CLI
Every release asset is listed in
checksums.txt, which is signed with cosign and has a build provenance attestation. Windows binaries are published from the release after v0.2.0-beta.15; before that, run the install script from WSL.
Use the CLI from npm
The CLI is published on npm aslevelrail-cli. It installs only the client. The server needs Linux, systemd and root and is installed with install.sh.
yarn dlx levelrail-cli and pnpm dlx levelrail-cli.
- Platforms: Linux, macOS and Windows, on amd64 and arm64. The launcher package pulls the matching
levelrail-cli-<os>-<arch>package as an optional dependency. There is no install script. - Provenance: packages are published from the release workflow with npm trusted publishing. Check them with
npm audit signaturesin a project that depends onlevelrail-cli. - Pin the version to your server’s version in CI so the client and the control plane stay in step.
Verifying the install
install.sh already fails loudly if the control plane is not healthy within 60 seconds (LEVELRAIL_HEALTH_WAIT). Re-check at any time:
- Unauthenticated
- Authenticated
Upgrading
To update only the CLI on your laptop, runlevelrail-cli update (or self-update). update --check --exit-code exits 10 when a newer release exists, and the old binary stays beside the new one as levelrail-cli.bak for rollback. See Updating the CLI.
Pick the path that matches how you installed. The self-update (next section) is the safest, because it restores the database as well as the binary on failure.
Check first, then upgrade
levelrail-cli upgrade (or Settings > Updates in the dashboard) runs read-only preflight checks. Nothing is applied unless you start or schedule an upgrade, or automatic upgrades fire in their nightly window (on by default until you save a policy; turn off with levelrail-cli upgrade auto set --mode off, see Upgrade safely).
The CLI also takes a fresh control plane backup unless you pass
--no-backup, then prints the exact command to run. The API is GET /api/v1/updates/preflight.
Preview the upgrade
levelrail-cli upgrade --dry-run changes nothing and prints the target version, breaking changes, the database schema move (for example database schema 3034 -> 3048 (14 migrations will run)), the fact that a database backup is taken before the swap, and the exact rollback commands. On a host where the service does not listen on localhost:8080, set APP_API_URL first (the address in APP_HTTP_ADDR of the unit); emergency-token prints the full line for you.
The one command that upgrades is levelrail-cli upgrade --apply.
Upgrade with automatic rollback
Settings > Updates > Upgrade to vX.Y.Z now (or Schedule upgrade) andlevelrail-cli upgrade --apply run the safe self-update. It:
- Downloads the release and checks its checksum and cosign signature.
- Snapshots the database.
- Tries the new release’s migrations on a copy of that snapshot.
- Swaps the binary, restarts, and waits for health.
--timeout (90 seconds by default), the previous binary and, when the schema changed, the pre-upgrade database snapshot come back automatically. Every attempt, with its step timeline, is kept on the Updates page.
Watching an upgrade
After you confirm, the Updates page switches to a live progress view: the ordered steps (check, download, verify checksum, verify signature, probe, back up, migration dry run, stop, swap, start, health check) with a spinner on the running one, elapsed time and an expandable log. The run is journaled on the server’s disk, so reloading the page or the control plane restarting mid-upgrade (up to a couple of minutes of “Reconnecting”) picks the same run back up. It ends with the new version and a release notes link, or with the step that failed, the error, and whether the previous release was restored.levelrail-cli upgrade --apply streams the same log lines to stderr while it waits, and levelrail-cli upgrade --attempts shows finished runs. If the host command cannot even start (for example the release repository cannot be resolved), the run is recorded as refused with the error text instead of silently disappearing.
sudo levelrail self-upgrade --to <version>. See Upgrade safely for the runbook and what to do when something fails.
Run the upgrade
- install.sh
- Docker
- Manual binary swap
10-install.conf drop-in, see Server already runs a proxy), systemctl edit overrides and data. It restarts the service and waits for it to come back healthy. If the new binary is not healthy within LEVELRAIL_HEALTH_WAIT seconds the previous binary is put back and started again.To pin a release instead of the latest:Older binary refuses to start
A binary older than the database exits with status 78 and prints which release last ran on the data and the exact commands to recover. The installer’s unit addsRestartPreventExitStatus=78, so systemd does not restart-loop it. Nothing is modified: migrations only go forward.
Run the release it names (LEVELRAIL_VERSION=vX.Y.Z ... install.sh upgrade) or restore a backup taken by the older release.
Rolling back
Before pending migrations run, the control plane snapshots its database aslevelrail-<timestamp>.db under the data directory’s backups folder. To go back after a bad upgrade, install the previous binary, stop the service, then:
.before-restore-<timestamp>. The master key is not part of a snapshot.
Uninstalling
- install.sh
- Docker
install.sh uninstall also removes levelrail-cli from /usr/local/bin. Remove the apps’ containers separately if needed.
Troubleshooting
Preflight checks fail and you cannot proceed
Preflight checks block the install when they find conflicting software or missing resources. See which one failed in the error output. Likely cause: the server does not meet the minimum requirements (Docker 24 or newer, ports 80/443 free, at least 1 GB RAM and 10 GB free disk). How to confirm: runcurl -fsSL https://levelrail.com/install.sh | sh -s -- --check (no root needed), which is read-only and gives detailed output for each check.
Fix: address the failed check (update Docker, free disk space, stop the process holding the port) and re-run the installer. To skip a check anyway, pass --force or set LEVELRAIL_COEXIST=1 if ports are already taken.
The control plane starts but does not answer on the port
The healthz endpoint may be unreachable even though the process is running. Likely cause: the port is in use by another process, or the process failed to bind. How to confirm: runsudo systemctl status levelrail and sudo journalctl -u levelrail -n 50 to see the startup error. Also check ss -tlnp | grep 8080 (or whatever port you set with LEVELRAIL_DASHBOARD_PORT).
Fix: if another process owns the port, either stop it or run the installer again with LEVELRAIL_DASHBOARD_PORT=<free_port>. If the unit failed to start, the journal output names the cause (permission denied, address already in use, etc.). Restart with sudo systemctl restart levelrail once fixed.
The dashboard or CLI says Docker is unreachable
The control plane cannot connect to the Docker daemon. Likely cause: Docker is not running, the socket has wrong permissions, or the socket path is not at the default/var/run/docker.sock.
How to confirm: run sudo docker ps to confirm Docker itself works, or check Settings > General > Docker status in the dashboard. Also try levelrail-cli status --json to see the full error.
Fix: start Docker with sudo systemctl start docker, fix socket permissions with sudo chmod 666 /var/run/docker.sock, or set DOCKER_HOST if the socket is at a non-standard path and re-run the control plane.
The setup link does not work or the token expired
The one-time token for the initial admin setup is either missing or no longer valid. Likely cause: the token is single-use and valid for 15 minutes, or the dashboard port changed since install. How to confirm: check the original install output for the full URL, or check Settings > Updates > Server readiness to see the current dashboard address. Fix: on the server, runsudo APP_DATA_DIR=/var/lib/levelrail-data levelrail setup-token to print a new token, then visit http://<server>:<port>/login#setup=<token> with the fresh token.
Common errors
Next step
- Getting started: sign in, enable HTTPS and deploy your first app.
- First backup in 5 minutes.