Skip to content

Instantly share code, notes, and snippets.

@ScottJWalter
Created October 7, 2025 15:13
Show Gist options
  • Save ScottJWalter/5b3d5ae2215e66b096e54f63de700d85 to your computer and use it in GitHub Desktop.
Save ScottJWalter/5b3d5ae2215e66b096e54f63de700d85 to your computer and use it in GitHub Desktop.
Reset portainer admin password
#!/bin/sh
# pass the id of the container in on the command line
PORTAINER_CONTAINER_ID=$1
docker stop $PORTAINER_CONTAINER_ID
docker pull portainer/helper-reset-password
docker run --rm -v portainer_data:/data portainer/helper-reset-password
docker start $PORTAINER_CONTAINER_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment