If you're using Portainer Community Edition (CE), most container workflows are smooth⦠until you try pulling images from GitHub Container Registry (ghcr.io).
Since GitHub integration is only available in Portainer Business Edition, many users get stuck wondering how to authenticate with ghcr.io in CE.
The good news?
π You can easily add ghcr.io as a custom registry using a GitHub Personal Access Token.
Hereβs the full step-by-step guide.
1. Create a GitHub Personal Access Token π
Portainer needs a token with permission to pull packages from GitHub.
Steps:
- Go to: https://github.com/settings/tokens.
- Click Generate new token β Generate new token (classic).
- Add a note, such as Portainer.
- Set an expiration date (or use No expiration, if that fits your risk tolerance).
- Under Scopes, check:
read:packages β Allows downloading images from GitHub Container Registry. - Click Generate token, and copy it immediately (GitHub wonβt show it again).
2. Add ghcr.io as a Custom Registry in Portainer π¦
Now head to your Portainer instance.
Steps:
- Go to your registries page, e.g.:
πhttps://portainer.benjaminrancourt.ca/#!/registries
(your own Portainer URL) - Click + Add registry.
- Select Custom registry.
- Fill in the following:
Name: ghcr.io
Registry URL: https://ghcr.io
- Enable Authentication.
- Fill in your credentials:
Username: your GitHub username
Password: the token you generated earlier
- Save. π
Portainer can now pull both public and private images from ghcr.io.
Optional: Test Your Registry π§ͺ
Try deploying a stack using a GHCR image:
image: ghcr.io/jonashackt/hello-world:latest
If everything is configured correctly, Portainer will pull the image without errors.
Reference π
This tutorial is based on the discussion here:
https://github.com/portainer/portainer/issues/12831
π Conclusion
Even though Portainer CE doesnβt include built-in GitHub registry support, you can still use GitHub Container Registry seamlessly by adding it as a custom registry and authenticating with a GitHub token.
This simple setup allows you to continue deploying your applications using GHCR without needing the Business Edition.



