Skip to main content

Self-Hosted Deployment Guide

Operate Relay Protocol entirely within your infrastructure using the guidance below.

Components to Provision

ComponentRecommendation
Application APIKubernetes (Helm chart) or Docker Compose
PostgresSelf-hosted Postgres 14+ with logical replication
RedisRedis 6+ with persistence and monitoring
Object Storage (optional)S3-compatible bucket for artefacts/logs
ObservabilityPrometheus + Grafana, or Datadog/Splunk

Deployment Paths

  1. Docker Compose – Quick start for evaluation.
    docker compose -f docker/docker-compose.yml up --build
  2. Kubernetes (Helm) – Production-grade deployment with overrides.
    helm upgrade --install relay ./helm/relay-protocol \
    --values helm/relay-protocol/values.yaml \
    --values helm/relay-protocol/values.selfhosted.yaml
  3. CI/CD – Use .github/workflows/deploy.yml as a reference for your own pipeline (build → test → deploy).

Configuration Checklist

  • Populate .env with self-hosted secrets (database credentials, Redis URL, JWT signing key).
  • Set DEPLOYMENT_MODE=selfhosted.
  • Enable production logs (JSON_LOGS=true) and configure log shipping.
  • Update observability exporters to your preferred stack.

Hardening Tips

  • Run the quality gates (python3 dev_process/validation/quality_gate_runner.py) in CI.
  • Configure alerts using the runbooks under docs/monitoring/runbooks/.
  • Schedule the performance benchmark workflow to detect regressions.
  • Rerun the zero-trust audit periodically and track history.