A fresh server has no accounts and rejects every request with 401 until you mint the first admin token. There is no sign-up page and no default password — by design. Here is why, and how to do it for each way you run the server.
Local access to the data directory is the root of trust. There are no auto-created credentials, so nobody can reach a just-started server over the network and claim it. Instead, whoever can write the data directory runs an offline subcommand that mints the first admin token directly into that directory. After that, everything else happens over the API with the token.
token create prints the token value once, at
creation. Copy it immediately; it is stored only as a hash and cannot be
shown again. Lost it? Mint another.
admin, as every example below does. That
account is the server’s recovery
account: it can’t be deleted, disabled or demoted, so you can always
get back in with a fresh invite from the server’s shell.
Run the offline subcommands as one-shot containers against the same data volume:
docker compose run --rm nightshipd user create admin --role admin --data-dir /data
docker compose run --rm nightshipd token create my-laptop --user admin --data-dir /data
MSYS_NO_PATHCONV=1 in front of each line
(MSYS_NO_PATHCONV=1 docker compose run --rm nightshipd user create
admin --role admin --data-dir /data). Git Bash rewrites
/data into a Windows path inside the argument, so the
admin user and the token are created in a directory literally called
C:/Program Files/Git/data in the container. The real
/data stays empty, the commands report success, and every
request afterwards answers 401 with nothing to explain why.
Click the running nightshipd container, open its Exec
tab, and run the two commands there. Because the shell is inside the running
server, it writes to the same /data the server reads:
nightshipd user create admin --role admin --data-dir /data
nightshipd token create my-laptop --user admin --data-dir /data
docker run one-shot must mount
the exact same named volume — a bare
-v nightship-data:/data and a Compose-managed
<project>_nightship-data are different volumes, and a token
in the wrong one gives 401 despite reporting
“created”.
With the server running from
%LOCALAPPDATA%\Programs\Nightship, open a second terminal
and point the offline commands at the same data directory:
nightshipd.exe user create admin --role admin --data-dir %LOCALAPPDATA%\NightshipServer
nightshipd.exe token create my-laptop --user admin --data-dir %LOCALAPPDATA%\NightshipServer
The offline subcommands operate directly on the data directory, so run them as the nightship user that owns it:
sudo -u nightship /opt/nightship/bin/nightshipd user create admin \
--role admin --data-dir /var/lib/nightship
sudo -u nightship /opt/nightship/bin/nightshipd token create bootstrap \
--user admin --data-dir /var/lib/nightship
With the token in hand, open the desktop app: Servers → Add
server, enter the server URL (http://localhost:8080 locally,
or your https://builds.example.com), and Set token with
the value you copied. The Admin page now lets you create channels,
push builds, and invite people.
nightshipd token delete <name> --data-dir <dir>.
From here, see Users, roles, and groups
and Invites and onboarding.