Skip to content
ConceptForOperatorWith or without Foxden Admin

Keys, secrets and access ​

This page explains the keys and secrets a Foxden install creates, which ones you must never lose or change, and how the server is reached: certificates, the firewall, the control service and the console.

What the install creates ​

WhereWhatReadable by
.env in each app's folder (for Fennec, /opt/codefox-crm/.env)Each app's settings, with the secrets the installer made: APP_SECRET (or Arctic's AUTH_SECRET), the database passwords, the updater's secret, the setup token, and in Admin one feed secret per app.root only
/etc/foxden/<app>-backup.passThe passphrase that encrypts that app's backups, named by the app's id: fennec-backup.pass, arctic-backup.pass, and for Admin management-backup.pass. The hand-over screen names each file.root only
/etc/foxden/box.keyThe box key: every secret that links two apps (Arctic to Fennec, Fennec to Corsac, and the others) is worked out from it.root only
/etc/foxden/suite.envThe settings every app shares, typed once: the Google and Microsoft clients, the Resend key and sender, the AI key.root only
/root/.config/rclone/rclone.confThe key to your off-site backup bucket, once you set one.root only
/etc/foxden/control.keyThe key Admin signs its requests to the control service with. It is made from Admin's APP_SECRET, so it needs no copy of its own.root only

The hand-over screen at the end of the install lists the secrets and passphrase files under These cannot be recovered if the box is lost. Escrow them today. Copy them off the server the same day, into a password manager or another safe place. None of them is in any backup. See Back up and restore.

What you must never lose or change ​

  • The backup passphrase files. They are the only key to the backups. A new passphrase does not open old backups.
  • Admin's APP_SECRET. It protects Admin's signing keys. With a different one, Admin's keys cannot be opened, and no app can trust what Admin signs. The control service's key is also made from it.
  • Corsac's APP_SECRET. It protects the key that seals documents. With a different one, that key cannot be opened, and documents already sealed cannot be signed again.
  • Fennec's APP_SECRET. Google connections, assistant keys and unsubscribe links already mailed depend on it.
  • Cape's APP_SECRET. It protects stored documents and the phone account saved in Cape.

The installer never makes a secret again once it exists: running foxden init again on an installed server keeps every secret in .env. foxden config refuses to change a secret the installer made, and Admin never changes one.

Certificates ​

By default, Caddy gets a certificate from Let's Encrypt for each app's address the first time it is opened, with your email as the contact. It renews them by itself. Ports 80 and 443 must be reachable from the internet for this.

For a server reachable only on an office network or a VPN, foxden init --tls-mode internal makes Caddy use its own certificate authority instead. Every browser that opens the apps must trust its root certificate, and so must the apps themselves, or sign-in through Admin fails; foxden does not set that up in the apps for you. The mode is chosen at install and cannot be switched later. Arctic on its own cannot use it; install it with Admin (--products arctic,admin) instead.

Firewall and network ​

  • The installer turns on the ufw firewall: it denies everything coming in except SSH, 80 and 443. It keeps the rules already on the server; --reset-firewall deletes them first. It refuses to turn the firewall on when it cannot tell which port SSH uses, rather than lock you out.
  • The apps listen only on 127.0.0.1. Caddy is the only thing that answers from outside.
  • A cloud provider's firewall in front of the server must also allow 80 and 443.

What leaves the server: downloads of app images from ghcr.io, a question to the registry whether a newer build exists (when someone looks at an app's updates, and once an hour per app with automatic updates on; set UPDATER_CHECK=0 in an app's settings to stop it), Let's Encrypt, Corsac's request to a timestamp authority for each seal, and the services you connect yourself (Resend, Google, Microsoft, your AI provider, your backup bucket).

The console and the control service ​

The buttons on Foxden Admin's Server pages are the Owner's. They change the server through the control service: a small service that Admin's stack runs, which accepts only signed requests over a socket on the server (/run/foxden/control.sock) and runs foxden commands from a fixed list. It runs as root on the server by design. Every change it is asked for is written to /var/log/foxden/control.jsonl.

This means that whoever can act as the Owner in Admin can change the server's settings, update and restart apps, add apps, run backups and set where off-site copies go. They cannot restore a backup, read a secret, or change a database password, a session secret, the updater, the box key, where images come from, which build runs, or the backup passphrase. Protect the Owner's sign-in accordingly. See Sign-in.

To turn the control service off, set FOXDEN_CONTROL=off in Admin's settings and restart Admin:

bash
foxden config set FOXDEN_CONTROL off --product admin
foxden restart --product admin

Admin's Server pages lose their buttons, and you change the server with the CLI only.

The link on the hand-over screen signs the first Owner in to Admin without a password. Keep it private. It stops working once someone has signed in another way: an email link, Google or Microsoft. foxden console link prints it again.

Sign-in to the server ​

foxden reaches the server over SSH with a key, as root or a user with passwordless sudo. Keep that key as safe as the server: it can do everything the server can.

Foxden is open source under Apache-2.0.