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

# Deploy con Docker

> Esegui Documents su un server con Docker e HTTPS.

1. Scarica il codice. Nel file `config`, scrivi la connessione del tuo database PostgreSQL (`database`) e l'indirizzo pubblico del tuo sito (`url`, per esempio `https://docs.example.com`). Il file compose monta questo `config` nel container.

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

2. Apri `/admin/` nel browser: la pagina di accesso mostra login e password casuali del primo avvio, con un pulsante che compila il modulo. Accedi, e poi sostituiscili con i tuoi in **Utenti**. Sono anche nel log:

```bash
docker compose logs documents
```

3. Metti un reverse proxy con HTTPS davanti alla porta 8000 (Caddy, nginx o Traefik).

I contenuti si trovano in PostgreSQL, le immagini caricate nel volume `documents-data` e i backup in `documents-backups`.

Per aggiornare:

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

Il database e i volumi vengono mantenuti. Fanne il backup regolarmente: vedi [Backup e aggiornamenti](/documents/1/guides/backups-and-updates/).
