---
title: Deploy with Docker
project: Documents
version: v1
section: recipes
language: en
license: MIT
url: https://totaljs.es/docs/documents/1/recipes/deploy-with-docker/
updated: 2026-11-19T05:59:09.540Z
---

# Deploy with Docker

> Run Documents on a server with Docker and HTTPS.

1. Get the code. In the `config` file, write the connection of your PostgreSQL database (`database`) and the public address of your site (`url`, for example `https://docs.example.com`). The compose file mounts this `config` in the container.

```bash
git clone https://github.com/totaljs-es/documents.git
cd documents
docker compose up -d --build
```

2. Open `/admin/` in the browser: the sign-in page shows the random login and password of the first start, with a button that fills in the form. Sign in, and then change them for your own in **Users**. They are also in the log:

```bash
docker compose logs documents
```

3. Put a reverse proxy with HTTPS in front of port 8000 (Caddy, nginx or Traefik).

The content lives in PostgreSQL, the uploaded images in the `documents-data` volume and the backups in `documents-backups`.

To update:

```bash
git pull
docker compose up -d --build
```

The database and the volumes are kept. Back them up regularly: see [Backups and updates](/documents/1/guides/backups-and-updates/).
