Deploy

Railway

Run the gateway image on Railway with persistent storage and a generated domain.

The Agent Commerce Gateway template runs one service from the gateway image, with a volume at /app/data and a generated domain. Its definition is in deploy/templates/railway/template.md.

  1. Deploy the template

    Open the template, fill in MERCHANT_WALLET and MERCHANT_API_URL, and deploy. The other variables have testnet defaults and are described in the variable reference.

  2. Find the admin token

    ADMIN_TOKEN is generated at deploy time and shown under the service's Variables.

  3. Verify

Railway settings

  • RAILWAY_RUN_UID=0 runs the gateway as root inside its container, letting it write the volume Railway mounts as root. The image otherwise runs as uid 1000.
  • Set the healthcheck path to /health or leave it empty. Railway sends Host: healthcheck.railway.app, which /health accepts and /ready rejects with 403. See Public URL.

Based on: deploy/docs/railway.md