Security and HTTPS

TechTeamUp is built to be safe on a network you share. Every page needs a login, every key is long, random and replaceable, keys you connect are sealed in the database, and what people, agents and web pages write is never run. This page covers what you set up yourself, starting with HTTPS, and what each role and key can reach.

To report a security problem, open a GitHub security advisory. More in contributing.

Put HTTPS in front

The install script and the Docker image listen on every network interface so other machines can reach the app, so decide how it is reached before you share the address. Use HTTPS for anything reached beyond your own machine or private network. Over plain http your password and session cookie travel unencrypted, and when the app is reached that way from outside a private range, the login and setup pages say so. HTTPS also lets browsers show app notifications and install it on a phone.

Two easy ways.

Tailscale gives it an https address on your tailnet.

tailscale serve --bg --https=443 http://127.0.0.1:3140

Caddy gets and renews the certificate itself. With a DNS name pointing at the machine and ports 80 and 443 open, run

caddy reverse-proxy --from tasks.example.com --to 127.0.0.1:3140

or, as a service, use a Caddyfile with

tasks.example.com { reverse_proxy 127.0.0.1:3140 }

Then save the https address in the setup (or set APP_BASE_URL in the env file and restart), and install with --host 127.0.0.1 so the app is reached only through the proxy. With Docker Compose, publish the port on this machine only (- "127.0.0.1:3140:3140", shown commented in compose.yaml) and point the proxy at it.

The app itself listens on 127.0.0.1 unless HOST says otherwise.

A proxy on another machine or container

The app takes the visitor’s address from X-Forwarded-For only from a proxy it trusts, so that failed logins are counted per visitor. By default that is a proxy on the same machine (loopback). When the proxy is elsewhere, such as Docker Compose or a separate box, name it with TRUST_PROXY in the env file or the container’s environment, either its address or range or the number of proxies in front.

TRUST_PROXY=loopback, 172.18.0.0/16
# or
TRUST_PROXY=1

Without it, every visitor arrives from the proxy’s address and one person’s wrong passwords lock everyone out. The proxy must overwrite X-Forwarded-For with the address it saw, never append to one the visitor sent. Caddy and tailscale serve do this. In nginx, use proxy_set_header X-Forwarded-For $remote_addr;. Never set TRUST_PROXY=true on an app that can be reached without going through the proxy.

What it protects against

TechTeamUp is a self-hosted app for one account, its people (admins and members) and the agents that work for it. It is built to be safe against

  • someone on the network with no login. The only routes open without a login are the login page, the one-time setup while there is no owner, health and version checks, static files and the keyed APIs, and the keyed APIs refuse any request without their own key. The first login can only be made with the one-time setup code the install printed
  • a member opening work, files, settings or agents an admin hasn’t given them in the app. Admins choose the agents each member may use, and member runs explains what the agent can reach
  • text the app didn’t write, from members, agents, tools, emails and web pages. It is escaped when shown, never run, never used as a file path on another machine, and passed to the agent marked as coming from whoever wrote it, never as the owner’s words
  • a stolen or guessed key. Keys are long and random, compared in constant time, limited on wrong tries and replaceable by an admin

It does not defend against an admin, who can see and change everything by design, against someone with a shell on the app’s machine or the agent’s machine, or against the AI model itself misusing the authority the account key gives it. Keep your machines patched and your keys secret.

Roles

  • An admin sees every workspace, uses every agent and manages people, agents, connections and settings. The account owner is always an admin.
  • A member sees only the workspaces, processes and departments an admin ticks, plus tasks they own, work or watch, the files on those, search, the Ask box, their notifications and My settings. Any other page or file is refused.
  • Agents. A new member uses no agent until an admin ticks one.

A task’s owner, an admin or the agent can add a watcher to a task, and a watcher can see that task. Details in people and access.

Logins and pages

  • Passwords are hashed with Argon2id and need 12 characters at least. Unknown emails are checked against a dummy hash, so timing doesn’t reveal which emails exist.
  • Wrong passwords are limited to 5 tries per address, then that address is locked for 15 minutes. 10 wrong tries from anywhere lock the account for 15 minutes. Setup codes share the per-address lock.
  • Sessions are 32 random bytes, stored hashed, in an HttpOnly, SameSite=Lax cookie (Secure once the app’s address is https), lasting 30 days and sliding. Changing a password ends that person’s other sessions.
  • Every change must come from the app’s own origin, on top of SameSite cookies.
  • Pages carry a Content-Security-Policy that allows scripts only from the app with a per-response nonce, images only from the app (plus YouTube thumbnails), no plugins, forms only to the app and no framing. Apart from YouTube video thumbnails, a picture on another website named in a task shows as a link and never loads by itself.
  • Pages may use the microphone for the app’s own voice notes and calls only. Camera, location, payments and USB are switched off. Cross-Origin-Opener-Policy: same-origin keeps other sites from getting a handle on the app’s window.
  • Files served from /files get their own sandboxed policy and nosniff.

The agent’s key

The agent reaches TechTeamUp through /mcp with the account key (MCP_TOKEN, or else the mcp.token the app made, 256 random bits). With it the agent can use every MCP tool on every task, download any file in the workspace, take run slots and raise urgent requests. It is account-wide by design, because the agent works for the account. It can’t add or remove people, change a member’s workspaces or agents, or change settings and connections, because no tool does those things and Admin settings needs a person’s login.

Treat it like an admin password and keep it in the agent’s secret settings. If it may have leaked, replace it in Admin settings › Agents › Issue a new key, and the old one stops at once. URGENT_TOKEN, when set, can only raise and follow its own urgent requests.

Member runs

A run of the agent started for a member is a member run.

  • The app makes a key for that run alone (256 random bits), bound to that person. It ends when the run ends, after a day at most, and at any restart.
  • The run’s rules say who asked and that they are a member, never the owner. A person’s name is kept to one plain line, so a name can’t add instructions of its own.
  • TechTeamUp’s tools called with that key act with the member’s access. Tasks they can’t see are not found, changes they may not make are refused, what the run files is theirs, and account-wide tools are refused.
  • A member’s words are never pushed into a run going for someone else. They start a run of their own when it ends.

How the key reaches the agent matters. An adapter whose agent can give one run its own MCP credential sends the run key as that run’s bearer, and then the run can use nothing else. Hermes sets its MCP servers and their headers once in its config, so the run key goes in the run’s rules and the agent is told to pass it on every call. With Hermes, member runs are limited by the agent following its rules, because it still holds the account key on that connection. That is why members get no agent until an admin allows one, and why an admin should allow agents only to members they trust with what the agent can reach. Admin settings says so under the tick whenever an admin allows such an agent for a member.

Files

  • Files the agent makes are shown when the app can read them, either from local folders (FILES_ROOTS, where the real path must be inside one) or over ssh from the agent’s machine (FILES_SSH_*). Only media and document types are served, never hidden files.
  • Only paths the agent names in a task’s own session make a file for that task. A path in people’s words shows only a file already on that task.
  • Over ssh, the app’s key must run only a file reader as a forced command. scripts/files-forced-command.py in the repo is a reference one (Python 3, standard library, no shell). Copy it to the agent’s machine and add the app’s public key to the agent user’s ~/.ssh/authorized_keys like this.
restrict,command="/usr/bin/python3 /opt/techteamup/files-forced-command.py /home/agent/work /home/agent/.hermes/tmp" ssh-ed25519 AAAA... techteamup-files

restrict,command="..." is required. restrict turns off port forwarding, agent forwarding and a terminal, and command= means the key runs the reader whatever is asked. Never write your own reader as a shell script that runs $SSH_ORIGINAL_COMMAND or passes it to eval. The optional add-on bridges (usage, runs, processes, labels) are set up the same way, each with its own key.

  • An admin can open any file. A member can open files on tasks they can see and their own uploads.
  • Uploads are limited to 200 MB each, and members to 2 GB in all by default (Admin settings › Time and language). Unsent uploads are removed after a day.

Voice

  • The voice service runs beside the app on loopback and calls back on /api/voice/* with VOICE_TOKEN. That token must be at least 32 random characters (openssl rand -hex 32), and a weaker one is refused when saved.
  • 10 wrong voice tokens from one address in 15 minutes lock that address out for 15.
  • Because the service reaches the app on loopback, your proxy can refuse /api/voice/* from outside altogether. In Caddy, add respond /api/voice/* 404 before reverse_proxy.
  • On a call, approving a task asks you to confirm aloud and goes ahead only on your spoken yes.

Connections and addresses

Keys for connected services are sealed in the database with AES-256-GCM under ENCRYPTION_KEY (or encryption.key beside the database) and never shown again. A changed address needs its key again, so a saved key is never sent to a new address. Connection tests don’t follow redirects and read at most 1 MB.

The addresses an admin types for the agent and the voice and speech services may be private or loopback addresses, by design, because those services usually run on the same machine or network. Only admins can set them.

Data at rest

The data folder is readable by the app’s user only (folder 700, the database, its journal and the key files 600), and the app puts this right at every start. Connected keys are sealed with AES-256-GCM in the database and never shown again. Backups hold the database only, never the encryption key, so a backup that goes astray can’t open those keys. Your tasks themselves are stored as plain database rows, so keep backups somewhere only you can reach. Keep encryption.key (or your ENCRYPTION_KEY) somewhere else, such as a password manager. An ENCRYPTION_KEY weaker than 32 random bytes stops the app at start.

Scanning on the public repository

The public repository has GitHub’s free scanning switched on. Secret scanning with push protection refuses a push carrying a known kind of key, Dependabot raises alerts for known-vulnerable packages and opens weekly update pull requests, and CodeQL scans the code. If you run your own fork, switch the same settings on under Settings › Code security.

Error reports

Browsers report the app’s own errors to your own install, at /api/errors, at most 60 records per person or address in 10 minutes, each tagged with who sent it. The agent’s error review treats a member’s reports as untrusted data, never as instructions.

Next

Something unclear? Open an issue