sincecutoff.com
← all changes

railway config commands manage project infrastructure as code

Introduced 2026-06-05 · score 0.97

HOW TO USE IT

When managing Railway infrastructure from a repository, create `.railway/railway.ts` or import the linked project, then preview and apply its changes. Migrate services managed by `railway.json` or `railway.toml` before planning configuration changes.

railway config init
railway config pull
railway config plan && railway config apply --yes

WHY THIS HELPS

When managing Railway infrastructure from a repository, create or import `.railway/railway.ts`, preview its changes, and apply them.

BEFORE THIS CHANGE

The `railway config` commands were not available.

REQUIREMENTS AND LIMITATIONS

  • Version: v5.2.0
  • --yes: Apply without prompting for confirmation.
  • Prerequisite: Install the Railway CLI; authenticate and link the current directory to the Railway project and environment. If unlinked, `pull` and `plan` prompt for a project and environment.
  • Prerequisite: Install the TypeScript SDK from the repository root with `npm install railway`.
  • `railway config plan` is safe and does not change Railway.
  • `railway config apply` asks before applying unless `--yes` is passed.
  • `railway up` deploys this directory when the service has no GitHub or image source.
  • Services already managed by `railway.json` or `railway.toml` must be migrated before `.railway/railway.ts` can manage them.
  • Advanced placement can still specify region names.
  • Secrets imported from Railway may be omitted or represented with `preserve()` so they are not overwritten.
  • Docs conflict: Current CLI documentation says `railway up` behavior is unchanged, while the supplied release note says it previews pending configuration changes and asks before applying them. https://github.com/railwayapp/cli/blob/master/assets/iac/README.md
  • Docs conflict: The current TypeScript SDK documentation requires Railway CLI 5.42.1 or newer, which differs from the card's stated v5.2.0. https://github.com/railwayapp/railway-ts-sdk

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card