Deploy Docker Registry

Private Docker registry: login required, images on a Railway bucket

Deploy Docker Registry

Just deployed

Bucket

Bucket

Just deployed

Deploy and Host Docker Registry on Railway

Docker Registry is the open-source server for storing and distributing container images, built from the CNCF Distribution project. It implements the OCI distribution API that docker push, docker pull, Podman, Kubernetes and CI tools use. This template runs the official registry image, version 3.1.2, as your own private registry.

About Hosting Docker Registry

Hosting a registry takes a server that speaks HTTPS, durable storage for image layers, and authentication so strangers can't pull or push. This template runs the official image on Railway, which gives it a public HTTPS domain. Images go to a Railway bucket through the registry's S3 driver, so storage has no volume size limit and survives redeploys. On each start, a short start command creates a bcrypt htpasswd file from a generated password and writes the registry config. The registry won't start without a password, so it's never left open. Blob downloads are redirected to short-lived signed bucket URLs.

Common Use Cases

  • Private storage for the images your CI pipeline builds, pulled by servers, Kubernetes clusters or Railway services
  • Keeping copies of public base images you depend on, under your own control
  • A container registry for a team or homelab without per-seat pricing

Dependencies for Docker Registry Hosting

  • The official registry image (CNCF Distribution 3.1.2), pinned by digest
  • A Railway bucket (S3-compatible) for image storage

Deployment Dependencies

Implementation Details

After the deploy, the login is REGISTRY_USERNAME (default admin) and the generated REGISTRY_PASSWORD, both in the Registry service's variables. Log in and push:

docker login YOUR-DOMAIN.up.railway.app -u admin
docker tag alpine:3 YOUR-DOMAIN.up.railway.app/tools/alpine:3
docker push YOUR-DOMAIN.up.railway.app/tools/alpine:3

Anonymous pulls and pushes are refused. Deleting manifests through the API is enabled. To free the space they used, run registry garbage-collect /etc/distribution/config.yml from a shell on the service (railway ssh) at a time when nothing is being pushed. Unfinished uploads are purged after 7 days. Set REGISTRY_REDIRECT=false if your clients can't reach the bucket host, and the registry will stream layers itself. To change the password, edit REGISTRY_PASSWORD and redeploy.

Why Deploy Docker Registry on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Docker Registry on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

Bucket

Bucket

More templates in this category

View Template
RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set
S3-compatible object store, keys and public URL preset, volume kept

SuperSlowSloth
0
View Template
TimescaleDB
A PostgreSQL-based time-series database for analytics on Railway.

Rakit
1
View Template
NEW
Neo4j 2026.10 Community
Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

My Projects
0