1 Cli Password Reset
Forgejo Actions edited this page 2026-09-25 17:00:22 +00:00

CLI Password Reset

There is no email self-service password reset in v1. The operator recovery path is a CLI mode built into the API image:

docker compose exec -T memories-api java -jar /app/memories-api.jar --reset-password [email protected] --password-stdin

Prefer --password-stdin over passing the password in an environment variable. Passwords must meet the 12-character minimum policy.

The command starts a slim Spring context with web, schedulers, and security disabled. It is safe to run while the API is serving traffic, as long as you run one reset at a time. On success it writes a password_reset audit event and deletes the user's indexed sessions.

Exit codes:

  • 0 — password reset.
  • 2 — unknown email.
  • 3 — disabled user.
  • 4 — password policy violation.
  • 5 — usage or I/O error.

Limitations: any operator with container or database access can reset any user, so physical and host access are the trust boundary. Legacy sessions created before principal-name indexing survive the reset (ISSUE-015) and can retain access up to the session TTL. See CLI Password Reset and Known Issues and Operator Diagnostics.

Details