# Install with Docker Compose

> Run Resta on any Linux server with Docker Compose. Caddy obtains a TLS certificate for your domain automatically.

Source: https://resta.dev/docs/install-docker · Updated 2026-11-01

**To run Resta without Coolify, you need a server with Docker Compose v2, a domain pointing at it, and ports 80 and 443 open; then you fill in a `.env` file and run `docker compose up -d`.** The gateway (Caddy) obtains a TLS certificate for your domain on its own.

> The source repository is not public yet. The clone command will be added here at release.

## Requirements

- Linux with Docker Engine and Compose v2 (`docker compose version`).
- A small VPS. Resta has not been load-tested yet; 2 vCPU and 2–4 GB RAM is a reasonable starting point. See [Architecture](https://resta.dev/docs/architecture#capacity).
- A DNS `A` or `AAAA` record for your domain pointing at the server.
- Ports 80 and 443 reachable from the internet (for the certificate).

## Configure

Copy the example file and edit it:

```sh
cp .env.example .env
```

```dotenv
RESTA_PUBLIC_URL=https://db.example.com
RESTA_SITE_ADDRESS=db.example.com

# openssl rand -hex 32, three times
POSTGRES_PASSWORD=...
RESTA_OPERATOR_TOKEN=...
RESTA_NODE_ADMIN_TOKEN=...
```

`RESTA_PUBLIC_URL` is the address people and apps use. `RESTA_SITE_ADDRESS` is the domain Caddy requests a certificate for.

## Start

```sh
docker compose up -d
docker compose ps        # all services healthy
curl https://db.example.com/health
```

Open your domain and complete **Set up this server**, or set `RESTA_ADMIN_EMAIL` and `RESTA_ADMIN_PASSWORD` in `.env` before the first start.

## Behind another reverse proxy

If nginx, Traefik or a load balancer already terminates TLS on the machine:

```dotenv
RESTA_SITE_ADDRESS=:80
RESTA_HTTP_PORT=8480
```

Then proxy your domain to `http://127.0.0.1:8480`. Pass the `Host` header through, and allow long responses: query results can stream.

## Data and volumes

| Volume | Contents |
|---|---|
| `dbdata` | Every database |
| `backups` | Snapshots, when backups go to the default target |
| `pgdata` | Postgres: account, API keys, database list |
| `keys` | Token signing key pair |
| `caddy` | TLS certificates |

`docker compose down` keeps them. `docker compose down -v` deletes them, including every database.

Next: [Quickstart](https://resta.dev/docs/quickstart).
