Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Deploy Your Adapter on Railway – Absinthe Docs
Skip to content

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.

  1. Copy your JSON config
  2. Visit base64encode.org
  3. Paste your JSON and click encode
  4. Copy the result

Step 3: Deploy to Railway

Prerequisites

Before deploying, ensure you have:

Deployment Steps

  1. Open Railway Template
  2. Create New Project
    • Click "Deploy" on the template
    • Railway will create a new project for you
  3. Configure Environment Variables

    In Railway, navigate to your project → Variables tab, and add:

    VariableValue
    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
  4. Deploy
    • Click "Deploy" to start the deployment
    • Monitor the logs to see the adapter starting

Verifying Deployment

  1. Check Railway Logs
    • Navigate to your project in Railway
    • View logs for messages like "Indexer started", "Processing block X"
  2. Verify in Absinthe Dashboard

Troubleshooting

IssueSolution
Invalid base64 encodingEnsure the entire JSON is encoded as a single string without line breaks
Adapter fails to startCheck all 4 environment variables are set correctly
Config validation errorsVerify 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