Skip to content

Self-hosting

bytetourist is designed to run on your own infrastructure. Locally, the Go binaries run natively (fast rebuilds) while only the stateful dependencies run in Docker.

  • Go (recent), Docker + Docker Compose, and bun (for the dashboard UI).
  • make tools once, to install the process manager (goreman).
Terminal window
make tools # once: installs the process manager
make dev # docker compose up etcd + redis, then run core/edge/server/ui

make dev brings up the stateful dependencies in Docker, then runs core, edge, server, and the UI natively with aggregated logs. Ctrl-C stops everything.

All four services live in cmd/ and share the same config:

Binary Command
core (proxy) go run ./cmd/core
edge (node) go run ./cmd/edge
scaler go run ./cmd/scaler
server (dashboard API) go run ./cmd/server

Config is per-environment YAML selected by APP_ENV (config/local.yaml, config/prod.yaml), loaded with koanf. Any value can be overridden by an environment variable prefixed with BT_, using __ for nesting:

Terminal window
# override core.listen_addr
BT_CORE__LISTEN_ADDR=":9090" go run ./cmd/core
# override server.default_plan
BT_SERVER__DEFAULT_PLAN="pro" go run ./cmd/server

Secrets (Postgres DSN, CA key, Auth0/Stripe credentials) come from environment variables or a pluggable secret provider — never from the YAML files.

  • Minimal (the URL-fetch path): etcd is required; Redis is optional.
  • Full: add Kafka + ClickHouse (analytics/billing) and Postgres (tenancy).

The docker-compose.yml provides the stateful pieces; make infra / make infra-full bring up the minimal or full set.