13 days ago
On Pro, can two services run the same private GHCR image referenced by sha256 without rebuilding? How can the digest actually running on each service be verified? Are there any API/CLI limitations? On Hobby, can a single private native build produce the same artifact in two environments without rebuilding, with digest verification?
2 Replies
Status changed to Awaiting Railway Response Railway • 13 days ago
13 days ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 13 days ago
13 days ago
Yes, on Pro two services can run the same private GHCR image without a rebuild. Image services are never built on Railway; each service pulls the reference you set, so point both services at the same image and add the same GHCR token (read:packages scope) under each service's Settings, Source, Registry Credentials. You can pin by digest: a reference like ghcr.io/org/app@sha256:... is accepted in the dashboard, the CLI (railway service source connect --image ...) and the API (serviceInstanceUpdate with source.image), and it is passed to the pull unchanged.
To verify what is actually running, every successful deployment records the digest the runtime pulled. The deployment's Source card in the dashboard shows a shortened sha, and the full value is in the deployment's meta.imageDigest, which you can read with railway deployment list --json or the public API's deployments query. If both services show the same imageDigest they run the same artifact. There is no single field for "digest across services"; you compare per deployment.
On Hobby, private registry credentials aren't available, so a private image can't be pulled there. Skipped Builds reuses a service's own built image across environments for the same commit and build settings without rebuilding, and the same imageDigest check applies, but that cache is per service and never shared between services.
Status changed to Awaiting User Response Railway • 13 days ago
Status changed to Awaiting Railway Response Railway • 13 days ago
Status changed to Open brody • 13 days ago
