Backing up the controller
Everything the controller knows is in /var/lib/panel:
| File | What it holds |
|---|---|
panel.db (with -wal and -shm next to it while running) |
Every account, server, setting and log |
panel.db.mark |
How far the database had got when the panel last ran, and node credentials taken out of use, so a database put back from an older copy shows (see Restoring) |
secret.key |
Decrypts saved credentials, the panel’s own key (which its nodes trust), everyone’s two-factor (authenticator) secrets, the key recovery codes are checked with, webhook signing secrets, and the backup encryption keys. Without it, authenticator and recovery codes stop working (people sign in with a passkey, or staff reset their two-factor), each webhook’s secret has to be rotated, and nodes refuse the panel until it’s back. |
Automatic backups
The installer sets these up, and every upgrade keeps them going. Once an hour, a copy of the database and of secret.key goes to /var/backups/panel. SQLite makes the copy while the panel runs, and each copy is checked before it counts.
In /var/backups/panel |
What it is |
|---|---|
panel-20261005-140312.db |
An hourly copy (the time is UTC). The newest 48 are kept, plus the newest of each of the last 14 days. |
pre-upgrade-1.0.0-20261005-140000.db |
The database just before an upgrade from that version. The last 5 are kept. |
secret.key |
A copy of the key, replaced if the key ever changes. |
See the copies:
ls -lt /var/backups/panel
When the next one is due, and how the last ones went:
systemctl list-timers panel-backup
journalctl -u panel-backup -n 20
Take one now, before a big change for example:
systemctl start panel-backup
The copying is done by /usr/local/sbin/panel-backup, run every hour by /etc/systemd/system/panel-backup.timer (and panel-backup.service next to it), as the panel user. It can only write in /var/lib/panel and /var/backups/panel, and the copies are readable by the panel user and root only. No copy is made while the disk holding /var/backups/panel has less than 5% free (journalctl -u panel-backup says so); the earlier copies are kept.
Controller backups: copies off the server
In the panel, Settings → Backups sends encrypted copies of the controller to one of your backup storages (S3 or SFTP), every hour or every day. Each copy holds the database and secret.key, encrypted with a passphrase you choose before it leaves the server.
- Add the backup storage under Backup storage if you haven’t. Pick one that isn’t with this server’s provider.
- Open Settings → Backups, tick Send copies of the controller, choose the storage, how often (daily by default), and how many copies to keep (14 by default; older ones are deleted).
- Enter a passphrase of at least 12 characters, twice, and your own password, and save. Write the passphrase down somewhere safe, away from this server: it’s the only thing that opens the copies.
The first copy is made at once. The page shows the last copy, its size, when the next is due and the copies in the storage. Back up now makes one at any time. Copies go in the folder controller-backups/<your panel's address>/, named by time, for example vorticpanel-20261009-031500.tar.gz.enc.
If a copy fails, the page says why, it’s tried again every 15 minutes, and staff with the permission get a notification (the Panel updates and backups topic, emailed by default) once a day until it works again, and once more when it does.
It needs the Controller backups permission, which the built-in Admin role doesn’t have, and changing the storage or the passphrase asks for your password again. A new passphrase only applies to new copies: keep the old one for the copies made with it. Changing where that backup storage connects needs the permission and your password too. Through the API it’s GET and PATCH /admin/controller-backups and POST /admin/controller-backups/actions/run, from a signed-in session only.
Opening a copy
Install the panel on the new server with the same --domain, download the copy from the storage into an empty folder there, and run this in that folder. It asks for the passphrase:
/opt/panel/dist-bin/vorticpanel open-backup vorticpanel-20261009-031500.tar.gz.enc
Each copy carries a check made with the passphrase. A copy that was changed in storage, or the wrong passphrase, is refused before anything is unpacked.
That leaves panel.db, secret.key and a README.txt with the steps. To put them in place:
systemctl stop panel
rm -f /var/lib/panel/panel.db-wal /var/lib/panel/panel.db-shm
install -o panel -g panel -m 600 panel.db secret.key /var/lib/panel/
systemctl start panel
Point the domain at the new server (Caddy gets its certificate once it does), and the nodes reconnect. The license is tied to the old server: in your account on vorticpanel.com, open the license and click Release from this panel, then enter the key again on the new panel’s License page (see License).
Or: rsync to another machine
The hourly run on the server can also send its copies to another machine over SSH, with rsync. These are the plain copies, with no passphrase: use a machine you trust. On the controller, as root:
1. Install rsync and give the panel user an SSH key:
apt-get install -y rsync
runuser -u panel -- mkdir -p -m 700 /var/lib/panel/.ssh
runuser -u panel -- ssh-keygen -t ed25519 -N '' -f /var/lib/panel/.ssh/id_ed25519
cat /var/lib/panel/.ssh/id_ed25519.pub
2. On the other machine, install rsync too, add that last line to ~/.ssh/authorized_keys of the user the copies go to (for example backup), and make the folder: mkdir -p ~/panel.
3. Back on the controller, connect once so it knows the other machine (answer yes), then say where the copies go:
runuser -u panel -- ssh backup@backup.example.com true
echo 'PANEL_BACKUP_RSYNC=backup@backup.example.com:panel/' > /etc/panel/backup.env
4. Try it:
systemctl start panel-backup && journalctl -u panel-backup -n 5
The last line should say Sent to backup@backup.example.com:panel/. From then on, every hourly copy is sent along. The other machine keeps every copy it gets; delete old ones there when you like.
secret.key isn’t sent with them. Copy it off once yourself, to somewhere other than that machine. It doesn’t change.
Restoring
1. Stop the panel and pick a copy:
systemctl stop panel
ls -lt /var/backups/panel
2. Put it back, with the name of the copy you picked:
rm -f /var/lib/panel/panel.db-wal /var/lib/panel/panel.db-shm
runuser -u panel -- install -m 600 /var/backups/panel/panel-20261005-140312.db /var/lib/panel/panel.db
3. If secret.key was lost too, put it back:
runuser -u panel -- install -m 600 /var/backups/panel/secret.key /var/lib/panel/secret.key
4. Start the panel: systemctl start panel.
A copy puts back everything as it was when the copy was taken, including access taken away since. The panel keeps a small file beside the database, panel.db.mark, and when it starts on a database older than the one it last ran with, it:
- signs everyone out, and stops every emailed link still waiting to be used (invitations, password resets), so send invitations again;
- keeps refusing node credentials replaced or revoked since, whatever copy it runs;
- notifies staff with Staff and roles or Enroll nodes (the Security topic) and adds an entry to the audit log.
Then check what may have come back since the copy was taken: API tokens and panel API keys deleted since, staff disabled or reset since, accounts won back with a password reset, and servers given to another owner. Nodes enrolled again since then can’t connect until they’re enrolled again, and nodes removed since are back in the list: remove them again. Leave panel.db.mark where it is when you restore: without it, the panel can’t tell.
On a new server, install the panel first with the same --domain, copy the database and secret.key over (with scp), and follow the same steps. Then point the domain at it, release the license from your account on vorticpanel.com, and enter the key again on the new panel’s License page (see License).
Servers keep running on their nodes whatever happens to the controller. When it’s back, telemetry brings their status up to date.
A server made after the copy was taken stays on its node, but the restored panel doesn’t know it. When a node connects, it cuts off from the network every server the panel doesn’t place on it, and leaves its disk and definition as they are. The node’s agent log names each one. Delete such a server on the node with virsh once anything the customer needs is saved from it.
A restored controller has the same key as before, and its nodes trust it. If nodes refuse it, see When a node refuses the panel.