Skip to content

Install on your own server

This page is for a Watchtower you run yourself, on a virtual machine or on a Kubernetes cluster you already have. Privitty signs a license file for your tier and term. Watchtower checks that signature on your server. It does not call AWS.

Requirements

The single-server installer needs:

  • Ubuntu 22.04 or 24.04 on x86_64, with systemd, run as root
  • 4 vCPU, 15 GiB RAM, and 100 GiB free on the data disk
  • A DNS name you control, written in the license as --hostname
  • The license file Privitty sent you

The chat service uses an amd64 image. On your own cluster, label one amd64 node before you install:

kubectl label node <amd64-node> privitty.io/relay=true

The single-server installer applies that label itself.

One node is enough for every tier. The single-server install requires one Ready node. On a cluster you already run, set preflight.minNodes to raise that minimum.

DNS and firewall

Create these names before you install. For Let's Encrypt they must be public and point at the server. For a private CA they can be internal names.

Name Use
<hostname> Portal
chat.<hostname> Chat
mqtt.<hostname> Edge broker
mqtt-ws.<hostname> Edge broker over WebSocket
device.<hostname> Device API
Port Let's Encrypt Your certificate Private CA Use
80 open closed closed Certificate request
443 open open open Portal
465, 587, 993 open open open Chat
8883 open open open Edges
5443 offline only offline only offline only Edge image, offline installs

Phones already trust Let's Encrypt. A private CA works on phones only after your device management installs watchtower-ca.crt. Desktops and Edges need that same file.

Online install

curl -fsSLO https://get.privitty.com/watchtower/install.sh
sudo bash install.sh \
  --hostname watchtower.example.com \
  --admin-email ops@example.com \
  --license ./lic-2026-0001.wtlic \
  --tls letsencrypt --acme-email ops@example.com \
  --smtp-host smtp.example.com --smtp-port 587 --smtp-user watchtower \
  --smtp-password-file ./smtp-password --smtp-from watchtower@example.com \
  --yes

--smtp-host is your mail server, or your mail provider. It is not this Watchtower machine. The certificate on that port must name that host.

Use --tls certificate --cert fullchain.pem --key key.pem when you already have a certificate phones trust. Add --chat-cert and --chat-key when chat uses a different certificate. The names on the certificate must include <hostname> and chat.<hostname>.

The installer prints the first sign-in link as its last lines. The link works once and expires after 24 hours. With SMTP, Watchtower also sends that link to --admin-email. With --email-log, the installer output is the copy you use.

If that output is gone, the same line is kept on the first-run job for 24 hours, or until the next upgrade:

sudo kubectl -n watchtower logs job/watchtower-first-run

Use the line that starts with setup-link:.

Offline install

Download watchtower-<version>-offline-amd64.tar.zst from the address Privitty sent, and check it with the published SHA256SUMS and SHA256SUMS.sig. The server needs no registry access. Add the bundle, and usually a private CA:

sudo ./install.sh \
  --bundle watchtower-<version>-offline-amd64.tar.zst \
  --hostname watchtower.example.com \
  --admin-email ops@example.com \
  --license ./lic-2026-0001.wtlic \
  --tls private-ca \
  --email-log \
  --yes

Copy <data-dir>/ca/watchtower-ca.crt to Edges, desktops, and phones. Edges pull their image from <hostname>:5443, so open TCP 5443 from those hosts. On the Edge host, install.sh trusts that registry CA when you pass the same file as --cacert.

Helm on a cluster you already run

The chart expects Traefik in kube-system, an embedded database, and one amd64 node labeled privitty.io/relay=true.

helm pull oci://ghcr.io/privitty/charts/watchtower --version <version> --untar
kubectl create namespace watchtower
kubectl label node <amd64-node> privitty.io/relay=true
kubectl -n watchtower create secret generic watchtower-license \
  --from-file=license.wtlic=./lic-2026-0001.wtlic
kubectl -n watchtower create secret generic watchtower-smtp \
  --from-file=password=./smtp-password
( umask 077; openssl rand -base64 32 | tr -d '\n' > master.key )
kubectl -n watchtower create secret generic watchtower-kms-master \
  --from-file=master=./master.key

helm install watchtower ./watchtower \
  --namespace watchtower \
  -f watchtower/values-selfhosted.yaml \
  --set profile=standard \
  --set hostname=watchtower.example.com \
  --set email.admin=ops@example.com \
  --set email.smtp.host=smtp.example.com \
  --set email.smtp.port=587 \
  --set email.smtp.user=watchtower \
  --set email.smtp.existingSecret=watchtower-smtp \
  --set email.from=watchtower@example.com \
  --set kms.masterKeySecret=watchtower-kms-master \
  --wait --timeout 20m
helm test watchtower -n watchtower

master.key is the recovery key. Store it, then delete the file. A trial with no mail server sets email.mode=log and omits the SMTP secret. The first owner's sign-in link is the setup-link: line in kubectl -n watchtower logs job/watchtower-first-run. That job stays for 24 hours.

First sign-in

Use the link printed at the end of the install. It works once and expires after 24 hours. When SMTP is configured, the same link is also emailed to the admin address. Choose a password of at least 12 characters, then enroll an authenticator. Continue with the Quick start.

Upload or renew a license

On Billing, select Upload license and choose the new .wtlic file. Restricted mode clears on that request. No pod restart is required.

A headless install can run the same upload:

sudo ./install.sh license ./lic-2027-0001.wtlic

Backups and the recovery key

The installer prints the recovery key once and writes it to <data-dir>/RECOVERY-KEY.txt (mode 0400). Put it in a password manager, then delete that file. install.sh status only says whether the file is still on the server. Privitty never receives the key.

A backup runs every night at 02:00 UTC. Database dumps go to <data-dir>/backups/db/ and the sealed keys go to <data-dir>/backups/kms/. The nightly job deletes files in those two directories that are older than 14 days. The files sit on the same disk as the install. Copy them off the server with rsync, an NFS volume set as backup.local.existingClaim, or your own copy.

Run a backup now with:

sudo ./install.sh backup-now

When the backup finishes, the command prints the two files:

backup db <data-dir>/backups/db/<file>.dump
backup kms <data-dir>/backups/kms/<file>.tar

Restore replaces the database and the sealed keys. The recovery key must be the one that sealed that backup:

sudo ./install.sh restore \
  --db backups/db/2026-11-04.dump \
  --kms backups/kms/2026-11-04.tar \
  --recovery-key-file ./recovery-key

Upgrade and uninstall

sudo ./install.sh upgrade
sudo ./install.sh upgrade --bundle watchtower-<version>-offline-amd64.tar.zst
sudo ./install.sh uninstall
sudo ./install.sh uninstall --keep-data --yes

Upgrade runs only when the previous install finished, and it refuses a downgrade. It takes a backup, copies that backup to <data-dir>/backups/pre-upgrade/<from>-to-<to>-<time>/, upgrades k3s when the pinned version is not already installed, runs Helm, and runs the chart tests. An offline bundle is imported before Helm. The installer keeps the three newest pre-upgrade directories. The nightly cleanup does not delete them.

--skip-backup skips that backup. It applies to upgrade only. The command warns that the data is not protected. Without --yes, type skip-backup to continue. There is then no pre-upgrade copy.

If Helm fails, the installer prints helm rollback watchtower <revision> -n watchtower and does not run it. The database may already be migrated. Run that rollback with the k3s kubeconfig, then restore the pre-upgrade files. The recovery key is required:

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
helm rollback watchtower <revision> -n watchtower
sudo ./install.sh restore \
  --db <data-dir>/backups/pre-upgrade/<from>-to-<to>-<time>/<file>.dump \
  --kms <data-dir>/backups/pre-upgrade/<from>-to-<to>-<time>/<file>.tar \
  --recovery-key-file ./recovery-key

Uninstall without --yes asks you to type uninstall.

Usage report

Once a day, after 00:10 UTC, an online install posts yesterday's report to the address in the license. The report contains only these fields:

Field Meaning
v Report format. Today this is 1.
license_id The license this install is using.
install_id This install. A second install of the same license shows up as another id.
hostname The install hostname.
day The UTC day the counts cover.
edges_enrolled Active Edges at the time the report was built.
edges_online_peak The highest online Edge count that day.
apps Privitty App count at the time the report was built.
tags_peak The highest tag count that day.
tier License tier.
version Watchtower version.
restricted Whether the install was in restricted mode.
generated_at When the report was built, UTC.
install_public_key The public key that signs this install's reports.

No names, tag names, addresses, or email addresses are included. The posted body is the report bytes and a signature, not a second copy of your database.

Turn the online post off with usageReporting.enabled: false (this sets WT_USAGE_REPORTING=off). Reports are still stored for export. Turn it back on with true.

Offline installs do not post. Once a quarter, an Owner opens Usage, chooses the start date, selects Download usage report, and emails that file to Privitty. The same file from the API pod is:

sudo kubectl -n watchtower exec deploy/watchtower-api -- \
  /wt license report --since 2026-08-01 --out /tmp/usage.json
sudo kubectl -n watchtower cp deploy/watchtower-api:/tmp/usage.json ./usage.json