Skip to content

Reset Admin Key

seakee edited this page Jun 5, 2026 · 1 revision

Reset Admin Key

This guide resets the CPA Manager Plus Manager Server admin key used by Full Docker and native Manager Server-hosted panels.

It does not reset the CPA Management Key, and it does not recover a lost data.key.

Stop Manager Server before running the reset command.


What the Command Does

cpa-manager-plus reset-admin-key

The command replaces settings.admin_credential_v1 in the Manager Server SQLite database with a new salted HMAC credential.

  • If no key is provided, it generates a new cmp_admin_... key and prints it once.
  • If a key is provided, it stores only its digest and does not print the key back.
  • It does not start the HTTP server, collector, or background workers.
  • It does not need the CPA Management Key or data.key.

Alias:

cpa-manager-plus reset-admin-password

Before You Start

  1. Stop Manager Server.
  2. Back up the full data directory, including usage.sqlite, usage.sqlite-wal, and usage.sqlite-shm when present.
  3. Confirm the real database path:
    • Docker default: /data/usage.sqlite
    • Native default: data/usage.sqlite next to the binary
    • Custom deployments: USAGE_DB_PATH

Docker Named Volume

docker stop cpa-manager-plus
docker run --rm \
  -v cpa-manager-plus-data:/data \
  seakee/cpa-manager-plus:latest \
  reset-admin-key
docker start cpa-manager-plus

The command prints:

CPA Manager Plus admin key reset.
New admin key: cmp_admin_...
Save this value now. It will not be shown again.

Use the new key on the Manager Server login page.


Docker Host Directory Mount

docker stop cpa-manager-plus
cp -a /srv/cpa-manager-plus-data /srv/cpa-manager-plus-data.backup
docker run --rm \
  -v /srv/cpa-manager-plus-data:/data \
  seakee/cpa-manager-plus:latest \
  reset-admin-key
docker start cpa-manager-plus

Provide a Specific Admin Key

Prefer --admin-key-file:

printf '%s\n' 'replace-with-a-long-random-admin-key' > /srv/new-cpamp-admin-key.txt
docker stop cpa-manager-plus
docker run --rm \
  -v cpa-manager-plus-data:/data \
  -v /srv/new-cpamp-admin-key.txt:/run/secrets/new_admin_key:ro \
  seakee/cpa-manager-plus:latest \
  reset-admin-key --admin-key-file /run/secrets/new_admin_key
docker start cpa-manager-plus

--admin-key is available, but may be stored in shell history or process audit logs:

cpa-manager-plus reset-admin-key --admin-key 'replace-with-a-long-random-admin-key'

Native Packages

Stop the native process first.

macOS / Linux:

./cpa-manager-plus reset-admin-key

Windows PowerShell:

.\cpa-manager-plus.exe reset-admin-key

Custom database path:

./cpa-manager-plus reset-admin-key --db-path /path/to/usage.sqlite

Windows:

.\cpa-manager-plus.exe reset-admin-key --db-path C:\path\to\usage.sqlite

Restart the native process and log in with the new admin key.


Troubleshooting

  • SQLite database not found: pass --db-path, or mount the correct Docker volume/host directory.
  • does not look like a CPA Manager Plus Manager Server database: the path points to the wrong file or a new empty file.
  • database is locked: Manager Server is still running. Stop it and retry.
  • Login still fails: confirm the panel is using the same Manager Server whose database was reset.
  • Generated key was not saved: rerun the command while Manager Server is stopped.

Treat the generated cmp_admin_... as a secret.

Clone this wiki locally