Self-Hosting

Export and run your own OpenFacilitator instance.

Export Configuration

  1. Go to your facilitator's manage page
  2. Click Export for Self-Host
  3. Download the configuration package

The export includes:

  • Docker configuration
  • Environment template
  • Your facilitator settings

Docker Setup

# Unzip the export
unzip openfacilitator-export.zip
cd openfacilitator
 
# Copy environment template
cp .env.example .env
 
# Edit .env with your values
nano .env
 
# Start the container
docker-compose up -d

Environment Variables

VariableDescriptionRequired
DATABASE_URLPostgreSQL connection stringYes
EVM_PRIVATE_KEYEVM wallet private keyFor EVM networks
SOLANA_PRIVATE_KEYSolana wallet private keyFor Solana
PORTServer port (default: 3000)No

Never commit private keys to version control. Use environment variables or a secrets manager.

Deploying

Railway

  1. Create a new project on Railway
  2. Connect your repository or upload the export
  3. Add environment variables
  4. Deploy

Vercel

The facilitator server requires a long-running process and is not compatible with Vercel's serverless functions.

DigitalOcean / AWS / GCP

Use the Docker image:

docker pull openfacilitator/server:latest
docker run -d -p 3000:3000 --env-file .env openfacilitator/server:latest

Custom Domain

After deploying, add a CNAME record pointing to your deployment:

TypeNameValue
CNAMEpayyour-deployment.railway.app

See DNS Setup for detailed instructions.

Updating

docker-compose pull
docker-compose up -d

Monitoring

The /health endpoint returns server status:

curl https://pay.yourdomain.com/health
{
  "status": "ok",
  "version": "0.1.0"
}