Railway Config Generator
Model a complete Railway service visually and emit a valid railway.json or railway.toml — builder (Nixpacks or Dockerfile), build command, watch patterns and a Nixpacks package plan, plus a full deploy block with start command, healthcheck, restart policy, replicas, region and sleep. A live audit catches the mistakes that silently break deploys, and you can ship a companion nixpacks.toml in the same pass.
About this ToolHow it works, benefits & use casesTap to collapse
Railway reads its build and deploy settings from a railway.json or railway.toml file at your repo root, and this generator models the whole service so you can emit either format from one form. The build half covers the builder (Nixpacks or Dockerfile), a build command, watch patterns that limit rebuilds to changed paths, and an optional Nixpacks package plan for extra system dependencies. The deploy half covers the start command, a healthcheck path and timeout, the restart policy (on failure with a max-retries cap, always, or never), replica count, region, and whether the app sleeps when idle. Five presets cover a Node web service, a Dockerfile service, a worker, a cron-style job, and a static site. A live audit panel flags the mistakes that quietly break deploys, the config regenerates instantly as you type, and you can also emit a companion nixpacks.toml in the same pass.
How to Use
- 1Pick a preset (Node web service, Dockerfile service, Worker, Cron-style, or Static) to prefill a sensible build and deploy block.
- 2Choose the output format with the railway.json / railway.toml toggle.
- 3Set the builder to Nixpacks or Dockerfile; for Dockerfile builds enter the Dockerfile path, otherwise enter a build command.
- 4Optionally add watch patterns and, for Nixpacks, extra system packages plus a companion nixpacks.toml.
- 5Fill in the deploy block: start command, healthcheck path and timeout, restart policy and max retries, replicas, region, and sleep.
- 6Watch the audit panel for warnings, then copy or download the live config for your repo root.
Key Benefits
- Emits valid railway.json or railway.toml from one model with a single toggle
- Full build block: Nixpacks or Dockerfile builder, build command, watch patterns, and a Nixpacks package plan
- Full deploy block: start command, healthcheck, restart policy with max retries, replicas, region, and sleep
- Built-in audit flags ignored Nixpacks plans, missing healthcheck slashes, retry-forever policies, and missing start commands
- Five presets covering web, Dockerfile, worker, cron, and static services
- Optional companion nixpacks.toml generated from the same packages and build command
- Pure in-browser generation with live preview, copy, download, and a shareable link
Common Use Cases
- Bootstrapping railway.json for a Node web service with a healthcheck and bounded retries
- Switching a service to Dockerfile-based builds with an explicit Dockerfile path
- Configuring an always-on background worker with no HTTP healthcheck
- Setting up a run-to-completion cron-style job with a NEVER restart policy
- Pinning a service to a region and tuning replicas, sleep, and healthcheck timeouts
Place at your repo root · JSON · updates live
{
"$schema": "https://railway.com/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "npm ci && npm run build"
},
"deploy": {
"startCommand": "npm run start",
"healthcheckPath": "/health",
"healthcheckTimeout": 300,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 3
}
}
Start from a preset
Output format
Build
Auto-detected build — no Dockerfile required
Only rebuild when these paths change.
Extra system packages baked into the build via nixpacksPlan.
Generates a separate nixpacks.toml from your packages + build command.
Deploy
Restart only on a non-zero exit (uses maxRetries)
Railway crons are set in the dashboard; this just notes the intended cadence.
Scale to zero between requests on low-traffic services.
A service model, not a snippet
Railway reads railway.json or railway.toml from your repo root. This builder models the whole service — the build half (Nixpacks or Dockerfile, build command, watch patterns, a Nixpacks package plan) and the deploy half (start command, healthcheck, restart policy, replicas, region, sleep) — and emits valid output in either format live as you edit.
What the audit catches
- A
DOCKERFILEbuilder with a Nixpacks plan set (the plan is ignored). - A
healthcheckPathmissing its leading slash. ON_FAILURErestart with nomaxRetries— Railway retries forever.- A Nixpacks build with no
startCommandto launch the service.
Was this tool helpful?
Share Your Experience
Help others discover this tool!
Related tools
- TOML to JSONConvert TOML to JSON format
- JSON FormatterFormat and validate JSON with syntax highlighting
- Tailwind Config GeneratorVisually build a Tailwind config - theme extend, colors, spacing, fonts, screens, plugins - and export it as a v3 JS config or a v4 @theme CSS block
- Changelog GeneratorGenerate changelog from Git commit history
- Component Name GeneratorTurn a description into ranked, kind-aware component names with a file scaffold and a name validator (casing, collisions, clarity)
- JSON Path FinderFind and test JSON paths
Railway reads either format identically, so the choice is stylistic. JSON suits teams that already template JSON configs; TOML is more readable and comment-friendly. The generator produces the same settings in both and names the download railway.json or railway.toml to match your toggle.
It flags the mistakes that silently break deploys: a Dockerfile builder with a Nixpacks plan set (the plan is ignored), a healthcheck path missing its leading slash, an ON_FAILURE restart policy with no maxRetries (Railway then retries forever), and a Nixpacks build with no start command. It also notes cron jobs that still have a healthcheck and odd sleep-plus-replicas combinations.

