# Configuration (https://optakt.ai/docs/configuration)

Almost everything is configured in the [admin app](/docs/admin-app) and stored in the database: users, agent scopes, models, integrations and credentials. One file holds what the service needs before it can reach its database.

## one.env [#oneenv]

On Linux `/etc/optakt/one.env`, on a Mac `one.env` in the configuration folder. The installer writes it, and [upgrades](/docs/upgrade) keep it current.

| Variable | What it sets |
| --- | --- |
| `DATABASE_DSN` | How the service reaches its database |
| `OPTAKT_CONFIG_DIR` | The configuration folder (default `/etc/optakt`) |
| `OPTAKT_DATA_DIR` | The data folder (default `/var/lib/optakt`) |
| `LICENSE_KEY` | Your licence key |
| `CAPABILITIES_REMOTE_ADDRESS` | Remote access for the admin app over TLS, for example `0.0.0.0:9633`. Off when empty |
| `LOG_LEVEL` | `trace`, `debug`, `info`, `warn` or `error` |

Restart the service after a change: `sudo systemctl restart optakt-one` on Linux; `launchctl kickstart -k "gui/$(id -u)/io.optakt.one"` on a Mac, from the installing user's session.

The service's management interface listens only on your agent's machine by default; remote access goes through an SSH tunnel or the TLS address above.

## Where everything lives [#where-everything-lives]

| Location | Linux | Mac |
| --- | --- | --- |
| Commands | `/usr/local/bin` | `~/Library/Application Support/io.optakt.one/bin`, with `optakt` linked into `/usr/local/bin` |
| Configuration | `/etc/optakt` | `~/Library/Application Support/io.optakt.one/config` |
| Data, keyring and spaces | `/var/lib/optakt` | `~/Library/Application Support/io.optakt.one/data` |
| Document and voice tools | `/var/lib/optakt/tools` | `tools` in the data folder |
| The agent's home | `/home/optakt` | your home |
| Service | systemd unit `optakt-one`, user `optakt` | LaunchAgent `io.optakt.one` |
| Logs | `journalctl -u optakt-one`, install log `/var/log/optakt-install.log` | `~/Library/Logs/io.optakt.one` |

Each space has its own working folder under `spaces` in the data folder, where your agent's commands start and received files are kept.
