Self-Hosting
Run Moneyline on your own infrastructure.
Docker Compose (Recommended)
The fastest way to get a full Moneyline stack running.
Prerequisites
- Docker Engine 24+
- Docker Compose v2
- 4GB+ RAM
Quick Start
git clone https://github.com/moneyline/moneyline.git
cd moneyline/deploy/docker
cp .env.example .env
# Edit .env with your configuration
docker compose up -dThis starts:
- API — Node.js API server (port 3000)
- ML — Python ML service (port 8000)
- Dashboard — Next.js dashboard (port 3001)
- Supabase — PostgreSQL + Auth + Storage (ports 54321-54322)
- Redis — Cache + rate limiting (port 6379)
- Inngest — Background job processing (port 8288)
Development Mode
docker compose -f docker-compose.dev.yml up -dEnables hot reload for API, ML, and dashboard services.
Kubernetes
Prerequisites
- Kubernetes 1.28+
kubectlconfigured- Ingress controller (nginx-ingress recommended)
Deploy
cd deploy/k8s
# Create namespace
kubectl apply -f namespace.yaml
# Deploy services
kubectl apply -f deployment-api.yaml
kubectl apply -f deployment-ml.yaml
kubectl apply -f service.yaml
kubectl apply -f ingress.yamlConfiguration
Set environment variables via ConfigMap or Secrets:
apiVersion: v1
kind: Secret
metadata:
name: moneyline-secrets
namespace: moneyline
data:
DATABASE_URL: <base64-encoded>
API_KEY_ENCRYPTION_KEY: <base64-encoded>
BETTER_AUTH_SECRET: <base64-encoded>
R2_ACCESS_KEY_ID: <base64-encoded>
R2_SECRET_ACCESS_KEY: <base64-encoded>Single Binary
For simple deployments, the API can run as a standalone Bun process:
# Install deps (workspace-aware)
bun install
# Run migrations
bun run db:migrate
# Build + start
bun run turbo build --filter @moneyline/api
bun apps/api/dist/server.jsRequires an external PostgreSQL database, Redis instance, and an S3-compatible object store (Cloudflare R2, AWS S3, Backblaze B2, or MinIO).
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | Yes | — | PostgreSQL connection string |
REDIS_URL | No | redis://localhost:6379 | Redis connection string |
BETTER_AUTH_SECRET | Yes | — | 32+ char secret (openssl rand -base64 32) |
BETTER_AUTH_URL | No | http://localhost:3000 | Base URL of the API |
BETTER_AUTH_TRUSTED_ORIGINS | No | localhost | Comma-separated origin allowlist |
API_KEY_ENCRYPTION_KEY | Yes | — | 32-char encryption key |
R2_ENDPOINT | Yes | — | S3-compatible endpoint (e.g. R2 account URL) |
R2_ACCESS_KEY_ID | Yes | — | Object storage access key |
R2_SECRET_ACCESS_KEY | Yes | — | Object storage secret |
R2_DOCUMENTS_BUCKET | No | moneyline-documents | Docs bucket |
R2_EXPORTS_BUCKET | No | moneyline-exports | Exports bucket |
PORT | No | 3000 | API server port |
HOST | No | 0.0.0.0 | API server host |
LOG_LEVEL | No | info | Log level (debug, info, warn, error) |
CORS_ORIGIN | No | * | CORS allowed origins |
Health Check
curl http://localhost:3000/v1/healthReturns:
{
"status": "ok",
"version": "0.1.0",
"services": {
"database": "connected",
"redis": "connected",
"ml": "connected"
}
}MCP Server
Moneyline ships a [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes 45 tools and 5 resources, so an agent can author and run workflows, not just read data.
Migration from Heron Data
Moneyline is a drop-in replacement for Heron Data's transaction enrichment API. This guide maps Heron endpoints to Moneyline equivalents.