Run your own server
On this page
Self-hosting overview
You can run trunkjet on your own machines. This page tells you what a server needs and which of the two ways to run it fits you; the step-by-step pages follow.
What a server is made of
| Part | What it does | Notes |
|---|---|---|
tjetd | The server: API, web app, documentation (this site), build cache | One binary; stateless, so you can run several |
tjet-worker | Background jobs: search, archives, garbage collection, hooks | Runs next to tjetd |
| FoundationDB 7.3 | The only authority for repositories, history and permissions | Three machines for the double redundancy, five for triple |
| Content store | The bytes of your files | A local directory on one host, or any S3-compatible object store |
| TLS | tjetd refuses to listen on a non-loopback address without it | Either in tjetd, or a reverse proxy in front of it |
| An identity provider | Interactive sign-in (OpenID Connect) | Optional for a first trial: an e-mailed one-time code needs an SMTP relay |
Your computer clients (tjet, the desktop app) need none of this: they talk to the server
over HTTPS and never to FoundationDB.
Requirements
- Linux on x86-64 with systemd for the package install: Debian 13 or Ubuntu 24.04 or later (glibc 2.39 or later). A synchronised clock (NTP).
- A FoundationDB 7.3 cluster that the server host can reach, with its cluster file. For a first trial one single-node cluster is enough; for real data use at least three machines.
- A content store. On one host the local directory is fine, and its durability is that of
the disk, so back the disk up. With several servers use S3 (
TJET_STORE=s3,TJET_S3_ENDPOINT,TJET_S3_REGION,TJET_S3_BUCKET,TJET_S3_ACCESS_KEY,TJET_S3_SECRET_KEY). - A DNS name and a TLS certificate (or a reverse proxy that has one).
Pick a path
Just trying it: the quickstart. One command with Docker on your own computer; follow Quickstart. Not for a team: no redundancy, one disk.
One host, the .deb. The simplest real installation: tjetd and tjet-worker as systemd
services with hardened units, configuration in /etc/trunkjet, data in /var/lib/trunkjet.
Follow Install a server on one host. A container image with the same binaries is
described there too.
Kubernetes, the Helm chart. For several servers, automatic FoundationDB management, ingress and certificates, monitoring and runner pools. Follow Install on Kubernetes.
TLS and a reverse proxy
tjetd refuses to start on a non-loopback address without TLS, because sign-in tokens would
otherwise cross the network in the clear. Two ways:
- Give
tjetdthe certificate: in/etc/trunkjet/tjetd.tomlsetlisten = "0.0.0.0:8640",tls_cert_fileandtls_key_file. A new certificate needs a restart oftjetd. - Keep the default loopback listener (
127.0.0.1:8640) and put a TLS reverse proxy on the same host in front of it. Pass theHostheader through unchanged and do not set or rewrite cookies: the server sets its own host-only session cookies.
Health checks go to the private metrics listener, never the public port: /healthz
(liveness) and /readyz (readiness) on 127.0.0.1:9640.
Backups
Two things must be backed up, and both have commands in the guides:
- FoundationDB: continuous backup with
tjet-admin fdb-backup start, plus restore drills into a scratch cluster that the package schedules weekly (tjet-dr-verify.timer). - The content store: a local store is the host's disk; an S3 store is whatever protection your object store gives (versioning, replication).
Test a restore before you need one: see Install a server on one host and the administrator guide.
After the install
Create the first tenant with tjet-admin bootstrap-tenant, then sign in with
tjet login scm.example.com. Configuration, identity, quotas, retention and
monitoring are in the administrator guide. To bring existing Git
repositories over, see the migration guide.
Not supported yet
The packages and images are unsigned (check SHA256SUMS); .rpm packages and Windows or macOS
servers do not exist; FoundationDB TLS is untested; rolling upgrades between versions are only
qualified where the release notes say so (otherwise stop everything, upgrade, start). The full
list is at the top of Install a server on one host.