
Railway
- 120 installs
- 262 repo stars
- Updated July 11, 2026
- hoodini/ai-agents-skills
Deploy and manage containerized applications on Railway, including databases, private networking, and railway.toml/nixpacks configuration.
About
Documents deploying apps to Railway via the CLI with railway.toml and nixpacks build/deploy configuration. A developer uses it when deploying containers, databases, or services on Railway.
- railway init/up CLI workflow
- railway.toml and nixpacks.toml build, deploy, and healthcheck config
Railway by the numbers
- 120 all-time installs (skills.sh)
- +5 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #517 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/hoodini/ai-agents-skills --skill railwayAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 120 |
|---|---|
| repo stars | ★ 262 |
| Last updated | July 11, 2026 |
| Repository | hoodini/ai-agents-skills ↗ |
What it does
Deploy and manage containerized applications on Railway, including databases, private networking, and railway.toml/nixpacks configuration.
Files
Railway Deployment
Deploy and manage applications on Railway's platform.
Quick Start
# Install Railway CLI
npm i -g @railway/cli
# Login
railway login
# Initialize project
railway init
# Deploy
railway uprailway.toml Configuration
[build]
builder = "nixpacks"
buildCommand = "npm run build"
[deploy]
startCommand = "npm start"
healthcheckPath = "/health"
healthcheckTimeout = 300
restartPolicyType = "on_failure"
restartPolicyMaxRetries = 3
[service]
internalPort = 3000Nixpacks Configuration
# nixpacks.toml
[phases.setup]
nixPkgs = ["nodejs-18_x", "python311"]
[phases.install]
cmds = ["npm ci"]
[phases.build]
cmds = ["npm run build"]
[start]
cmd = "npm start"Environment Variables
# Set variable
railway variables set DATABASE_URL="postgres://..."
# Set from file
railway variables set < .env
# Link to service
railway service
railway variables set API_KEY="secret"Database Services
PostgreSQL
# Add PostgreSQL
railway add -d postgres
# Get connection string
railway variables get DATABASE_URLRedis
railway add -d redis
# Access via REDIS_URLMySQL
railway add -d mysql
# Access via MYSQL_URLPrivate Networking
# Services can communicate via internal DNS
# Format: ${{service-name}}.railway.internal
# Example: API calling database service
DATABASE_HOST: ${{postgres.railway.internal}}
DATABASE_PORT: 5432Volumes (Persistent Storage)
# Create volume
railway volume create my-data
# Mount in service
railway volume attach my-data:/app/dataIn code:
// Data persists across deploys
const dataPath = '/app/data';
fs.writeFileSync(`${dataPath}/file.json`, JSON.stringify(data));Cron Jobs
# railway.toml
[deploy]
startCommand = "node cron.js"
cronSchedule = "0 */6 * * *" # Every 6 hoursMulti-Service Setup
my-project/
├── api/
│ ├── railway.toml
│ └── ...
├── worker/
│ ├── railway.toml
│ └── ...
└── frontend/
├── railway.toml
└── ...Deploy each:
cd api && railway up
cd ../worker && railway up
cd ../frontend && railway upDockerfile Deploy
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["npm", "start"]# railway.toml
[build]
builder = "dockerfile"
dockerfilePath = "./Dockerfile"Health Checks
// Express health endpoint
app.get('/health', (req, res) => {
res.status(200).json({
status: 'healthy',
timestamp: new Date().toISOString()
});
});# railway.toml
[deploy]
healthcheckPath = "/health"
healthcheckTimeout = 100Resources
- Railway Docs: https://docs.railway.app
- Railway CLI: https://docs.railway.app/develop/cli