Railway

Deploy railway-image-updater

Trigger multiple docker deployments for a new docker image tag.

Deploy railway-image-updater

Just deployed

Deploy and Host railway-image-updater on Railway

Railway Image Updater is a lightweight Go service that automatically updates Docker image tags across multiple Railway services in a single API call. Add one step to your CI/CD pipeline and every service sharing an image — web, worker, cron — gets updated and redeployed together.

About Hosting railway-image-updater

Railway Image Updater runs as a small HTTP service inside your Railway project. It exposes a single PUT /update endpoint that your CI/CD pipeline calls after building a new Docker image. The service queries Railway's API to find all services whose image matches any of the provided prefixes, updates each one to the new tag, preserves replica counts, and triggers a deployment — all in one request. Configuration is minimal: set your RAILWAY_API_TOKEN and optionally provide private registry credentials. A /health endpoint is included for readiness probes.

Common Use Cases

  • Deploying worker and cron services that must run the same image version as the web application
  • Rolling out a new release across multiple microservices that share a base image
  • Automating post-build deployments from GitHub Actions, GitLab CI, or any CI/CD system

Dependencies for railway-image-updater Hosting

  • A Railway API token with access to the target project
  • A CI/CD pipeline or automation tool that can send HTTP requests after building a new image

Deployment Dependencies

  • A Railway project with one or more services using Docker images you want to keep in sync
  • Railway CLI (optional, for local development and testing)

Implementation Details

Endpoint: PUT /update

Request body:

{
  "project_id": "550e8400-e29b-41d4-a716-446655440000",
  "environment_id": "4a744664-7c0a-4806-8cae-a07c6868179c",
  "image_prefixes": ["docker.io/myorg/myapp"],
  "new_version": "v1.2.3"
}
FieldTypeDescription
project_idUUIDYour Railway project ID
environment_idUUIDThe environment to update (e.g. production, staging)
image_prefixesstring[]Image name prefixes to match — any service whose image starts with one of these will be updated
new_versionstringThe new image tag to apply (e.g. v1.2.3, sha-abc123)

Response:

{
  "message": "Successfully updated 2 service(s)",
  "updated_services": ["api", "worker"]
}

Example CI/CD step (GitHub Actions):

- name: Update Railway services
  run: |
    curl -X PUT https://your-updater.railway.app/update \
      -H "Content-Type: application/json" \
      -d '{
        "project_id": "${{ vars.RAILWAY_PROJECT_ID }}",
        "environment_id": "${{ vars.RAILWAY_ENV_ID }}",
        "image_prefixes": ["docker.io/myorg/myapp"],
        "new_version": "${{ github.sha }}"
      }'

Environment variables:

VariableRequiredDescription
RAILWAY_API_TOKENYesRailway API token
PORTNoServer port (default: 8080)
RAILWAY_DOCKER_REGISTRY_USERNoUsername for private Docker registries
RAILWAY_DOCKER_REGISTRY_TOKENNoToken/password for private Docker registries

Source: github.com/returnearly/railway-image-updater

Why Deploy railway-image-updater 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 railway-image-updater 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

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
View Template
Prefect [Updated Mar ’26]
Prefect [Mar ’26] (ETL & Automation alternative to Airflow) Self Host

shinyduo