Commands

Every seawall command, generated from the code. A command marked --yes changes the host. Without --yes it prints the plan and changes nothing.

Global options

--check

Exit 1 when a report finds something (drift, lint errors, attention): for scripts. Without it, a run that worked exits 0, so shell prompts stay green

All commands

CommandDescription
tuiThe command centre: a live, tabbed view with actions (a dry run first, then y to confirm)
newA wizard for a new stack or game server: a hardened compose file, ready to create
statusOne screen of what needs attention
alertsFiring alerts, each with what was found and what to do
doctorCheck seawall's own setup: file permissions, access, coverage
factsSecurity facts for the alert rules (read-only)
acceptMark a finding as expected, so it stops alerting (written to the config)
accept listener --yesA program allowed to keep listening, by name on loopback or by address and port
accept lsThe listeners accepted, with why
accept rm --yesTake an accepted listener out, so it alerts again
imagesImage updates: check the registries, list and explain what was found (stack update takes one)
images prune --yesRemove every image no container has and no compose file names, images typed (severe)
images checkCheck every running container's image for updates and the CVEs they fix, now
images lsImages with updates, by stack, from the last check
images explainThe last check explained: what each rule would fire for, then each container
images compareThe Critical and High CVEs in OLD that NEW fixes, both scanned with Trivy
updatesAutomatic updates: what seawall may take on its own, by stack
updates planWhat the next night's run would take, per stack and candidate, and why (read-only)
aboutThe logo, the version and where seawall lives
optimiseWhat would make the host and its stacks run better, each with its fix (read-only)
init --yesSet this host up, and seawall with it
postureHow this host compares with best practice, and what to change (read-only)
notifyWhere alerts go, and whether seawall routes them (read-only)
notify test --yesSend a test to a destination through Grafana, with the secrets Grafana holds
notify link --yesAdd each alert's seawall.sh page to this host's message templates
securityWhat is exposed, who is trying it, what isn't patched or hardened, what changed (read-only)
security ctThe certificates logged for each zone seawall proxies, and what doesn't match its CAA
security ct accept --yesCount a CA's certificates for a zone as expected, until a day (in seawall.toml)
security ct accept-cert --yesOne logged certificate: its CA, crt.sh link, dates and names; accepted until it expires
configThe settings screen (like init, without the detection); --print for plain text
config set --yesChange one setting, as the settings screen does: the change, then with --yes the save
strayCompose folders no manager runs as a stack: list, ignore, bring in or move them to the trash
stray lsEach compose folder no manager runs, with its state and its three ways out
stray ignoreLeave it alone from now on (paths.ignore)
stray adopt --yesBring it in as a stack (outside the stacks folder it moves in first)
stray rm --yesMove it to seawall's trash, a verified copy kept first
jobsJobs of the last week, with state and age
jobs lsEach job of the last week, running first, then newest
jobs cancelStop a running job, or take back a queued one's confirm
jobs followFollow a job's steps until it ends
jobs showA job's plan, steps and end
verifyLook again for what the last rename or move left naming the old name
align --yesBring the host to the state seawall wants, in one plan (a dry run until --yes)
topEvery running container by CPU, with memory, network and disk I/O
hostThe machine: usage graphs, memory by stack, kernel, reboot, Docker and CrowdSec, RAID, drives, disk
host memMemory by stack and each stack's growth
host reclaimDisk space this host could get back, by category, and what removes it (read-only)
host reclaim clean --yesOne category's list, then, with its name typed, each thing on it removed
host upgrade --yesUpgrade Docker (engine, CLI, containerd, compose and buildx) and the CrowdSec bouncer
host audit-reload --yesLoad the audit rules again from their files, dropping rules loaded by hand
host rollback --yesRoll back the latest upgrade of Docker or the CrowdSec bouncer, from root's record
host fixFix what the Security tab's Hardening rows find, as root through sudo
host fix sysctl --yesSet the kernel settings CIS asks for that are off, in seawall's own sysctl.d file
host fix perms --yesMake the system files CIS finds loose root's, their modes tightened to CIS's
host fix packages --yesFinish a dpkg run left half done, and reinstall packages whose files changed
host fix apparmor --yesLoad AppArmor's profiles where it's on and enforces none
host fix sshd --yesSet the ssh settings CIS asks for that let in a password, root or rhosts
host fix lock --yesLock an account's empty password (passwd -l); a key it has still logs in
host fix expire --yesEnd an account no one uses (usermod --expiredate 1); its keys stop working too
auditseawall's audit trail: every change it made, from the system journal
audit accept --yes"That was me": accept the unattributed changes since a time, a day back at most
stackStacks, run by Portainer or Compose
stack lsEvery stack with its state, containers up, drift and pending updates
stack showOne stack in detail: containers, state, CPU, memory, network and disk (now and over time)
stack diffDiff the disk compose against what is deployed
stack saveSave the deployed compose file to its folder in paths.backups (the file only; data is db backup)
stack deploy --yesDeploy the disk compose, keeping the stack's env (backs up first)
stack update --yesMove a stack's images to newer versions found by the update check, then deploy
stack lint --yesCheck compose files against the hardening baseline
stack edit --yesEdit a stack's compose file in $EDITOR, then see what a deploy of it would do
stack envA stack's env by name, never by value; set or remove one, then deploy what runs now
stack env set --yesSet or replace one value, then deploy what runs now with it
stack env rm --yesRemove one, then deploy what runs now without it
stack secretsEnv var names set in Portainer vs used by the compose file (never values)
stack reconcile --yesMake the disk copy and the deployed compose match again, one side winning
stack harden --yesLock a stack's containers down: capabilities, privileges, admin ports
stack limits --yesSet a stack's resource limits: memory, CPU, processes, open files
stack isolate --yesTake a database off the ingress network, onto the stack's own (dry run until --yes)
stack pin --yesPin each image on a moving tag to the version that runs now (writes the disk copy)
stack run-as --yesMove a running stack onto its own user, seawall-<stack> (dry run until --yes)
stack rollback --yesRedeploy the newest backup that differs from what is deployed (or --to FILE or STAMP)
stack new --yesSet up a new stack from its folder under paths.stacks: lint, create, allowlist, map, capture
stack create --yesCreate a new stack in Portainer from a compose file (prefer stack new)
stack migrate --yesMove a running stack between Portainer and Compose, keeping its volumes
stack remove --yesRemove a stack: through its manager, then its networks, ports and routes (severe)
stack rename --yesGive a running stack a new name, copying its volumes to the new name's (severe)
stack runtime --yesMove a running stack to the rootless owner's runtime, with its data
stack findEvery stack on this host and where it lives
stack expose --yesPut a web app that publishes host ports behind the proxy
stack move --yesMove a stack that lives elsewhere into the stacks folder
stack stop --yesStop a stack (silences its container alerts first)
stack start --yesStart a stopped stack
stack logsRecent logs from a stack's containers
dbDatabase dumps that are proven to restore
db lsDatabase containers with their latest dump and whether it was restore-tested
db backup --yesDump a stack's database to its folder in paths.backups (credentials stay in the container)
db restore-test --yesLoad each database's latest dump into a throwaway container and compare it with the live database
backupData backup: each stack's volumes and folders, and the database dumps, with restic
backup setup --yesMake the repository (a local folder, S3 or SFTP) and its password (shown once)
backup run --yesBack up every stack's volumes and folders, and the database dumps
backup image --yesWhether restic's image for this version is built (--yes builds it)
backup lsEach stack's snapshots in the repository
backup restore --yesPut a stack's volumes and folders back as a snapshot has them (severe)
backup restore-test --yesThe weekly restore test now: 5% of the data read back, and one snapshot restored
backup resume --yesPut back any stack a backup that didn't finish left paused or stopped
silenceGrafana alert silences
silence lsActive and pending silences
silence add --yesSilence ContainerDown, Unhealthy or RestartLoop for containers or whole stacks
silence alert --yesSilence one alert by name (and identifying labels); never a sev0
silence rm --yesExpire silences by id
reboot-prep --yesSilence the alerts a planned reboot trips (never sev0)
portsPorts, privileged containers and firewall rules facts expects (for alerts; not a firewall)
ports lsWhat seawall facts expects, plus anything it flags now
ports add --yesExpect ports (7777/udp) or, with --privileged, container names
ports rm --yesRemove ports or, with --privileged, container names
ports checkWhat seawall facts flags now
cloudThe config repo that records the host's config
cloud statusCapture and drift results, and whether the repo is pushed
cloud init --yesMake a config repo seawall keeps: its secrets sealed to your age key, pushed with a deploy key
cloud sync --yesCover new /etc files, capture now and check drift again
cloud captureRun the capture now (commits and pushes)
cloud driftRun the drift check now: what the host has that the repo's last commit doesn't
cloud logRecent commits
restore --yesPut a host back from a config repo seawall keeps, at a commit you name
grafanaGrafana administration
grafana annotations --yesShow seawall's audit trail as annotations on the UI-managed dashboards
grafana reloadRestart Grafana to load its provisioning files
grafana rulesseawall's alert rule files changed or gone since it wrote them, or that it didn't make
grafana rules diffThe file against seawall's newer version
grafana rules take --yesTake seawall's newer version; a file there is kept in backups
grafana rules adopt --yesReplace this host's older copy of seawall's rules with its packs, the rest kept
grafana rules keep --yesKeep the file as it is; seawall offers its next version
crowdsecCrowdSec bans: list them, allowlist a player, lift a ban
crowdsec bansLocal bans (or one IP's bans and allowlist status)
crowdsec allow --yesNever ban this IP (adds it to crowdsec.allowlist) and lift its current bans
crowdsec unban --yesLift an IP's current bans (it can be banned again)
crowdsec hubThe hub's parsers, scenarios and collections: what waits, what's kept back
crowdsec hub upgrade --yesUpgrade them (never an item edited here), then reload CrowdSec
proxyThe reverse proxy's routes and certificates, whichever proxy it is (read-only)
proxy cf-only --yesAn NPM site answers only through Cloudflare: a request straight to this host is closed
proxy hostsEvery route: domains, backend, TLS and redirect, and problems
proxy certsEach route's certificate as the proxy serves it, or install one you have
proxy certs lsEach route's certificate as the proxy serves it, checked at the proxy itself
proxy certs install --yesPut a certificate you already have into the proxy
proxy routeAdd a stack's proxy host to NPM, with its certificate (NPM only)
proxy route add --yesA proxy host in NPM for a stack, with its certificate
proxy route rm --yesRemove a proxy host seawall made, with its access list and certificate (severe)
proxy migrate --yesMove the way in from Nginx Proxy Manager to Traefik
proxy aop --yesCloudflare Authenticated Origin Pulls for a site on Traefik (Traefik only)
proxy bouncer --yesCrowdSec's bouncer plugin in Traefik, on routers with a verified client address
proxy loginLog in seawall's own NPM user once and keep only its token (NPM only)
proxy probesProbe public hosts as a visitor reaches them, so a site that's down pages
proxy probes lsEach public host, its stack, whether it's probed and how the last probe went
proxy probes add --yesProbe public hosts
proxy probes rm --yesStop probing public hosts
npmNginx Proxy Manager (read-only): proxy hosts checked against the ingress rules
npm certsCertificates in NPM and as served (facts TLS probes), with expiry
npm hostsEvery proxy host: backend, certificate, flags and problems
npm fix --yesFix what NPM's API can on a proxy host, a dry run first
gameGame server stacks: bring them up and down with their ports
game lsEvery game: stack, state and ports (closed = not on the allowlist)
game showOne game in detail: state, CPU, memory, network, disk and ports
game up --yesStart a game: checks port clashes and drift, adds its ports to the allowlist
game down --yesStop a game and take its ports off the allowlist
containerOne container on its own: its state and settings, and a restart, stop or start
container lsEvery container, or a stack's: its stack, state and image
container inspectIts settings, read-only: every env value shows as <set>
container restart --yesRestart one container
container rebind --yesRestart each container holding the Docker socket from before the engine's restart
container stop --yesStop one container, its alerts silenced first; the rest of its stack keeps running
container shell --yesA shell in one container, as its own user; root only with --root and its name typed
container start --yesStart one stopped container
container adopt --yesBring a container started with docker run under a compose stack
container rm --yesRemove a stopped container no stack runs, its name typed
volumesDocker's volumes: their size and who uses each, and removing an unused one
volumes lsEvery volume, its size and who uses it (a container, or a stack's compose)
volumes rm --yesRemove one no container uses and no compose file names, its name typed (severe)
volumes clean-aside --yesRemove seawall's old aside copies, the count typed (severe)
networksDocker's networks: who uses each, and removing an unused one
networks lsEvery network, its driver and who uses it
networks rm --yesRemove one no container joins and no compose file names, its name typed (severe)
networks rename --yesRename a network, keeping its subnet: a short cutover, then each stack deploys (severe)
completions --yesTab completion for bash, zsh or fish: the line to add, or --install to add it