Reference
The layer command
Everything the panel shows, from an SSH session on the server, with the raw commands underneath.
layer talks to the same agent the panel uses. Each command is a thin wrapper, and the raw systemctl, journalctl and file paths are listed with it, so you never depend on the tool to see what's going on.
Run it as root, or with sudo.
Commands
| Command | What it does | Underneath |
|---|---|---|
layer ps |
Every app, its live color (blue or green), the state and port of both colors, and its domains. | systemctl status 'app-*@*' |
layer status <app> |
Both colors of one app: state, build, memory, restarts, since when. | systemctl status 'app-<app>@*' |
layer logs <app> [-f] [-n 100] [--color blue|green] |
The app's output; -f follows it. |
journalctl -u 'app-<app>@*' -f |
layer score <app> [--color blue|green] |
systemd's security score for the app's sandbox, from 0 (safest) to 10. | systemd-analyze security app-<app>@blue |
layer info |
The server: OS, CPU and load, memory, disk, Node versions, Caddy and the agent. | |
layer import <app> <file.tar.gz> |
Replaces the app's data/ folder with an archive from another server. SQLite files are checked first; the app is stopped and started around the swap; the replaced folder is kept next to it. |
|
layer access |
Who may open the panel: anyone, or a list of addresses. | /etc/caddy/sites/_panel.caddy |
layer access reset |
Lets everyone reach the sign-in page again, for when you've locked yourself out. | |
layer update [version] |
Updates the panel, agent and CLI from the update feed, and follows the installer's output. Apps keep running. | journalctl -u layer-update.service -f |
layer repair |
Puts back generated files that were edited or deleted by hand (units, Caddy sites, env files) and restarts what they feed. | |
layer call <action> [json] |
Sends one raw action to the agent and prints the answer, for debugging. |
Where things are
systemctl status 'app-<app>@*' # the app's two colors
journalctl -u 'app-<app>@*' -f # its output
cat /etc/caddy/sites/<app>.caddy # how Caddy routes its domains
ls -la /srv/apps/<app>/ # its builds (releases/), current, and data/
ls /etc/layer/apps/<app>/ # its env files (root-only)
systemctl list-timers 'app-<app>-cron-*' # its cron jobs
tail -f /var/log/caddy/<app>.log # its requests, as JSON
tail /var/log/layer/audit.jsonl # what the agent changed
Examples
Follow an app's output while you reproduce a bug:
layer logs myapp -f
Bring a data folder from an old server (see Moving from another server):
layer import myapp /root/myapp-data.tar.gz
Locked out after limiting the panel to an address you no longer have:
layer access reset
Check an app's sandbox:
layer score myapp