Skip to content

First administrator

When Relay starts without users, create the first administrator through the one-time web setup or the command line.

Web setup

Read the setup token from the logs:

docker logs relay

Open Relay in a browser. The setup page asks for a username, password, and that token.

Warning

The running server clears its token after successful web setup and rejects setup if an account already exists. The token is generated in memory when a private instance has no users; restarting before setup generates a new token. Deleting every account allows setup again on a later start. Do not publish the token or leave it in shared logs.

Command line

docker exec -it relay relay users add --admin <username>
docker compose exec relay relay users add --admin <username>

Start Relay once with the same data directory before using user commands: startup creates config.yaml and users/. For a standalone binary, use RELAY_HOME=/path/to/data relay users add --admin <username> after that initialization. Replace <username> with your chosen name.

Relay prompts for a password (at least eight characters) and Save logs to disk? (default yes). It writes the account immediately. Refresh the web client after CLI creation; an already-open setup page can be stale, but cannot create another first administrator.

After signing in, review Server and users and Authentication.