brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: find the portainer setup token in the docker logs with grep setup_token

Portainer
~/tips/tip-portainer-setup-token-docker-logs

docker logs portainer 2>&1 | grep setup_token

Shows where to find or preset the one-time token that a fresh Portainer needs.

Newer Portainer installs ask for a token when you create the first admin. It is not on the screen, but in the log.

docker logs portainer 2>&1 | grep setup_token
docker run -d --name portainer -p 9443:9443 -v portainer_data:/data -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce:lts --setup-token mysecret

From version 2.43 (and 2.39.4) a brand-new instance needs a one-time token before it accepts the first administrator. The token is printed in the server log as setup_token=. You also have to create the user within five minutes.

For scripted installs pass --setup-token value yourself, or set the admin password with --admin-password-file, which needs no token. --no-setup-token switches the check off, which is only reasonable on a trusted private network.

Further reading: Portainer docs: setup token FAQ

More Portainer tips Choose Polling in a Portainer GitOps update when your Git host can't reach Portainer Put Portainer environments in groups and give users access to a whole group Portainer's Edge Agent checks in every 5 seconds, and you can change that docker run -d -p 9001:9001 --name portainer_agent --restart=always \ Deploy the container → Replace All Portainer tips (28) All topics

Link