Deploy Your Adapter on Railway
This guide explains how to encode your adapter configuration and deploy it to Railway.
Step 1: Get Your Configuration
From the previous steps in this guide, you should already have a JSON configuration file for your adapter. It looks something like this:
{
"chainArch": "evm",
"flushInterval": "1h",
"redisUrl": "${env:REDIS_URL}",
"sinkConfig": {
"sinks": [
{
"sinkType": "absinthe",
"apiKey": "${env:ABSINTHE_API_KEY}"
}
]
},
"network": {
"chainId": 1,
"rpcUrl": "${env:RPC_URL}",
"finality": 75
},
"range": {
"fromBlock": 18000000
},
"adapterConfig": {
"adapterId": "your-adapter",
"config": { ... }
}
}Step 2: Convert Configuration to Base64
The configuration needs to be base64 encoded before deploying to Railway.
- Copy your JSON config
- Visit base64encode.org
- Paste your JSON and click encode
- Copy the result
Step 3: Deploy to Railway
Prerequisites
Before deploying, ensure you have:
- ✅ Base64 encoded
INDEXER_CONFIGfrom Step 2 - ✅ RPC URL for your blockchain
- ✅ Absinthe API key from app.absinthe.network/dashboard
- ✅ CoinGecko API key from coingecko.com/api/pricing
Deployment Steps
-
Open Railway Template
- Visit the Railway template
- Sign in or create a Railway account
-
Create New Project
- Click "Deploy" on the template
- Railway will create a new project for you
-
Configure Environment Variables
In Railway, navigate to your project → Variables tab, and add:
Variable Value INDEXER_CONFIGYour base64 encoded config RPC_URLYour RPC endpoint (e.g., https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY)ABSINTHE_API_KEYYour Absinthe API key COINGECKO_API_KEYYour CoinGecko API key -
Deploy
- Click "Deploy" to start the deployment
- Monitor the logs to see the adapter starting
Verifying Deployment
-
Check Railway Logs
- Navigate to your project in Railway
- View logs for messages like "Indexer started", "Processing block X"
-
Verify in Absinthe Dashboard
- Go to app.absinthe.network
- Check your adapter is listed and events are being received
Troubleshooting
| Issue | Solution |
|---|---|
| Invalid base64 encoding | Ensure the entire JSON is encoded as a single string without line breaks |
| Adapter fails to start | Check all 4 environment variables are set correctly |
| Config validation errors | Verify your JSON is valid before encoding |
Quick Reference
INDEXER_CONFIG=<base64_encoded_config>
RPC_URL=<your_rpc_endpoint>
ABSINTHE_API_KEY=<your_api_key>
COINGECKO_API_KEY=<your_cg_key>Useful Links
- 🔄 Base64 Encoder — Convert JSON to base64
- 🚂 Railway Template — Deploy template
- 🔑 Absinthe App Dashboard — Get API key
- 💬 Absinthe Community Slack — Get help