First Login
Create the first admin account during the setup window, then use the management console to configure the proxy.
Use This When
Use this on a new installation, after restoring an empty database, or when you need to recover a forgotten management password.
Prerequisites
- The server is running.
- No management users exist yet for first setup.
- You can reach the management URL, usually
https://your-server:8081. - You have the setup token from
MANAGEMENT_SETUP_TOKENor from the server startup log.
Steps
5-minute setup window
The Setup Admin form is only available for 5 minutes after server start when no users exist. If you miss the window, restart the server to reopen it:
docker compose restart p2pstream- Open the management URL in a browser.
- Include the setup token in the URL, for example
https://your-server:8081/?setup_token=<token>. - On Setup Admin, create the primary administrator account.
- Use a username with 3 to 64 lowercase letters, numbers, underscores, or hyphens.
- Use a password with at least 12 characters.
- Log in and open Overview, then Proxy when you are ready to create listeners, routes, and route targets.
Runtime Rules
| Area | Behavior |
|---|---|
| Usernames | Normalized to lowercase and limited to lowercase letters, numbers, underscores, and hyphens. |
| Passwords | Minimum length is 12 characters. |
| Setup token | Required only before the first admin exists. If MANAGEMENT_SETUP_TOKEN is unset, a generated token is printed once at startup. |
| Sessions | Stored in SQLite and expire after 7 days. |
| Cookie security | Session cookie is HTTP-only, SameSite Lax, and Secure when management TLS is enabled, ENV=production, or MANAGEMENT_COOKIE_SECURE=true. |
Verification
After login, the Overview dashboard should load with live proxy status, request totals, traffic trends, and the main navigation for Overview, Traffic, Proxy, Agents, Traffic Policy, Templates, TLS, and Settings.



Troubleshooting
| Symptom | Fix |
|---|---|
| Setup window expired and no users exist | Restart the server and create the first admin within 5 minutes. |
| Setup says token is required | Use the URL from the server log, or set MANAGEMENT_SETUP_TOKEN and restart before first setup. |
| Forgot an existing password | Reset the user against the same SQLite database. |
| Reset command uses the wrong database | Run it in the container or pass the same CONFIG_DIR or --database-url used by the server. |
Docker Compose recovery:
docker compose exec p2pstream p2pstream users reset-password adminBinary/systemd recovery:
CONFIG_DIR=/var/lib/p2pstream p2pstream users reset-password adminThe reset command updates the user password and revokes active sessions for that user.