Skip to content
Preserving current credentials during image recovery + unexpected no-deploy behavior
afezzani-shams
OP

16 days ago

Hello Railway team,

I'm using the Hobby plan and preparing a controlled Node.js runtime upgrade for a production API.

I found the discussion “Reuse a previous deployment image while preserving current environment variables” (https://station.railway.com/questions/reuse-a-previous-deployment-image-while-6d44a70d?utm_source=chatgpt.com), where a Railway employee clarified that:

  • Redeploy rebuilds from historical source while using current service variables.
  • Rollback restores the previously built image together with its historical custom variables.
  • The dashboard does not offer an action combining an older stored image with current variables.

Thank you for that clarification.

I have two remaining questions.

1. Recovering a previous image while preserving current credentials

Is there any officially supported method, outside the dashboard if necessary, to restore a retained previous Docker image while preserving the current production environment variables?

If not, is rebuilding the previous source revision with current variables the recommended recovery approach when credentials have been rotated?

2. Unexpected deployment during a no-deploy configuration commit

We staged two service-setting changes: removing a legacy custom build command and adding a healthcheck path.

We attempted to save them without deployment using Railway's documented Alt-click Deploy procedure. However, a new build and deployment attempt started without a confirmation screen.

We immediately aborted it. The original production deployment remained active, and the settings appear to have been saved.

Is the Alt-click behavior still officially supported? Is there a more reliable method to commit staged configuration changes without triggering a deployment?

We're looking for guidance to establish a safe and repeatable production release procedure.

Please do not modify, restart, redeploy or change any service configuration on our behalf.

Thank you for your assistance.

Solved

3 Replies

Railway
BOT

16 days ago

On the first question, the two documented actions work as you described: Rollback restores the previous Docker image together with that deployment's custom variables, and Redeploy creates a new deployment from the selected deployment's source using the current service variables. When credentials have been rotated since the older deployment, redeploying that older source revision is the way to run older code with your current variables. Before you start, you can open the older deployment and expand the variables section on its Details tab to compare the values it ran with against your current set.

On the second question, holding Alt while clicking Deploy on the staged changes banner is still the documented way to commit changes without triggering a redeploy. The keyboard shortcuts page also lists Alt+Shift+Enter to commit staged changes without triggering deploys. A keyboard shortcut may give you a more repeatable step than the modified click. We have not determined from this thread why your Alt-click started a build. Also, per the staged changes caveats, networking changes are not staged and apply immediately.


Status changed to Awaiting User Response Railway • 16 days ago


Railway

On the first question, the two documented actions work as you described: Rollback restores the previous Docker image together with that deployment's custom variables, and Redeploy creates a new deployment from the selected deployment's source using the current service variables. When credentials have been rotated since the older deployment, redeploying that older source revision is the way to run older code with your current variables. Before you start, you can open the older deployment and expand the variables section on its Details tab to compare the values it ran with against your current set. On the second question, holding Alt while clicking Deploy on the staged changes banner is still the documented way to commit changes without triggering a redeploy. The [keyboard shortcuts page](https://docs.railway.com/overview/keyboard-shortcuts) also lists `Alt+Shift+Enter` to commit staged changes without triggering deploys. A keyboard shortcut may give you a more repeatable step than the modified click. We have not determined from this thread why your Alt-click started a build. Also, per the [staged changes caveats](https://docs.railway.com/deployments/staged-changes), networking changes are not staged and apply immediately.

afezzani-shams
OP

16 days ago

Thank you for the response.

Unfortunately, our main concerns remain unresolved.

  1. Is there any officially supported method, including an API or CLI operation, to restore a retained previous image while preserving current environment variables? If not, please confirm explicitly.

  2. The documented Alt-click procedure triggered an actual deployment attempt on our Production service. We are not comfortable trying another keyboard shortcut without understanding why this occurred.

Could a Railway engineer review this behavior and clarify the safest supported procedure?

Our Production service is currently healthy. Please do not perform any changes on our behalf.

Thank you.


Status changed to Awaiting Railway Response Railway • 16 days ago


Railway
BOT

16 days ago

On the first question, the supported actions remain the two already described: Rollback restores the earlier image together with that deployment's variables, and Redeploy rebuilds the earlier source with your current variables. We have not verified an API or CLI operation that combines an older stored image with your current variables, so for a release procedure where credentials have rotated, rebuilding the previous source revision with current variables is the path we can point you to.

On the second question, our records for your workspace show the staged changes were committed at 18:45 UTC today, and a new deployment started about two seconds later, which you then cancelled. That matches what you saw: the settings were saved and a deployment attempt followed. We have not established why the commit triggered a deployment when you used the no-deploy option, so we cannot yet tell you that the Alt-click or the Alt+Shift+Enter shortcut will reliably avoid a deploy for build and healthcheck setting changes. Given that, we would not rely on either for Production until the cause is understood.

We have made no changes to your services.


Status changed to Awaiting User Response Railway • 16 days ago


Railway
BOT

9 days 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 • 9 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...