Architecture

Distributed vs Single-Node Cloud

Distributed vs Single-Node Cloud

Rejourney supports two official self-hosted deployment shapes:

  • Single-node Docker Compose for one server or VPS
  • Distributed K3s for production clusters and horizontal scaling

Both now use the same core backend model:

  • storage endpoints are database-backed
  • ingest uploads go through the backend-owned upload relay
  • workers process verified artifacts
  • replay visibility is artifact-driven

Feature Comparison

FeatureDistributed CloudSingle-Node Cloud
PlatformK3sDocker Compose
ScaleMulti-nodeSingle-node
Public entrypointsTraefik ingressTraefik container
Upload pathAPI + ingest-upload serviceAPI + ingest-upload service
Storage source of truthstorage_endpoints tablestorage_endpoints table
Default object storageExternal S3Built-in MinIO
External S3 supportYesYes
Secret encryptionSTORAGE_ENCRYPTION_KEYSTORAGE_ENCRYPTION_KEY
Update flowk8s deploy + jobsdeploy.sh update

Shared Storage Model

In both deployment models, runtime storage configuration comes from Postgres, not from an env fallback.

That means:

  • the active object storage endpoint is stored in storage_endpoints
  • secret access keys are encrypted into key_ref
  • runtime reads the database row
  • bootstrap/install scripts are responsible for syncing .env input into the database row

This makes self-hosted Docker much closer to prod and local-k8s than the old fallback model.


When to Choose Single-Node Docker Compose

Choose Docker Compose when:

  • you are deploying to one VPS or bare-metal host
  • you want the fastest install path
  • you want built-in MinIO by default
  • you do not need multi-node scaling or Kubernetes operations

Official entrypoints:

  • docker-compose.selfhosted.yml
  • scripts/selfhosted/deploy.sh
  • docs/selfhosted/README.md

When to Choose Distributed K3s

Choose K3s when:

  • you need multiple nodes
  • you want Kubernetes-native ops and secret handling
  • you want to scale API, upload, and worker services independently
  • you want rolling deploys and stronger infra isolation

The K3s path lives under k8s/ and scripts/k8s/.


Operational Difference

The main difference is not data model anymore. It is operational shape:

  • Compose: one machine, one Docker network, one operator script
  • K3s: multiple pods, namespaces, cluster ingress, Kubernetes jobs and secrets

Practical Guidance

Start with single-node Compose if you want to self-host quickly.

Move to K3s when you need:

  • more throughput
  • rolling cluster deploys
  • horizontal scaling
  • more resilient infrastructure separation