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

# Deploy with Docker

> Run Varne with Docker or Docker Compose, which folders to keep, the environment variables it reads, and how to keep it private.

Varne ships as one container. It needs two folders that outlive the container: one for its database, one for its configuration.

## Run with Docker

```bash theme={null}
docker run -d \
  --name varne \
  -p 8000:8000 \
  -v $(pwd)/data:/app/data \
  -v $(pwd)/config:/app/config \
  ghcr.io/narevai/varne:nightly
```

## Run with Docker Compose

```yaml compose.yaml theme={null}
services:
  varne:
    image: ghcr.io/narevai/varne:nightly
    container_name: varne
    ports:
      - "127.0.0.1:8000:8000"
    volumes:
      - ./data:/app/data
      - ./config:/app/config
    environment:
      BESZEL_PASSWORD: ${BESZEL_PASSWORD}
    restart: unless-stopped
```

```bash theme={null}
docker compose up -d
```

> [!NOTE]
>
> Varne v1 is in pre-release. The `nightly` tag follows development. The `latest` tag moves to v1 only after the first stable v1 release, so do not rely on it yet. After that, pin a version tag such as `1.0.0` in production.

## What lives where

| Path in the container | What it holds | Keep it? |
| - | - | - |
| `/app/data` | The DuckDB database with everything Varne pulled | Yes, back it up |
| `/app/config` | `varne.yaml`, your stacks and sources | Yes, back it up |

If you do not mount `/app/config`, Varne creates a new empty configuration each time you recreate the container.

The database holds raw provider responses and the rows built from them. Pulling again replaces a day's rows with the newest pull, so you can pull as often as you like.

## Environment variables

Varne reads these variables, or the same names from a `.env` file in its working directory.

| Variable | Default | What it does |
| - | - | - |
| `HOST` | `0.0.0.0` | Address the server listens on |
| `PORT` | `8000` | Port the server listens on |
| `DATABASE_PATH` | `./data/app.duckdb` | Where the database file is |
| `CONFIG_PATH` | `./config/varne.yaml` | Where the configuration file is |
| `LOG_LEVEL` | `INFO` | `DEBUG`, `INFO`, `WARNING`, `ERROR`, or `CRITICAL` |
| `ENVIRONMENT` | `production` | Set to `development` to show an extra **Components** page |
| `DEBUG` | `false` | Developer mode with auto reload. Leave it off |

Secrets such as API tokens are not Varne settings. Put them in environment variables of your own and reference them from the configuration with `api_token_env` or `password_env`. See [Configuration](https://www.narev.ai/docs/varne/v1/configuration/index.md#keep-secrets-out-of-the-file).

## Health check

Varne answers `GET /api/v1/health` with its status and version:

```json theme={null}
{ "status": "healthy", "environment": "production", "version": "1.0.0-alpha.0" }
```

Use it for container health checks and uptime monitors.

## Keep Varne private

Varne has no login, and anyone who can open it can read your costs and change your configuration. The configuration can contain API tokens.

* Bind to localhost, as in the Compose example above, or run Varne on a private network or VPN.
* If you need access from outside, put a reverse proxy with authentication in front of it.
* Prefer `api_token_env` over `api_token`, so tokens are not stored in `varne.yaml`.
* Create provider keys with the least access that works, and rotate any key that you pasted somewhere public by mistake.

## Upgrade

```bash theme={null}
docker compose pull
docker compose up -d
```

Your `data` and `config` folders stay as they are. Back them up before you change versions.


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