a month ago
Hello Railway team,
We need a supported, safe deployment/recovery workflow before activating finance and private Telegram-photo features in our internal CRM. Our account is on Hobby. We are preparing EEA-only storage and a recovery rehearsal on an existing, currently stopped, non-production service. This request contains no credentials, customer data or private project identifiers.
- Recover the exact deployment after a lost response.
With Railway CLI 5.49.3, railway up uploads and initiates deployment before the client receives the deployment ID. If the response is lost, repeating the upload may create another deployment. Is there a supported client-provided idempotency key, held/prepared deployment, or authenticated lookup using an exact upload/source fingerprint and service/environment that recovers that specific deployment without resubmitting? Please provide the documented command/API arguments. We do not want to identify it merely as the latest deployment.
- Bound and stop a temporary recovery run.
Once the exact deployment is identified, how can we cancel both queued activation and running/restarted instances, and confirm that no late activation remains? Is an absolute expiry/lease supported, or what is the recommended equivalent workflow for a temporary run limited to 60 minutes? We have reviewed deploymentCancel/stop/remove; these require the known deployment ID. Configuration skipDeploys and config ETag checks do not by themselves resolve a lost upload response.
- Preserve the original stopped service.
What supported snapshot/image/config retention and restore procedure preserves the original image, settings and environment configuration and returns the service to its originally stopped state after the rehearsal? Please clarify Hobby retention limits and whether restoring a configuration/image can itself start a deployment. We are not asking you to change or start the service.
- PostgreSQL certificate trust.
A separate verified-TLS PostgreSQL client connection fails with SELF_SIGNED_CERT_IN_CHAIN before any SQL query. For a Railway PostgreSQL template using a public TCP endpoint, what is the supported way for an authenticated owner to retrieve the currently configured public CA/server certificate, verify its service provenance, and determine the correct certificate hostname? We will not disable certificate/hostname verification, request private keys, or trust an unauthenticated first-seen certificate. If this needs template-side certificate configuration rather than a Railway-issued bundle, please specify the supported approach.
Please confirm which capabilities exist today and recommend a practical supported alternative where a feature is unavailable. No trial deployment, new resource, paid upgrade or production change is requested. If account-specific metadata is needed, please tell us how to provide it privately.
Thank you.
5 Replies
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
railway up has no client-provided idempotency key, no held or prepared deployment mode, and no lookup by upload fingerprint. The supported option is to tag each upload with railway up -m "<unique-token>". That message is saved on the deployment, so you can match the exact deployment in the service's deployment list without taking the latest one.
Deployments have no expiry or lease setting. Once you have the deployment ID, cancel it while it is queued or building, and stop or remove it once it is running. The 60-minute limit has to come from your own tooling.
There is no restore that only touches configuration. Rollback and redeploy both create and start a new deployment from an earlier snapshot, and a rollback is only offered while that build image is still retained. Restoring will therefore start the service, so you would need to stop it again afterwards to get back to a stopped state.
Our Postgres SSL template generates a self-signed server certificate inside the container, valid for 820 days by default (set by SSL_CERT_DAYS). We don't issue a CA bundle for it. To get a chain your clients can verify, give the database a certificate you issue yourself, which includes the public proxy hostname, through the template's configuration.
Status changed to Awaiting User Response chandrika • about 1 month ago
a month ago
Thank you for the clarification. We understand that deployment messages are correlation markers, not idempotency keys, and that Railway provides no deployment expiry/lease or configuration-only rollback. Private PostgreSQL certificate trust has now been verified, so the remaining questions concern recovery only.
-
Which exact API metadata field contains the nonempty CLI --message value, and what authenticated paginated query can enumerate matching deployments, including delayed/deleted entries? We must reconcile one issued upload without resubmitting or selecting the latest deployment.
-
After Cancel for queued/building or Stop for running, which exact state/query proves terminal cancellation and absence of a late restart or successor? We are not asking for an availability guarantee during an outage; we need the documented confirmation semantics.
-
For our existing stopped Hobby rehearsal service, what is the exact retained-image lifetime and supported way to preserve the original source/image plus full build/deploy configuration before any rehearsal? Is retention reservable, or must the image be preserved separately? Please distinguish eligibility for rollback from guaranteed retention.
No service activation, new resource, plan upgrade, customer data or production modification is requested.
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
The public API lists a service's deployments with the deployments query, which takes a DeploymentListInput (projectId, serviceId, environmentId) and a first page size, and you can read any single deployment with deployment(id), which returns its meta object along with status, canRedeploy and canRollback. To find the deployment tagged with your -m value, page through deployments for that service and environment and compare against each deployment's meta. The Manage Deployments guide has the exact queries, and you can try them in GraphiQL.
For confirmation, the documented deployment statuses are QUEUED, WAITING, BUILDING, DEPLOYING, SUCCESS, FAILED, CRASHED, SLEEPING, SKIPPED and REMOVED. deploymentCancel applies to queued or building deployments, and deploymentStop / deploymentRemove apply once it is running. To check the result, re-query that deployment's status and list the service's deployments again to confirm no newer entry exists.
On Hobby, an image is kept for 72 hours after its deployment is removed. Within that window, rollback restores that deployment's image, settings and all variables as a new deployment. After it, rollback is no longer offered, and redeploy rebuilds from the original source with the original variables (image retention policy). canRollback on a deployment tells you whether rollback is available right now. The retention window is how long the image is kept, not a guarantee that rollback will stay available beyond it. Both rollback and redeploy create a new deployment, so the service starts and has to be stopped again afterwards.
Status changed to Awaiting User Response Railway • about 1 month ago
Railway
The public API lists a service's deployments with the `deployments` query, which takes a `DeploymentListInput` (projectId, serviceId, environmentId) and a `first` page size, and you can read any single deployment with `deployment(id)`, which returns its `meta` object along with `status`, `canRedeploy` and `canRollback`. To find the deployment tagged with your `-m` value, page through `deployments` for that service and environment and compare against each deployment's `meta`. The [Manage Deployments guide](https://docs.railway.com/integrations/api/manage-deployments) has the exact queries, and you can try them in [GraphiQL](https://railway.com/graphiql). For confirmation, the documented deployment statuses are QUEUED, WAITING, BUILDING, DEPLOYING, SUCCESS, FAILED, CRASHED, SLEEPING, SKIPPED and REMOVED. `deploymentCancel` applies to queued or building deployments, and `deploymentStop` / `deploymentRemove` apply once it is running. To check the result, re-query that deployment's status and list the service's deployments again to confirm no newer entry exists. On Hobby, an image is kept for 72 hours after its deployment is removed. Within that window, rollback restores that deployment's image, settings and all variables as a new deployment. After it, rollback is no longer offered, and redeploy rebuilds from the original source with the original variables ([image retention policy](https://docs.railway.com/pricing/plans#image-retention-policy)). `canRollback` on a deployment tells you whether rollback is available right now. The retention window is how long the image is kept, not a guarantee that rollback will stay available beyond it. Both rollback and redeploy create a new deployment, so the service starts and has to be stopped again afterwards.
a month ago
Thank you. The documented Hobby retention of 72 hours after removal is clear; we understand that rollback starts a new deployment and canRollback is only current eligibility.
Please have a support engineer clarify the two remaining API details:
-
What is the exact JSON key in deployment.meta for a CLI --message tag? Please provide a complete authenticated cursor-paginated query, including cursor/pageInfo and how deleted or delayed deployments are represented. The linked guide shows first and edges only, without the tag key or a continuation cursor. We will not upload a test or assume a zero/capped result means nothing was accepted.
-
After deploymentCancel or deploymentStop, which exact fields and values attest that this same deployment is terminally stopped and cannot activate or restart later? Is deploymentStopped the relevant field? A list containing no newer deployment does not rule out an older accepted upload that is still invisible or queued. Please distinguish Stop from Remove history.
We are not asking for an outage availability guarantee, a new service, plan upgrade, SQL access or production changes. We need the supported observation contract before attempting the existing recovery rehearsal.
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
The deployments query is cursor-paginated: pass first and after, request pageInfo { hasNextPage endCursor }, and keep passing endCursor as after until hasNextPage is false. Add meta to the node fields alongside id, status and createdAt, and match your -m token against the returned meta object. The GraphQL overview has the full paginated deployments query, and you can inspect the Deployment type and the shape of meta in the Docs panel of GraphiQL. We can't give you a separate documented guarantee for the meta key name beyond what the schema returns, so read it from a real deployment's meta rather than hard-coding one from us.
For confirmation, the documented signal is the deployment's own status, re-queried by ID with deployment(id). The documented statuses include REMOVING (being removed) and REMOVED (removed). We don't publish a separate field or attestation that a stopped or removed deployment can never activate again, and listing deployments is not a completeness guarantee, so a page with no newer entry can't prove that no other accepted upload exists. Your own -m token matched against the full paginated list is the supported way to tie a deployment back to one upload.
Status changed to Awaiting User Response brody • about 1 month ago
a month ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • about 1 month ago