n8n-nodes-railway
v1.0.0
Published
A comprehensive n8n community node for Railway's GraphQL API providing 12 resources and 60+ operations for infrastructure management, deployments, and team orchestration.
Maintainers
Readme
n8n-nodes-railway
[Velocity BPA Licensing Notice]
This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).
Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.
For licensing information, visit https://velobpa.com/licensing or contact [email protected].
A comprehensive n8n community node for Railway's GraphQL API, enabling full programmatic management of projects, services, deployments, environments, variables, volumes, and team resources.
Features
- 12 Resource Categories with 60+ operations
- Full CRUD Support for all Railway resources
- GraphQL API Integration with cursor-based pagination
- Multiple Authentication Types (Personal, Team, Project tokens)
- Webhook Trigger Node for real-time event handling
- Dynamic Resource Loading with searchable dropdowns
- Comprehensive Error Handling with retry support
Installation
Community Nodes (Recommended)
- Open n8n
- Go to Settings > Community Nodes
- Click Install
- Enter
n8n-nodes-railway - Click Install
Manual Installation
# Navigate to your n8n installation
cd ~/.n8n
# Install the package
npm install n8n-nodes-railway
# Restart n8nDevelopment Installation
# Clone the repository
git clone https://github.com/Velocity-BPA/n8n-nodes-railway.git
cd n8n-nodes-railway
# Install dependencies
npm install
# Build the project
npm run build
# Link to n8n
mkdir -p ~/.n8n/custom
ln -s $(pwd) ~/.n8n/custom/n8n-nodes-railway
# Restart n8nCredentials Setup
Railway supports three types of API tokens:
| Token Type | Header | Scope | How to Create |
|------------|--------|-------|---------------|
| Personal | Authorization: Bearer <token> | All personal resources | Account Settings > Tokens |
| Team | Team-Access-Token: <token> | All team resources | Team Settings > Tokens |
| Project | Project-Access-Token: <token> | Single project/environment | Project Settings > Tokens |
Creating a Personal Token
- Go to Railway Dashboard
- Click Create Token
- Give it a descriptive name
- Copy the token (shown only once)
Configuring in n8n
- In n8n, go to Credentials
- Click Add Credential
- Search for Railway API
- Select your token type
- Paste your API token
- Click Save
Resources & Operations
Project
| Operation | Description | |-----------|-------------| | Create | Create a new project | | Get | Get project details | | Get Many | List all projects | | Update | Update project settings | | Delete | Delete a project | | Transfer | Transfer project to team | | Get Members | List project members | | Add Member | Add member to project | | Remove Member | Remove member from project |
Service
| Operation | Description | |-----------|-------------| | Create | Create a new service | | Get | Get service details | | Get Many | List all services in project | | Update | Update service settings | | Delete | Delete a service | | Update Instance | Update service instance settings | | Redeploy | Trigger redeployment | | Connect | Connect to GitHub repo | | Disconnect | Disconnect from source | | Get Instance | Get service instance details |
Deployment
| Operation | Description | |-----------|-------------| | Get | Get deployment details | | Get Many | List deployments | | Cancel | Cancel running deployment | | Rollback | Rollback to previous deployment | | Redeploy | Create new deployment from existing | | Restart | Restart deployment | | Get Logs | Get deployment logs | | Get Build Logs | Get build logs |
Environment
| Operation | Description | |-----------|-------------| | Create | Create a new environment | | Get | Get environment details | | Get Many | List environments in project | | Update | Update environment settings | | Delete | Delete an environment | | Duplicate | Duplicate environment with all variables |
Variable
| Operation | Description | |-----------|-------------| | Create | Create a variable | | Get | Get variable value | | Get Many | List all variables | | Update | Update a variable | | Delete | Delete a variable | | Bulk Upsert | Create/update multiple variables | | Copy to Environment | Copy variables to another environment |
Volume
| Operation | Description | |-----------|-------------| | Create | Create a volume | | Get | Get volume details | | Get Many | List volumes in project | | Update | Update volume settings | | Delete | Delete a volume | | Attach | Attach volume to service | | Detach | Detach volume from service |
Domain
| Operation | Description | |-----------|-------------| | Create | Add a custom domain or Railway subdomain | | Get | Get domain details | | Get Many | List domains for service | | Delete | Remove a domain | | Check Status | Check DNS configuration status |
TCP Proxy
| Operation | Description | |-----------|-------------| | Create | Create a TCP proxy | | Get | Get TCP proxy details | | Get Many | List TCP proxies | | Delete | Delete a TCP proxy |
Plugin (Database)
| Operation | Description | |-----------|-------------| | Create | Create a database plugin (PostgreSQL, MySQL, Redis, MongoDB) | | Get | Get plugin details | | Get Many | List plugins in project | | Delete | Delete a plugin | | Restart | Restart plugin instance | | Get Connection String | Get database connection URL |
Team
| Operation | Description | |-----------|-------------| | Get | Get team details | | Get Many | List all teams | | Update | Update team settings | | Get Members | List team members | | Invite Member | Invite user to team | | Remove Member | Remove member from team | | Update Member Role | Change member role |
Usage
| Operation | Description | |-----------|-------------| | Get Project Usage | Get usage metrics for project | | Get Team Usage | Get usage metrics for team | | Get Estimated Bill | Get estimated billing |
Webhook
| Operation | Description | |-----------|-------------| | Create | Create a webhook | | Get | Get webhook details | | Get Many | List webhooks for project | | Delete | Delete a webhook |
Trigger Node
The Railway Trigger node listens for webhook events from Railway:
| Event | Description | |-------|-------------| | DEPLOY_STARTED | Deployment has started | | DEPLOY_COMPLETED | Deployment completed successfully | | DEPLOY_FAILED | Deployment failed | | DEPLOY_CRASHED | Deployment crashed | | SERVICE_CREATED | New service created | | SERVICE_DELETED | Service deleted | | VOLUME_CREATED | New volume created | | VOLUME_DELETED | Volume deleted |
Setting Up Triggers
- Add a Railway Trigger node to your workflow
- Configure Railway API credentials
- Enter your Project ID
- Select the events to listen for
- Activate the workflow
Usage Examples
Deploy on Git Push
1. Railway Trigger (DEPLOY_COMPLETED)
2. IF: Check deployment status
3. Slack: Send notificationEnvironment Variable Sync
1. Schedule Trigger (daily)
2. Railway: Get Many Variables (source env)
3. Railway: Bulk Upsert (target env)Auto-Scale Based on Metrics
1. Railway Trigger (DEPLOY_COMPLETED)
2. HTTP Request: Get metrics
3. IF: Check threshold
4. Railway: Update Instance (numReplicas)Railway Concepts
Projects
Projects are the top-level organizational unit in Railway. They contain services, environments, and configuration.
Services
Services are individual applications or databases within a project. Each service can have multiple instances across environments.
Environments
Environments (e.g., production, staging) provide isolated deployments with their own variables and configurations.
Deployments
Deployments represent a specific version of a service running in an environment.
Plugins
Plugins are managed databases (PostgreSQL, MySQL, Redis, MongoDB) provisioned by Railway.
Error Handling
The node handles Railway-specific errors:
| Error Code | Description | Resolution | |------------|-------------|------------| | UNAUTHORIZED | Invalid or missing token | Check credentials | | NOT_FOUND | Resource doesn't exist | Verify resource ID | | FORBIDDEN | Insufficient permissions | Check token scope | | BAD_USER_INPUT | Invalid parameters | Review input values | | RATE_LIMITED | Too many requests | Wait and retry |
Security Best Practices
- Use Project Tokens for automated workflows scoped to specific projects
- Rotate Tokens Regularly and revoke unused tokens
- Limit Token Scope to minimum required permissions
- Store Credentials Securely using n8n's credential system
- Monitor API Usage via Railway dashboard
Development
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Lint
npm run lint
# Watch mode
npm run devAuthor
Velocity BPA
- Website: velobpa.com
- GitHub: Velocity-BPA
Licensing
This n8n community node is licensed under the Business Source License 1.1.
Free Use
Permitted for personal, educational, research, and internal business use.
Commercial Use
Use of this node within any SaaS, PaaS, hosted platform, managed service, or paid automation offering requires a commercial license.
For licensing inquiries: [email protected]
See LICENSE, COMMERCIAL_LICENSE.md, and LICENSING_FAQ.md for details.
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Support
- Issues: GitHub Issues
- Documentation: Railway API Docs
- n8n Community: n8n Community Forum
