Server management
Services and diagnostics
See and operate every systemd unit and timer within a protected list, get alerted on crash loops, put your own services under management, follow system jobs live, inspect processes and listening ports, let the doctor fix what it finds, and use a recorded root terminal behind a passkey and the VPN.
On this page
The goal of Berth's server management is that an administrator rarely needs a shell. This article covers the parts that replace systemctl, journalctl, ps, ss and the usual first-aid commands: the services overview, managed services with health checks, background jobs, processes and ports, the doctor, and, for the moments a shell really is the right tool, a root terminal in the browser that is locked down and recorded.
Services and timers
System → Services lists every systemd service and timer on the server: whether it runs, whether it starts at boot, memory, restarts, and for timers the previous and next run. Failed units are at the top. Click a unit for its unit file, package, dependencies, limits and the last lines of its log.
What you can do from here depends on a protected list that is enforced by the root agent, not by the page:
- The agent, the panel, SSH, networking and systemd can only be restarted, never stopped. A restart of the agent, the panel or sshd happens a few seconds after your click, so the answer reaches your browser first.
- The VPN, the firewall, the audit log, user sessions and terminals can be restarted or reloaded, but never stopped or disabled.
- D-Bus, logind, targets, mounts, swap, the rescue and emergency shells, and running updates and jobs are not operable from the panel at all.
Everything else can be started, stopped, restarted, reloaded, enabled, disabled or masked. The panel asks for confirmation and writes each action to the activity log.
berth unit list --filter failed
berth unit show php8.3-fpm
berth unit restart nginx
berth unit impact mariadb # what falls over if this stops or restarts
berth unit logs postfixWhy a unit fails
Diagnose on a failed unit (or berth unit diagnose <unit>) reads its state and log and explains the cause in plain language: a missing program, too little memory, a port already taken, a dependency that is not running, a masked unit, a broken change. It proposes a targeted fix, which you can run with one click or with berth unit fix:
berth unit diagnose valkey-server
berth unit fix valkey-server stop_port_ownerThe available fixes are reset_start, raise_memory, raise_nofile, stop_port_owner, start_dep, unmask and rollback.
Crash loops and failures
Berth attaches an OnFailure handler to the units it manages, so a failed unit or a failed scheduled task produces a notice instead of going unnoticed. Units that keep restarting are reported as a crash loop. If a notice is expected and harmless for a particular unit, Ignore… silences it for that unit only (berth unit ignore).
Turning a service off with a reason
Sometimes the right response to a vulnerability without a fix is to stop the affected service. Turn off with a reason… stops the unit and keeps it from starting at boot, with your reason in the panel, the activity log and the notice. You can give an expiry date: after it you get a reminder, but the service does not turn itself back on. The watchdog leaves such services alone. Berth itself, the watchdog, SSH, networking, MariaDB and the firewall can never be turned off this way.
berth unit off cups --reason "CVE-2026-1234, not needed on this server" --until 2026-12-01
berth unit off-list
berth unit on cupsManaged services
For services that matter to you but that Berth did not install (a Redis or Valkey for a customer project, an internal API, a queue worker), you can put them under management. Take under management on a unit, or berth service adopt, records:
- the desired state: should be running, should be stopped, or only watched,
- whether it starts at boot, in dependency order after a reboot,
- a restart policy with a maximum number of restarts per hour; above it Berth gives up and notifies you, so a crash loop does not become a storm of restarts,
- health checks, because "active" in systemd does not mean the service answers: HTTP, a port, a process, a heartbeat file, a log pattern or a command. A failing check can notify, restart (with the same cap) or run a hook,
- configuration files and directories, which go into the service's backup.
Berth also watches for drift: when someone stops, masks, disables or edits the unit outside the panel, the service page shows the difference, and you either restore the desired state or accept the new one (berth service drift).
You can also create a new service or a scheduled task from the panel or the CLI, with Berth writing the unit file. Secrets are stored separately and never shown again; the previous definition is kept so you can roll back.
berth service adopt valkey-server --desired running --boot on --max-restarts 3
berth service check add valkey-server --kind tcp --port 6379 --send PING --reply +PONG
berth service create --name queue-worker --after mariadb.service -- /opt/app/bin/worker --queue default
berth service list
berth service rollback queue-workerTwo companion pages extend managed services:
- Service backups: paths, exclusions, a database dump or a stop-and-start around the backup, a schedule, retention and a regular restore test.
- Service software: updating the software from a package, a container image, a Git repository, a signed GitHub or GitLab release, or your own command, with a backup first, a health check afterwards and an automatic way back if it fails.
Service software updates
System → Service software sets per managed service where its software comes from and what Berth does when there is a new version. The source is one of package (apt or dnf), container (an image), git (a working copy with a build command), release (a binary from GitHub or GitLab, checked against its checksums and, if you require it, a minisign, cosign or GPG signature) or command (your own check and update commands). The policy is notify (the default), window (update automatically in the next maintenance window), security (a security release goes in straight away) or off.
Every update follows the same steps: a backup first if the service has one, then the update, a restart and the health check you set (the unit is active, a TCP port answers, an HTTP URL answers, or a command succeeds). If the health check fails, the previous state goes back, or the backup is restored, and that version is skipped.
berth service-update set queue-worker --kind git --dir /srv/queue-worker --ref main \
--build "/usr/bin/make build" --health active --policy window
berth service-update set valkey --kind package --package valkey-server --health tcp:6379
berth service-update list
berth service-update check queue-worker
berth service-update apply queue-worker # now; --target for a specific version
berth service-update rollback queue-workerEverything that runs on the server, apps, containers, managed services and extensions, is listed with owner, state and usage under System → Inventory, or berth inventory.
System jobs
Long work that needs root, such as a diagnosis, a repair run, an update or a vulnerability scan, runs as a system job in its own transient systemd unit, not inside a web request. System → Services → System jobs lists them, newest first; open one to read its log live. Finished jobs stay visible for 90 days with the last lines of their log. The same jobs appear in the progress bar at the top of the panel while they run.
berth job list
berth job log 812 --follow
berth job start doctorProcesses
System → Processes shows each process with its unit, user, memory and CPU, and can filter to processes that belong to no service at all, which is often where a forgotten script or a compromised site shows up. Actions: TERM, KILL, HUP and renice. Capturing a process (berth proc capture) turns a process outside any service into a proper managed service, with Berth proposing the unit.
berth proc list --scope unmanaged
berth proc term 4242
berth proc renice 4242 --nice 10
berth proc capture 4242 --name report-generator --createListening ports
System → Ports lists everything that listens, by which process and unit, and whether the firewall lets it be reached from outside. Berth keeps a baseline: a new listener that is reachable from outside and not part of a known service produces a notice. For each new listener you decide:
- Listen locally only: Berth restricts the unit to loopback and restarts it.
- Keep closed in the firewall: it keeps listening, but nobody outside can reach it.
- Accept: it is intended; it goes into the baseline.
berth ports list
berth ports local-only tcp 0.0.0.0 6379See firewall and bans for the firewall itself.
The doctor
The doctor checks whether the server is still as the panel knows it: services, configuration, access and the link with the agent. It runs every day, after every update of the operating system or of Berth, and after repairs, and the results are under System → Diagnosis. Each problem is explained in plain words with what it means, with the technical message underneath.
- Fix… per finding opens the matching repair.
- Repair everything the panel can runs all repairs for the current findings in order, as a system job; Dry run only shows what it would change without changing anything. Afterwards the doctor checks again.
- A new problem produces one notice (Server diagnosis); a problem that persists is not repeated every day.
berth doctor
berth doctor --json # with title, fix and unit per finding
berth doctor --last # the panel's latest run, without checking again
berth repair --dry-run # what a repair run would changeWhen the panel itself is down, sudo berth rescue doctor runs the same checks from the console; see rescue mode.
The admin terminal
For the rare case that a shell is the right tool, Berth includes a root terminal in the browser. It is off by default and built so that a compromised panel cannot use it:
- It runs as a separate service on its own port of the panel's host name, reachable only through the server's VPN (Tailscale or WireGuard).
- Every session requires a passkey with PIN or biometrics, checked by the terminal service itself. The panel cannot open a session, and a panel login is not enough.
- Turning it on and linking the first passkey can only be done on the server, as root. Turning it off can be done from the panel.
- Every session is recorded; the SHA-256 of the recording goes into the activity log, and
berth admin-term verify <session>proves the recording was not changed. - Sessions close after a period without input and after a maximum duration, both configurable.
sudo berth admin-term enable
sudo berth admin-term passkey add --name "laptop" # gives a one-time link, VPN only
berth admin-term sessions
berth admin-term stop <session>Register two passkeys, one as a spare.
Administrator accounts and SSH
The same page, System → Admin access, manages the people who may log in to the server itself over SSH, with SSH keys that expire on their own and sudo through a checked drop-in file. See Administrator accounts with expiring keys.
The terminal for customers is a separate, sandboxed feature; see files, FTP and SSH.
Related
- Logs and log drains
- OS updates and maintenance
- Disks and snapshots
- Rescue mode
- Architecture, for how the panel and the root agent split the work