# trunkjet quickstart (D-1854): one machine, one command. Start it with ./trunkjet up (it runs # the one-time initialisation around `docker compose up`); docs/manual/quickstart.md. # # Every container is unprivileged and shares ONE network namespace (the `pod` service, like a # Kubernetes pod), so FoundationDB, Garage, the local inbox and tjetd talk over 127.0.0.1 only # and tjetd keeps its rule that a plaintext listener must be loopback. Caddy is the only # listener the host reaches, published on the host's loopback by default (TRUNKJET_BIND). # Images are pinned by digest except the trunkjet image (TRUNKJET_IMAGE, set by ./trunkjet). # # Laptop/evaluation sizing: single-redundancy FoundationDB and a one-node Garage on this # machine's disk. For a team server use the .deb (docs/manual/install.md) or the Helm chart. services: pod: image: registry.k8s.io/pause:3.10@sha256:ee6521f290b2168b6e0935a181d4cff9be1ac3f505666ef0e3c98fae8199917a ports: - "${TRUNKJET_BIND:-127.0.0.1}:${TRUNKJET_PORT:-8640}:8080" restart: unless-stopped # One-shot: generates the missing secrets. tjetd's (cursor, PII and S3 keys, setup token) go # to `tjetd-secrets`, Garage's (RPC secret, admin token) to `secrets`; each server mounts only # its own volume. An older installation kept all of them in `secrets`: init moves tjetd's. init: image: ${TRUNKJET_IMAGE:-trunkjet.io/trunkjet/server:quickstart} network_mode: none cap_drop: [ALL] security_opt: ["no-new-privileges:true"] entrypoint: ["/usr/bin/tjet-quickstart-init"] command: ["secrets"] volumes: - tjetd-secrets:/var/lib/trunkjet-secrets - secrets:/var/lib/garage-secrets restart: "no" fdb: image: foundationdb/foundationdb:7.3.77@sha256:559b178a137bbe09272ad6e3752531aa04e2ddacab8ccfa4ffa86467db033bea network_mode: service:pod environment: FDB_NETWORKING_MODE: host FDB_PORT: "4500" FDB_CLUSTER_FILE_CONTENTS: "trunkjet:quickstart@127.0.0.1:4500" volumes: - fdb-data:/var/fdb/data depends_on: [pod] restart: unless-stopped garage: image: dxflrs/garage:v2.4.1@sha256:9c96caa2612d3411acc5b0e6701fb238dbfba33e533a6d7d3d811a4b12d0d020 network_mode: service:pod configs: - source: garage target: /etc/garage.toml volumes: - garage-meta:/var/lib/garage/meta - garage-data:/var/lib/garage/data - secrets:/secrets:ro depends_on: pod: condition: service_started init: condition: service_completed_successfully restart: unless-stopped # Local inbox for sign-in codes (no mail leaves this machine; ./trunkjet inbox). Replace it with your SMTP relay # for a team server (TJET_SMTP_* in .env, docs/manual/quickstart.md). inbox: security_opt: ["no-new-privileges:true"] image: axllent/mailpit:v1.27@sha256:e22dce5b36f93c77082e204a3942fb6b283b7896e057458400a4c88344c3df68 network_mode: service:pod environment: MP_SMTP_BIND_ADDR: "127.0.0.1:1025" # Loopback of the shared namespace only: read with ./trunkjet inbox (review M3). MP_UI_BIND_ADDR: "127.0.0.1:8025" MP_MAX_MESSAGES: "500" depends_on: [pod] restart: unless-stopped tjetd: image: ${TRUNKJET_IMAGE:-trunkjet.io/trunkjet/server:quickstart} network_mode: service:pod cap_drop: [ALL] security_opt: ["no-new-privileges:true"] entrypoint: ["/usr/bin/tjet-quickstart-init", "run-tjetd"] configs: - source: tjetd target: /etc/trunkjet/tjetd.toml - source: fdb_cluster target: /etc/foundationdb/fdb.cluster environment: TJET_INSTALLATION: main TJET_CELL: c1 TJET_STORE: s3 TJET_S3_ENDPOINT: http://127.0.0.1:3900 TJET_S3_REGION: garage TJET_S3_BUCKET: trunkjet TJET_S3_DURABILITY: single-host TJET_PUBLIC_ORIGIN: ${TRUNKJET_ORIGIN:-http://localhost:8640} TJET_ALIAS_ORIGINS: ${TRUNKJET_ALIAS_ORIGINS:-http://127.0.0.1:8640} TJET_PII_KEY_FILE: /var/lib/trunkjet-secrets/pii.key TJET_SETUP_TOKEN_FILE: /var/lib/trunkjet-secrets/setup.token TJET_SMTP_RELAY: ${TJET_SMTP_RELAY:-127.0.0.1:1025} TJET_SMTP_TLS: ${TJET_SMTP_TLS:-none} TJET_MAIL_FROM: ${TJET_MAIL_FROM:-trunkjet@localhost.localdomain} TJET_MIRROR_DIR: /var/lib/trunkjet/mirrors TJET_SIGNUP: "off" RUST_LOG: ${RUST_LOG:-info} volumes: - tjetd-secrets:/var/lib/trunkjet-secrets:ro - state:/var/lib/trunkjet healthcheck: test: ["CMD", "curl", "-fsS", "-o", "/dev/null", "http://127.0.0.1:9640/readyz"] interval: 3s timeout: 5s retries: 100 start_period: 5s depends_on: init: condition: service_completed_successfully fdb: condition: service_started garage: condition: service_started inbox: condition: service_started stop_grace_period: 15s restart: unless-stopped proxy: security_opt: ["no-new-privileges:true"] image: caddy:2.10-alpine@sha256:4c6e91c6ed0e2fa03efd5b44747b625fec79bc9cd06ac5235a779726618e530d network_mode: service:pod configs: - source: caddyfile target: /etc/caddy/Caddyfile depends_on: [pod] restart: unless-stopped configs: fdb_cluster: content: "trunkjet:quickstart@127.0.0.1:4500\n" garage: content: | metadata_dir = "/var/lib/garage/meta" data_dir = "/var/lib/garage/data" db_engine = "lmdb" replication_factor = 1 rpc_bind_addr = "127.0.0.1:3901" rpc_public_addr = "127.0.0.1:3901" rpc_secret_file = "/secrets/garage-rpc.secret" [s3_api] s3_region = "garage" api_bind_addr = "127.0.0.1:3900" root_domain = ".s3.garage.localhost" [admin] api_bind_addr = "127.0.0.1:3903" admin_token_file = "/secrets/garage-admin.token" tjetd: content: | [server] listen = "127.0.0.1:8640" metrics_listen = "127.0.0.1:9640" # Caddy forwards here and names the client in X-Forwarded-For (rate limits per client). proxy_listen = "127.0.0.1:8642" trusted_proxies = ["127.0.0.1/32"] # The worker's duties (mirror syncs, search, GC) run inside tjetd. with_worker = true [search] dir = "/var/lib/trunkjet/search" [archives] dir = "/var/lib/trunkjet/archives" [security] cursor_key_file = "/var/lib/trunkjet-secrets/cursor.key" webhook_allowlist = [] deletion_recovery_days = 7 [validation] require_signed_results = true caddyfile: content: | { admin off auto_https off } :8080 { reverse_proxy 127.0.0.1:8642 { flush_interval -1 } } volumes: secrets: {} tjetd-secrets: {} fdb-data: {} garage-meta: {} garage-data: {} state: {}