Run an Always-On Hub
For a Hub that’s reachable even when your laptop is off, run it as a container on an always-on host. Treeline publishes a Hub image, and the requirements are the same on any platform.
The generic recipe
Section titled “The generic recipe”Whatever you run it on — a provider, a VPS, or your homelab — a Hub needs five things:
- Run the image
ghcr.io/treeline-money/treeline-hub— track:latest, or pin a version like:26.5.2402for a reproducible deploy. - Expose port
4242(the port the Hub listens on). - Mount a persistent volume at
/root/.treeline— this holds your DuckDB database, the master token, and OAuth state. - Set
TL_HUB_TOKENto a value you choose, so the master token is stable across redeploys. (Without it, one is generated into the volume and only shown in the logs.) - Put it behind HTTPS — most providers give you a TLS domain automatically.
These map directly onto Render, Railway, a Docker-capable VPS, or any container platform — deploy the image, attach a disk at /root/.treeline, set the env var, expose 4242, and use the platform’s HTTPS domain.
Example: Fly.io
Section titled “Example: Fly.io”Fly gives you a free *.fly.dev HTTPS URL, a persistent volume, and scale-to-zero so an idle Hub costs almost nothing.
-
Install flyctl and run
fly auth login. -
Create the app, a volume, and your token secret (pick a nearby region with
fly platform regions):Terminal window fly apps create my-treeline-hubfly volumes create treeline_data --size 1 -r sjc -a my-treeline-hubfly secrets set TL_HUB_TOKEN=<your-token> -a my-treeline-hub -
Save this
fly.toml(replace the app name):app = "my-treeline-hub"primary_region = "sjc"[[mounts]]source = "treeline_data"destination = "/root/.treeline"[http_service]internal_port = 4242force_https = trueauto_stop_machines = "suspend"auto_start_machines = truemin_machines_running = 0[[vm]]cpu_kind = "shared"cpus = 1memory = "256mb" -
Deploy the published image:
Terminal window fly deploy --image ghcr.io/treeline-money/treeline-hub:latest -a my-treeline-hub --ha=false
Your Hub is now at https://my-treeline-hub.fly.dev.
Your own hardware
Section titled “Your own hardware”Running on a homelab box, NAS, or VPS with Docker? Use Compose:
services: treeline-hub: image: ghcr.io/treeline-money/treeline-hub:latest restart: unless-stopped ports: - "4242:4242" environment: TL_HUB_TOKEN: "replace-with-your-token" volumes: - treeline-data:/root/.treeline
volumes: treeline-data:docker compose up -dExposing it to the internet — for mobile or cloud AI — is your standard hosting setup: front it with a reverse proxy and TLS, a tunnel, or keep it LAN-only.