Skip to main content

Locked yourself out of AFT!'s web UI? Don't panic.

If you have lost access to AFT! because all admin passwords are forgotten, or because a misconfigured allowlist or CORS setting is blocking access to the web UI, the aft reinit command lets you recover without losing any of your data.

The command resets the server configuration to factory defaults and removes all admin accounts. The next time you open the web UI you will be prompted to create the first admin account, exactly as after a fresh install. All scripts, VFS configurations, named secrets, API keys, and cron jobs are untouched.

Prerequisites

aft reinit enforces two hard requirements before it will do anything. If either condition is not met the command exits immediately with an error message and makes no changes to the database:

  1. aft reinit opens the embedded database file directly. The database has a single-writer lock: while the service is running it holds that lock, and aft reinit will not be allowed to proceed. Stop the service first.
  2. Because aft reinit bypasses all authentication and directly alters the database, the operating system itself must confirm you are authorized to do so. The command will refuse to run without elevated privilege.
    Linux/macOS/FreeBSD: use sudo or run from a root shell.
    Windows: open a PowerShell with "Run as Administrator" before running the commands.

Step-by-step recovery

Linux/MacOS/*BSD:

sudo aft svc stop
sudo aft reinit
sudo aft svc start

Windows (PowerShell run as Administrator):

.\aft.exe svc stop
.\aft.exe reinit
.\aft.exe svc start

Once the service is running again, open the web UI in your browser. The setup wizard will appear and ask you to create the first admin account. After that you have full access to all your existing data.

What gets reset, and what is preserved

Item After reinit
Server configuration (port, bind address, allowlists, CORS, JWT lifetime) Reset to factory defaults
Admin accounts All deleted
Scripts Preserved

VFS configuration

Preserved
Named secrets Preserved
API keys Preserved
Cron jobs Preserved
Operational log Preserved
License Preserved