Private Registries
Railway supports deploying Docker images from private container registries. This allows you to use proprietary images, internal tools, or images stored in your organization's private registry.
Supported Registries
Any registry that supports standard Docker authentication works with Railway. Here are a few:
| Registry | Domain |
|---|---|
| Docker Hub | docker.io (default) |
| GitHub Container Registry | ghcr.io |
| GitLab Container Registry | registry.gitlab.com |
| Quay.io | quay.io |
| AWS ECR Public | public.ecr.aws |
| Google Artifact Registry | us-west1-docker.pkg.dev |
| Microsoft Container Registry | mcr.microsoft.com |
Requirements
Private registry credentials are available on the Pro plan. If you're on a Free, Trial, or Hobby plan, you'll need to upgrade to use private registries.
Configure Registry Credentials
To deploy from a private registry:
- Navigate to your service's Settings page
- Under the Source section, locate Registry Credentials
- Enter your credentials and save
GitHub Container Registry (GHCR)
For images hosted on ghcr.io, Railway provides a simplified authentication flow:
- Create a GitHub Personal Access Token with the
read:packagesscope - Enter your token in the GitHub Access Token field
Railway automatically handles the username configuration for GHCR.
Other Registries
For all other registries, provide:
| Field | Description |
|---|---|
| Username | Your registry username or service account name/id |
| Password | Your registry password, access token, or API key |
The exact credentials depend on your registry provider:
- Docker Hub - Docker ID and personal access token
- GitLab - Username and personal access token with
read_registryscope (addwrite_registryfor push access) - Quay.io - Robot account username in format
namespace+robotnameand the generated robot token - AWS ECR - Use
AWSas username and an authentication token as password, generated viaaws ecr get-login-password(tokens expire after 12 hours) - Google Artifact Registry - Use
_json_keyas username and your service account JSON key contents as password
Security
Registry credentials are encrypted at rest using envelope encryption. Credentials are only decrypted at deployment time when pulling your image.
Image Format
When specifying a private image, use the full image path including the registry domain:
ghcr.io/your-org/your-image:tag
registry.gitlab.com/your-group/your-project:tag
your-dockerhub-username/private-repo:tagFor Docker Hub private images, you can omit the domain:
your-username/private-image:latestEdit this file on GitHub