--- url: https://docs.codefox.ai/self-host/configure.md --- # Change server settings This page lets you change the server's settings after the install: what every app shares, one app's own settings, the domain, and how an app is connected to Foxden Admin. ## Two ways to change a setting Each app keeps its settings in its `.env` file on the server (for Fennec, `/opt/codefox-crm/.env`). Never edit inside a container image: an update replaces it. * **In Admin**, on the **Server** pages. The buttons are for the Owner. They work through a small control service on the server that runs the same `foxden` commands, from a fixed list. It runs with Admin by default. A change is saved on the server, and the apps that use it restart. * **With the CLI**, `foxden config` and the commands below, on your computer or the server. Each app's settings, what each one is for and whether the installer writes it, are listed in the settings reference: [Admin](/reference/settings/admin), [Fennec](/reference/settings/fennec), [Arctic](/reference/settings/arctic), [Corsac](/reference/settings/corsac), [Pampas](/reference/settings/pampas), [Culpeo](/reference/settings/culpeo), [Cape](/reference/settings/cape) and [Library](/reference/settings/library). ## Change what every app shares The email sender, the Google client, the Microsoft client and the AI providers are set once for the whole server. **In Admin:** 1. Open **Server** › **Connections**. 2. On the **Email**, **Google** or **Microsoft** card, select **Set up** (or **Change** when it is set). 3. Fill in the form. The Google and Microsoft forms list the redirect addresses to add in Google Cloud or Microsoft Entra. 4. Select **Save sender** or **Save client**. Every app that uses the setting restarts. AI provider keys are kept on **Workspace** › **AI**. The **AI providers** card on **Connections** leads there with **Add a key** (or **Manage keys** once one is set). See [AI](/run-your-company/ai) under Run your company. **With the CLI:** * Email: `foxden email set`. See [Set up outgoing email](/self-host/email). * Anything else shared: `foxden suite set GOOGLE_CLIENT_ID`. A secret is asked at a hidden prompt, or piped with `--stdin`. The value is saved in `/etc/foxden/suite.env` and written into each app that uses it, and those apps are recreated. `foxden suite` shows what is shared and which app holds each value. A value already in an app's own `.env` is kept. `foxden suite sync --force` replaces it with the shared one. ## Change one app's own settings **In Admin:** 1. Open **Server** › **Products**. 2. Select the app's name. 3. Find the setting. **Needed** lists what the app cannot work without; **Settings** lists what you can change; **More settings** and **Kept by the server** are folded away at the bottom. 4. Select **Set** or **Change**. A value already saved is never shown: you type the new one. **Clear** removes a value instead, and an on-or-off setting is a switch. 5. Type the value. 6. Select **Save**. 7. Select **Restart to apply**. People using the app are interrupted for a minute or two. **With the CLI:** 1. List the settings: `foxden config list --product fennec`. Add `--json` to see what each one is for and whether it is yours to set. 2. Set one: `foxden config set BACKUP_KEEP_DAYS 30 --product fennec`. For a secret, leave out the value and type it at the hidden prompt, or pipe it with `--stdin`. 3. Apply it: `foxden restart --product fennec`. `foxden` says when a different step applies the setting instead (for example `foxden update` for `TAG`). `foxden config unset KEY` clears a setting, `foxden config import ` sets many at once, and `foxden config edit` opens the whole file in your editor. Every change is checked before anything is written. ### Settings you cannot change this way `foxden config` refuses a setting the installer made (`... is generated by foxden init, not typed`) and one worked out from your answers (`... is derived from the domain`; move the domain instead). Admin's forms never change these, whatever the app: secrets that sign sessions, database addresses and passwords, the box key, the updater's secret, where images come from and which build runs (`TAG`), where the backup passphrase is, where backups are copied to, and any setting whose value runs as a command. Set those with the CLI on the server. Admin shows them under **Kept by the server**. The off-site backup copy has its own form on **Server** › **Backups**; see [Back up and restore](/self-host/backup). ## Move every app to another domain **In Admin:** 1. Make one DNS record first: `*.new-domain` pointing at the server. 2. Open **Server** › **System**. 3. Select **Change domain** (or **Use your own domain**). 4. Type the domain and select **Move everything**. Every app moves and restarts, Admin too. When Admin answers at its new address the page takes you there, and you sign in again. **With the CLI:** `foxden domain set new-domain.com`. It checks the DNS record first (`--skip-dns-check` moves anyway), rewrites every app's addresses, restarts each app, and keeps the old addresses answering with a redirect for as long as their DNS points at the server (`--no-redirect` leaves them out). `--dry-run` shows what would change. Then add the new redirect addresses in Google Cloud and Microsoft Entra, if you use them. **Server** › **Connections** lists them in the Google and Microsoft forms; `foxden domain --json` prints them. ## Connect an app to Admin An app is connected when it signs people in through Admin and reads its people, company name and brand from Admin. For that, its `.env` holds Admin's address (`CODEFOX_AUTH_ISSUER`, and `CODEFOX_APEX` or `CODEFOX_AUTH_ORIGIN`) and the app's own feed secret (`CODEFOX_AUTH_FEED_SECRET`), which matches the one Admin holds for that app. You do not type these: the installer writes both ends when it installs the app beside Admin. * An app installed beside Admin, or added later from Admin or with `foxden init --products `, is connected. * An app installed before Admin: run `foxden init --products ,admin`, which adds Admin and connects the app. Handing an app's people to Admin is one more step for an app that had its own **People** page. Admin then decides who is in the app and at which level, and the app's own **People** page closes. * **In Admin:** on **Server** › **Products**, under **To finish**, select **Let Admin manage its people**. Admin sets both settings below and restarts the app. * **With the CLI:** `foxden config set PEOPLE_MANAGED_BY admin --product ` (Culpeo's setting is `STAFF_MANAGED_BY`), then `foxden config set ACCESS_ENFORCEMENT enforce --product ` (not for Culpeo), then `foxden restart --product `. An app set to `PEOPLE_MANAGED_BY=admin` refuses to start without the Admin connection above and `ACCESS_ENFORCEMENT=enforce`; `foxden doctor` names what is missing. The links between apps (Arctic, Corsac, Cape, Pampas and Culpeo to Fennec; Fennec, Arctic and Corsac to Library; and others) are made from the box key. **Server** › **Products** lists them under **How your products work together**; **Connect the products** wires any that are off. With the CLI, `foxden link` shows them and `foxden link set` wires the missing ones.