[← All integrations](/getting-started)

Install · Verified

# Railway

static shell

Railway's Nixpacks builder auto-detects the canonical Dockerfile. CLI or dashboard env vars; Railway encrypts everything by default.

**Start here first.** Every platform recipe below assumes the canonical Express + Docker install at [/install/express-docker](/install/express-docker). The snippets on this page are the platform-specific deltas on top of that baseline.

Railway's Nixpacks builder auto-detects the canonical `Dockerfile` in the repo root. Set variables via the CLI (or the dashboard); Railway encrypts everything by default.

terminalcopy

```
# 1. Connect repo (Railway auto-detects the Dockerfile via Nixpacks).
railway init
railway link

# 2. Secrets — Railway treats every variable as encrypted.
railway variables set AGENTSITE_TOKEN=asit_xxxxxxxxxxxx
railway variables set AGENTSITE_SITE=https://yoursite.com
railway variables set DIST_DIR=/dist

# 3. Deploy.
railway up
```

**Don't deploy as a Railway "static site."** Railway has a static-deploy mode that skips the runtime — use the regular service deploy that runs your Dockerfile.

[← All integrations](/getting-started#by-hand)  ·  [Need help with this recipe? →](/contact)

Cookies

We use cookies to make this site work and to understand how it's used. [Learn more](https://www.cookiesandyou.com/)

Decline Got it