---
url: https://next.zammad.org/it/get-started/installation/docker.md
---

# Docker installation

Zammad può essere distribuito usando Docker Compose. Puoi anche usare
interfacce grafiche Docker come [Portainer](https://www.portainer.io/).

::: info

Non forniamo supporto per problemi specifici relativi a Docker (-Compose) o Portainer.\
Se si sceglie di eseguire Zammad tramite Docker, il supporto è fornito solo per l'applicazione Zammad.
:::

## Prerequisiti

* Make sure your Docker Compose setup matches the
  [requirements](https://github.com/zammad/zammad-docker-compose#requirements){target=\_blank}
  you can find in the README of Zammad's Docker Compose repository.
* Make sure to have at least 4 GB of RAM to run the containers.
* Adjust your host's settings to run Elasticsearch properly:

  ```sh
  sudo sysctl -w vm.max_map_count=262144
  ```

## Distribuzione con Docker Compose

### Step 1: Clone the GitHub repo

```sh
git clone https://github.com/zammad/zammad-docker-compose.git
```

Assicurati di eseguire `git pull` frequentemente per scaricare gli
aggiornamenti. In alternativa, puoi scaricare i file dalla [pagina delle
release](https://github.com/zammad/zammad-docker-compose/releases){target=\_blank}.

### Step 2: Adjust environment as needed

Nel caso in cui l'ambiente predefinito non sia quello che stai cercando,
puoi personalizzare lo stack utilizzando scenari predefiniti e regolando le
variabili d'ambiente. Vai alla [sezione di
personalizzazione](#personalizzare-lo-stack-Zammad) qui sotto per trovare
maggiori informazioni.

### Step 3: Start the stack

```sh
cd zammad-docker-compose
```

```sh
docker compose up -d
```

Optional: Use an additional `.yml` file to use a pre-defined scenario. Read
on in the [Customizing the Zammad Stack](#customizing-the-zammad-stack)
section.

Una volta che lo stack è pronto, è possibile accedere a Zammad tramite
l'host e la porta Docker configurati, ad esempio `http://localhost:8080/`.

## Distribuzione con Portainer

Il modo più semplice per avviare Zammad è tramite un'interfaccia grafica
Docker. Consigliamo
[Portainer](https://www.portainer.io/){target=\_blank}. Per le istruzioni di
installazione, consultare la [documentazione di
Portainer](https://docs.portainer.io/){target=\_blank}.

### Step 1: Add stack

Nell'interfaccia di Portainer (ad esempio `https://yourdomain.tld:9443`),
scegli il tuo ambiente di destinazione, seleziona **Stacks**.

![Screenshot nella sezione Stack e evidenziata "Aggiungi
stack".](/screenshots/get-started/installation/portainer-stacks.png)

### Step 2: Build from repository

Passa al metodo di build **Repository** e fornisci le informazioni seguenti:

* **Nome**: inserisci il nome desiderato dello stack
* **URL repository**: `https://github.com/zammad/zammad-docker-compose`
* **Riferimento repository**: `refs/heads/master`
* **Percorso compose**: `docker-compose.yml` (predefinito)

Nel caso in cui l'ambiente predefinito non sia quello che stai cercando,
puoi personalizzare lo stack utilizzando scenari predefiniti e regolando le
variabili d'ambiente. Vai alla [sezione di
personalizzazione](#personalizzare-lo-stack-Zammad) qui sotto per trovare
maggiori informazioni.

![Creazione dello stack con le informazioni fornite nella schermata
Repository](/screenshots/get-started/installation/portainer-stack-creation.png)

### Step 3: Deploy the stack

Finally, click the `Deploy the stack` button. The first time, it may take
some time until the Docker images are fetched.

Una volta che lo stack è pronto, è possibile accedere a Zammad tramite
l'host e la porta Docker configurati, ad esempio `http://localhost:8080/`.

## Exposing the stack via HTTPS

To publish a Zammad stack on the internet, it needs to be secured via the
HTTPS protocol. To achieve that without modifying the Zammad stack, you can:

* Use a reverse proxy like Nginx Proxy Manager (NPM). It has a GUI that
  provides an easy [Let's Encrypt](https://letsencrypt.org/){target=\_blank}
  integration.
* Usa un tunnel Cloudflare, che fornisce la terminazione SSL.

Entrambi gli scenari sono descritti nella pagina separata [Scenari di Docker
Compose](/it/reference/docker-compose-scenarios).

Single sign-on with Kerberos uses the same reverse proxy, see [Single
sign-on with Kerberos](/en/tutorials/sso-kerberos).

## Customizing the Zammad stack

The Zammad Docker Compose stack is ready to run with its default
settings. You can adapt it to your environment by loading predefined
scenario files, adjusting environment variables and adding files specific to
your instance.

See the [Docker Compose scenarios
page](/en/reference/docker-compose-scenarios) for supported use cases and
detailed instructions on loading scenario files. To change individual
settings, use [Docker specific environment
variables](/en/reference/environment-variables).

If you deployed the stack with Docker Compose by cloning the repository, use
its `local/` directory for files that belong only to your instance. See the
[customize the stack
locally](/en/reference/docker-compose-scenarios#customize-the-stack-locally)
section for details.

## How to run commands in the stack

Esegui comandi nel tuo stack Docker chiamando `rails` o `rake` tramite uno
dei seguenti metodi.

:::: tabs key:docker-portainer

\=== Docker Compose

Directly execute a specific command:

```sh
docker compose run --rm zammad-railsserver bundle exec rails r '...your rails command here...'
```

Run the interactive Rails console to manually enter Rails commands:

```sh
docker compose run --rm zammad-railsserver bundle exec rails c
```

Via `docker compose exec`:

```sh
docker compose exec zammad-railsserver bundle exec rails r '...your rails command here...'
```

::: tip
Se devi recuperare informazioni dal server Rails, puoi, ad esempio,
inserire `pp` (pretty print) davanti al tuo comando Rails. Questo genera un output nel tuo terminale.
:::

\=== Portainer

In your Portainer GUI, go to the container view and select the running Rails container from your Zammad stack. Click
on the **Exec Console** icon in the "Quick Actions" column, select the standard `/bin/bash` entrypoint and click
**Connect**.

![Portainer console execution](/screenshots/get-started/installation/portainer-exec-console.png){width=80%}

Run the interactive Rails console by executing:

```sh
bundle exec rails c
```

Directly execute a specific command:

```sh
bundle exec rails r '...your rails command here...'
```

::::
