Skip to content
Production pre-deploy command preservation before December 1 cutoff
jonbeckstead42
OP

6 hours ago

Hello Railway Support,

I'm seeking time sensitive technical guidance regarding the December 1, 2026 retirement of legacy railway.json configuration.

Our production service depends on a pre-deploy database migration command. The Railway dashboard currently displays the correct command under Settings → Deploy, but explicitly states:

"The value is set in /railway.json."

I need to ensure this command remains available for future deployments after Railway stops honoring the legacy configuration file.

What we've verified

  • The existing production deployment is running normally.
  • The production dashboard displays the correct pre-deploy command, sourced from railway.json.
  • Our separate preview environment has the correct command independently stored in its environment configuration, according to Railway's Agent.
  • In production, we cannot determine whether the same command is independently stored beneath the file override.
  • Railway's built in Agent attempted two read-only production configuration requests, but both returned "Access denied to this environment."
  • No configuration changes, deployments, or migrations have been performed during this investigation.

Questions for Railway Support

  1. Stored configuration: How can I confirm whether deploy.preDeployCommand is independently persisted in production rather than merely inherited from railway.json?

  2. Read-only verification: Is there an officially supported way to inspect the stored value beneath a configuration file override without creating API tokens or granting additional permissions?

  3. No deployment preservation: If the command is not independently stored, what is the supported method to preserve it before December 1 without triggering a production deployment?

  4. Environment isolation: Would a configuration only update affect other services, unrelated staged changes, or environments that inherit configuration?

  5. Agent access: Is "Access denied to this environment" expected when Railway's Agent attempts to inspect production?

  6. Post-cutoff behaviour: After December 1, will an independently stored pre-deploy command automatically take effect when legacy railway.json is no longer honoured?

  7. Engineering confirmation: A related Central Station discussion mentions serviceInstanceUpdate as a possible preservation method, but Railway's bot could not confirm whether it triggers a deployment. Can a Railway team member confirm a supported procedure that avoids deployment?

Important constraints

I am requesting procedural guidance only.

Please do not modify the service, change credentials, initiate a deployment, execute database migrations, or alter any environments.

Because this command controls production database migrations, I need to establish the safest supported procedure before making any changes.

Thank you for your assistance.

Awaiting User Response

1 Reply

Railway
BOT

6 hours ago

The production service's stored settings that we can read do not include a pre-deploy command, so the migration command there is currently coming only from /railway.json. Your preview environment's stored command doesn't carry over to production.

After 2026-12-01, deploys won't fail. We just stop reading the file, and the service's own settings take over. Anything set only in the file, including this pre-deploy command, stops applying unless it has been copied into the service settings first.

To keep it, set the same command directly on the production service. You can do this in the service's Settings or with the public API serviceInstanceUpdate mutation, which accepts preDeployCommand (and preDeployTimeoutSeconds). Then remove the file or clear the service's Railway Config File setting. Until the cutoff the file keeps overriding the stored value, so setting it now doesn't change what runs today. On any deployment's details page, settings that came from a config file are marked with a file icon, so after the change you can see which source a deploy used.

We can't confirm whether applying that settings change starts a deployment in your setup. Since this command runs production migrations, please make the same change in your preview environment first and watch whether a deploy is triggered before you rely on it in production. Config as Code deprecation details and the CLI migration path are in our docs.


Status changed to Awaiting User Response Railway • about 6 hours ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...