Locked out of the panel
Each recovery command below runs on the panel’s server. Prefer the smallest fix. After any of them, sign in and make a fresh backup.
Before you start
Section titled “Before you start”SSH to the server as a user who may run sudo. The panel may be running or stopped as each command says.
Steps (pick the match)
Section titled “Steps (pick the match)”Lost admin password
Section titled “Lost admin password”sudo aftab reset-admin sets a new owner password and prints it once. It does not change clients, tokens or the secret path. Sign in with the new password and store it.
Lost authenticator (two-factor)
Section titled “Lost authenticator (two-factor)”sudo aftab reset-admin also clears two-factor for the owner so you can sign in with the new password and enrol again in Settings → Account. It does not remove other admins’ two-factor.
Lost secret path (URL path)
Section titled “Lost secret path (URL path)”sudo aftab info shows the current path. To set a new one, change Secret path in Settings → Panel while signed in, or use sudo aftab set for the web base path key your install uses — then open the new URL. Old bookmarks break; clients’ VPN configs do not use this path.
Lost or broken HTTPS certificate
Section titled “Lost or broken HTTPS certificate”Use Settings → Panel → Get a certificate, or sudo aftab ssl as HTTPS describes. If the panel will not start because of a certificate aftab-panel cannot read, fix the file permissions or paths, then sudo aftab restart.
Panel will not open / banned your IP
Section titled “Panel will not open / banned your IP”sudo aftab unban clears login-guard bans. sudo aftab log and journalctl -u aftab -n 50 show start errors. Installer refusals (iptables-legacy, missing users, setpriv, unread certificate) print a one-line fix — see Install.
Secrets or tokens compromised
Section titled “Secrets or tokens compromised”sudo aftab compromised (and the panel’s compromised flow) replaces what the UI lists; follow on-screen steps. Factory reset is sudo aftab factory-reset and wipes the panel after confirmation — last resort; restore from backup afterward if you have one.
Rollback a bad update
Section titled “Rollback a bad update”sudo aftab rollback returns to the version kept for 7 days. See Updates and An update went wrong.
How to check it worked
Section titled “How to check it worked”You sign in in the browser. sudo aftab status is ready. Make a backup.
If it does not
Section titled “If it does not”Troubleshooting. If the database is gone, Move to a new server from an off-server backup.
What is not changed
Section titled “What is not changed”Unless you factory-reset or restore, client configs and peer keys stay. reset-admin does not rotate API tokens or bridge join secrets.