1001Ferramentas
🚂Dev

railway.toml Generator

Generate a railway.toml with build, start and healthcheck settings ready for your Railway deploy. Configure it in the browser and drop it in your repo.



  

railway.toml for build, start and healthcheck

Railway lets you configure everything from the dashboard, but then the configuration lives outside your repository: nobody reviews it in a pull request and every new environment drifts a little. railway.toml keeps the build step, the start command and the healthcheck versioned next to the code. This page gives you one already filled in with Nixpacks, npm run build, npm start and a restart policy.

The output is fixed and there is no form: the text appears when the page loads and the button just prints it again. The detail that matters is precedence. Whatever sits in railway.toml wins over what you set in the dashboard, so once you commit this file, changing the start command through the interface stops having any effect. That catches plenty of people on a first deploy.

Before committing, make sure a /health route exists and answers 200. If it does not, Railway waits out the 100 second healthcheckTimeout, marks the deploy as failed and keeps the previous version live. If your project has no build step, delete buildCommand instead of leaving an npm run build that does not exist. With a Dockerfile at the root, switch the builder to DOCKERFILE. The file is assembled in your browser.

Frequently asked questions

Is healthcheckTimeout in seconds or milliseconds?
Seconds. The value 100 gives your app a bit over a minute and a half to start answering on the configured path.
Can I edit the commands inside the tool itself?
No, the block is fixed. Copy it and adjust buildCommand and startCommand to the scripts that actually exist in your package.json.
What is the difference between NIXPACKS and DOCKERFILE?
With NIXPACKS, Railway detects your stack and builds the image for you. With DOCKERFILE it uses your Dockerfile and skips the automatic detection.

Related Tools