> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kernelmedia.tv/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Environment variables, data directories, database options, and ffmpeg resolution

## Environment variables

| Variable | Purpose |
| - | - |
| `KERNEL_PORT` | Port to listen on. Precedence: this env var, then the saved Settings value, then the default `9014`. |
| `KERNEL_MANAGED` | Set to `apt` or `yum` by Linux packages. Disables the in-app self-updater so the package manager stays authoritative. |
| `KERNEL_FFMPEG`, `KERNEL_FFPROBE`, `KERNEL_FPCALC` | Override the bundled binary paths. |
| `KERNEL_MAX_NVENC_SESSIONS` | Cap concurrent NVENC transcode sessions on this host. |
| `KERNEL_UPDATES_API` | Update-check API base URL. Defaults to `https://api.kernelmedia.tv`. |

<Note>
  `KERNEL_HOST` is set by the Docker image and the packaged `.env` file, but the server doesn't currently read it. It always binds all interfaces on the configured port. Don't rely on it to restrict access; use your container/firewall network settings instead.
</Note>

## CLI flags

```bash theme={null}
./kernel-server -v   # verbose logging
```

## Directories

Paths are relative to the server's working directory (or fixed under `/opt/kernelmediaserver` for Linux packages; see [Linux Packages](/install/linux-packages)):

| Path | Contents |
| - | - |
| `data/db.json` | Database connection config |
| `data/kernel.db` | Default SQLite database |
| `log/` | Server logs |
| `binaries/` | Bundled ffmpeg, downloaded automatically on first boot if missing |

## Database

SQLite is the default and needs no configuration. Kernel also supports:

* **PostgreSQL**
* **MySQL**
* **MSSQL**

Switch databases from the setup wizard's Database step, or by editing `data/db.json` directly and restarting the server.

## ffmpeg resolution

Kernel looks for ffmpeg in this order: `./binaries`, then `./bin`, then `./ffmpeg`, then the `KERNEL_FFMPEG` env var, then your system `PATH`. If none are found, it downloads the bundled jellyfin-ffmpeg tree automatically on boot. No manual install is needed on any platform.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.