Skip to content

Command line

The text aftab help prints (AFTAB 0.0.0). aftab help COMMAND (or aftab COMMAND -h) shows a command’s options.

Run the commands on the panel’s server, with sudo in front unless you are signed in as root, for example sudo aftab status. sudo aftab on its own opens a menu of the commands. Stopping the panel does not stop the VPN: aftab stop stops only the panel, and aftab down is what removes the VPN’s interfaces, routes and firewall rules. The output of sudo aftab state is JSON that holds private keys: never paste it into a question or a chat.

AFTAB 0.0.0
Usage: aftab COMMAND [options]
Panel:
menu the interactive menu (also: aftab with no command)
start start the panel
stop stop the panel (the VPN keeps running; 'aftab down' stops it)
restart restart the panel and its helpers
status is the panel running, and how many WireGuard links are up
log follow the panel's log
info show the panel's address and username
port change the panel's port: aftab port N
path change the panel's secret path: aftab path [/P/ | random]
get read a setting: aftab get KEY
set change a setting: aftab set KEY VALUE
update update to the latest release, or one: aftab update [vX.Y.Z]
rollback go back to the version before the last update (kept 7 days): aftab rollback [-y]
health is the panel up and answering: aftab health [--wait SECONDS] (exit status 0 when it is)
uninstall remove AFTAB (asks first; can keep the database)
init first-run setup (prints the sign-in details)
version print the version
client clients: aftab client list | show NAME | add NAME | renew NAME | enable NAME | disable NAME | delete NAME
Network:
apply apply the network state now
down remove all VPN interfaces, routes and firewall rules
state print the network state the panel would apply (JSON; holds private keys)
country print this server's country (two letters; empty if unknown): aftab country [IP]
component components for bridges: aftab component status | add NAME FILE
awg AmneziaWG (obfuscated WireGuard): aftab awg install | status
extras Tor, AmneziaWG, pinned components (installer unless AFTAB_SMALL=1): aftab extras install | status
Security:
reset-admin set or randomise the admin's username and password
2fa-off turn off two-factor sign-in (a lost authenticator): aftab 2fa-off [USERNAME]
unban lift sign-in bans: all, or one address (aftab unban [IP])
compromised replace every secret a copy of the database holds: aftab compromised [--nodes] [--warp] [--yes]
ssl Let's Encrypt for the panel: aftab ssl domain NAME | cloudflare NAME | ip [ADDR] | renew | status | remove
tls serve the panel over HTTPS with a certificate (--cert, --key, --domain; --off)
Backups:
backup write a database backup: aftab backup [FILE]
restore put a database backup in place of the database, the panel stopped: aftab restore [--lose-secrets] FILE
decrypt-backup open an encrypted backup (*.enc) with the admin password: aftab decrypt-backup FILE [OUT]
factory-reset delete everything except the admin sign-in and the panel's address
Services (run by systemd):
serve run the panel
dns run the resolver for domain routing rules (aftab-dns.service)
tunnel run the helpers: the TLS tunnel server for bridges and the SOCKS5 exits (aftab-tls.service)
helper run the root helper for the unprivileged panel (aftab-helper.service)
Run 'aftab help COMMAND' (or 'aftab COMMAND -h') for a command's options.