/settings/registry-credentials):
- Container registries are where your images are pulled from. A credential here is a username and a password or token.
- Package registries are where a build installs dependencies from. A credential here is mounted into the Dockerfile build as a secret.
Container registry vendors
Each vendor tile opens a dialog you can deep link to, for example/settings/registry-credentials?connect=ghcr. The preset pre-fills the host, names the auth method and lists the scopes the token needs. Test connection authenticates the typed credential against the registry and stores nothing. Save credential stores it, encrypted at rest and never shown again.
ECR tokens last 12 hours. The preset records a 12 hour expiry so the existing expiry reminder fires, but the control plane does not refresh the token itself yet: re-issue it with the CLI before it lapses.
The table lists which services pull with each credential.
add reads the password from stdin or a no-echo prompt when --password is omitted. Every command takes --json.
Docker Hub
Add Docker Hub under Integrations with your Docker Hub user name and an access token. Levelrail checks the token with Docker Hub when you save it and refuses one Docker Hub rejects.- Personal access token: pick the Read-only repository permission to see private repositories. Public Repo Read-only works for public images only.
- Organization access token: use the organization name as the user name and grant
scope-image-pull,scope-repository-read,scope-tag-readandscope-repository-list. Without the list scope Docker Hub leaves private repositories out of lists without an error. - Never grant a write scope. Docker Hub does not report a token’s permission level and Levelrail never attempts a write, so it cannot prove a token is read-only.
- Docker Hub does not expose when a token expires. The status shows the expiry only if you recorded one.
GET /api/v1/registry-credentials/{id}/dockerhub returns whether the token is valid, its kind, the scopes Docker granted, which checks passed and the pull limit. GET /api/v1/registry-credentials/{id}/limits returns only the pull limit (limit, remaining, window and source), read with a request that does not use a pull. Both appear in GET /api/v1/connections health as well. Anonymous pulls share a limit per IP address, which a shared server can use up; a token raises it. When Docker Hub answers 429, the failure is reported as registry_rate_limited (see deploy failures).
Settings (applied live, the environment variable only seeds the default): registry.dockerhub.limit_warn_percent, registry.dockerhub.limits_cache_seconds, registry.dockerhub.tag_page_size and registry.dockerhub.use_credential, the switch that turns the token off for docker.io pulls. Doctor reports a rejected token and a low or empty pull limit.
Run your own registry
The catalog has a template for the open source Docker registry with basic auth,docker-registry-auth (image registry:3, port 5000, data in the registry_auth_data volume). There is also an open one, registry, with no auth. Do not expose that one to the internet. Levelrail also has a built in registry, see levelrail-cli registry enable in the CLI reference.
These steps show the template route. They have not been run end to end on a test host yet, so check each step on a non production server first.
1. Deploy it with your own login
The template generates its username and password at deploy time and stores them as secrets. There is no documented command to read them back, so set your own values instead. Save the template, replace the two generated tokens, and map a domain to theregistry service:
registry.example.com at your server first. HTTPS is issued automatically once DNS resolves, see Add a domain and go live. Do not allow port 5000 through your firewall; clients use the domain on 443.
2. Push from a laptop
1.0: digest: sha256:... size: .... Copy the sha256: value. That is the digest.
3. Give Levelrail the login
test signs in to the registry without pulling anything. repositories and tags list what you pushed:
4. Deploy from the private image by digest
Not yet
- Reading the generated registry login back from Levelrail. Use your own values as above.
- A
--digestflag. The digest goes in the image reference.
Package registries for builds
A package registry credential holds an ecosystem, a URL, an optional username and a token. It applies to every build, one project or one app, and the narrowest scope wins when two registries share an ecosystem.
The files reach the build as BuildKit secret mounts, so they are never part of an image layer or the build cache key. Mount the one you need in your Dockerfile:
GOPROXY, GOPRIVATE) are passed as build args. The secret values are masked in build progress and logs before they are recorded in the deploy history.
Limits
- Secret mounts apply to Dockerfile builds on the control plane. A build dispatched to a remote build node fails with a clear error instead of building without credentials, and Railpack and pipeline
build-onlysteps do not receive them yet. The wiring points areinternal/build/router.go(Router.Build),internal/build/remote.go(RemoteRequest) andinternal/deploy/build_only.go. - There is no automatic token rotation reminder. Rotate by deleting and re-adding the registry.
Access
Listing and reading usage needsread. Adding, testing and removing credentials needs write:sensitive. Credential values are never returned by the API.