A Home Assistant integration to monitor your Railway projects, deployments, and usage.
- Credit Balance: Monitor your account credit balance
- Usage Tracking: View current and estimated usage costs
- Projects Overview: Count of active projects
- Teams Count: Number of teams you belong to
- Per-Project Usage: Individual usage sensors for each project
- Deployment Health: Binary sensors indicating deployment status
- API Connection Status: Monitor connectivity to Railway API
- Open HACS in your Home Assistant instance
- Click on "Integrations"
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add
https://github.com/berry-13/railway-haas a custom repository with category "Integration" - Click "Add"
- Search for "Railway" and install it
- Restart Home Assistant
- Download the latest release
- Copy the
custom_components/railwayfolder to yourconfig/custom_components/directory - Restart Home Assistant
- Go to Settings > Devices & Services
- Click + Add Integration
- Search for "Railway"
- Enter your Railway API token
- Go to Railway Account Tokens
- Click "Create Token"
- Choose the appropriate scope:
- Personal Token: Access to your personal projects and teams
- Team Token: Access to a specific team's resources only
- Copy the token and paste it in the Home Assistant configuration
| Entity | Description | Unit |
|---|---|---|
| Credit Balance | Account credit balance | USD |
| Current Usage | Current billing period usage | USD |
| Estimated Usage | Estimated usage for the period | USD |
| Projects | Number of active projects | count |
| Teams | Number of teams | count |
| {Project} Usage | Per-project usage | USD |
| Entity | Description |
|---|---|
| API Connected | Connection status to Railway API |
| {Project} Health | Deployment health status per project |
Railway API has rate limits based on your plan:
- Free: 100 requests per hour
- Hobby: 1,000 requests per hour
- Pro: 10,000 requests per hour
This integration polls every 15 minutes by default (96 requests/day), well within all plan limits.
Test your API token before installing in Home Assistant:
# 1. Clone the repo
git clone https://github.com/berry-13/railway-ha.git
cd railway-ha
# 2. Install dependencies
pip install aiohttp python-dotenv
# 3. Create .env file
cp .env.example .env
# Edit .env and add your Railway API token
# 4. Run the test
python test_connection.py# Install dev dependencies
pip install -r requirements-dev.txt
# Run all tests
pytest
# Run with verbose output
pytest -v -sIf you see authentication errors, your token may have expired or been revoked. Generate a new token and reconfigure the integration.
Some fields like creditBalance and detailed usage may not be available depending on your Railway plan and API permissions. The integration gracefully handles missing data.
MIT License - see LICENSE for details.