Deploy
Last updated on November 19, 2026
Once .env is ready, re-run the deploy script. The license key is saved in .env, so you do not need to pass it again:
curl -fsSL https://www.tofupilot.com/deploy | bashThe script validates your configuration, pulls the Docker images, and starts six containers.
| Container | Role |
|---|---|
tofupilot-dashboard | TofuPilot application |
tofupilot-pg | PostgreSQL |
tofupilot-seaweed | SeaweedFS file storage |
tofupilot-proxy | Traefik reverse proxy with automatic HTTPS |
tofupilot-centrifugo | Realtime WebSocket server (live status, telemetry, build logs) |
tofupilot-deployer | Build worker for the deployments pipeline (Docker-in-Docker) |
What the script changes on the host
The script only creates what TofuPilot needs, in the directory you run it from and inside Docker:
- Files:
.env(all secrets, mode600),docker-compose.yml(mode600),centrifugo-config.json,traefik-routes.ymland, with custom certificates,traefik-tls.yml. The script refuses to run from a directory every user can write to, such as/tmp. - Docker resources: the six containers above, their volumes and one network, all prefixed
tofupilot. - Ports: 80 and 443 for the proxy. PostgreSQL listens on
127.0.0.1:5432only. No firewall rule is added or changed. - Docker access: when your user cannot reach Docker, the script adds it to the
dockergroup for your next login and runs this deploy's Docker commands throughsudo. Membership of thedockergroup is equivalent to root on the host. The script never changes the permissions of the Docker socket.
The script does not install Docker. The reverse proxy reads its routes from traefik-routes.yml and has no access to the Docker socket, so the internet-facing container cannot control Docker on the host.
After each deploy or update, the script reports the running version and domain to Orbit so you can monitor instances. No other data leaves your server.
The tofupilot-deployer container needs standard (root) Docker because it runs a privileged build sandbox. Under rootless Docker it stays down and the build pipeline is unavailable; everything else, including realtime, works normally.
First login
Open your domain (e.g. https://tofupilot.yourcompany.com) and create your first account. That account becomes the organization admin, and each self-hosted instance supports one organization.
Upload runs
To upload test Runs, point your scripts to your instance URL. The SDK reads your API key from the TOFUPILOT_API_KEY environment variable, or you can pass it directly.
import openhtf as htffrom tofupilot.openhtf import uploaddef main(): test = htf.Test( procedure_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # procedure UUID from the dashboard part_number="PCB1", ) test.add_output_callbacks(upload( url="https://tofupilot.yourcompany.com", # verify="/etc/ssl/your-ca.crt", # if the instance uses a private CA )) test.execute(lambda: "PCB1A001")if __name__ == '__main__': main()from datetime import datetime, timezone, timedeltafrom tofupilot.v2 import TofuPilotdef main(): client = TofuPilot( api_key="your_api_key", server_url="https://tofupilot.yourcompany.com/api" ) started_at = datetime.now(timezone.utc) ended_at = started_at + timedelta(seconds=30) run = client.runs.create( procedure_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # procedure UUID from the dashboard serial_number="PCB1A001", part_number="PCB1", outcome="PASS", started_at=started_at, ended_at=ended_at, ) print(f"Run created: {run.id}")if __name__ == '__main__': main()Custom CA certificates
When your instance uses an internal CA, every client has to trust that CA. Get the root certificate (PEM) from the team that issued the server certificate, together with any intermediate your clients should trust. Do not extract it from the server: openssl s_client -showcerts returns the server certificate and its intermediates, not the root, and a server certificate cannot act as a trust anchor.
For stations and the CLI, set SSL_CA_CERT_PATH on the instance so the install command carries the CA fingerprint and nothing has to be copied to the station. See Private CA. The SDK options below take the same PEM file.
Pass it to the Python SDK:
from tofupilot.v2 import TofuPilotimport httpxhttp_client = httpx.Client( verify="/path/to/ca-certificate.pem")client = TofuPilot( api_key="your_api_key", server_url="https://tofupilot.yourcompany.com/api", client=http_client)Rust SDK
The Rust SDK trusts the bundled Mozilla roots and the system certificate store, and accepts additional root certificates directly:
use tofupilot::{ClientConfig, TofuPilot};let config = ClientConfig::new("your_api_key") .base_url("https://tofupilot.yourcompany.com") .root_certificate_from_pem_file("/path/to/ca-certificate.pem")?;let client = TofuPilot::with_config(config);add_root_certificate takes the PEM bytes, for a certificate that does not come from a file. It
accepts a bundle, so a root and its intermediates can be passed together:
let config = ClientConfig::new("your_api_key") .base_url("https://tofupilot.yourcompany.com") .add_root_certificate(&pem_bytes)?;CLI
Set SSL_CA_CERT_PATH on the instance and copy the install command from the dashboard: it carries --ca-cert-sha256 <fingerprint>, the CLI fetches the CA bundle from the instance and refuses it unless the hash matches. The manual form passes the file at login:
tofupilot login --url https://tofupilot.yourcompany.com \ --ca-cert /path/to/ca-root.pemThe path is saved with the credentials, so every later command and the station daemon reuse it. TOFUPILOT_CA_CERT=/path/to/ca-root.pem overrides the saved path for a single command. The certificate is added to the built-in roots rather than replacing them, so public hosts keep working; there is no option to disable certificate verification. The CLI's own updates come from tofupilot.app and never trust this CA.
This covers every connection the CLI makes from version 1.7.17: login, deploy, pull, run uploads, the offline queue and the realtime link. Details, rotation and troubleshooting on the Private CA page.
OpenHTF output callback
test.add_output_callbacks(upload( url="https://tofupilot.yourcompany.com", verify="/path/to/ca-certificate.pem",))Other clients
The C++ and MATLAB SDKs do not expose a certificate option. Point the process at your CA with the standard OpenSSL environment variable instead:
export SSL_CERT_FILE=/path/to/ca-certificate.pemHow is this guide?
Configure
Learn how to configure domains, SSL, authentication providers, and the Git provider for your self-hosted TofuPilot instance via the .env file.
Private CA
Learn how to run a self-hosted TofuPilot instance behind a private certificate authority and set up stations that trust it without copying files.