---
url: https://next.zammad.org/it/reference/environment-variables.md
---

# Environment variables

Trova di seguito le variabili d’ambiente più importanti con i valori predefiniti (come ), se
applicabile. Le variabili per le installazioni basate su Docker e pacchetti possono essere diverse in alcuni casi. Puoi trovare
un altro badge aggiunto ai nomi delle variabili con il seguente significato:

* Disponibile solo per installazioni Docker: ::d::
* Disponibile solo per installazioni tramite pacchetto: ::p::
* Disponibile per entrambe le varianti di installazione: senza badge

::: tip

Se vuoi usare un file `.env` nelle distribuzioni Docker Compose, puoi usare quello fornito.

:::

## Varie

`GPG_PATH` ::p::
: Definisce il percorso della tua installazione GPG. Necessario solo se vuoi usarla.

`RAILS_LOG_TO_STDOUT` ::p::
: Questa impostazione può essere sovrascritta durante l'aggiornamento sulle installazioni tramite pacchetto.

`ZAMMAD_SAFE_MODE` ::p::
: Fai attenzione quando esegui comandi Zammad su sistemi di produzione.

`ZAMMAD_BIND_IP` ::p::&#x20;
:
The IP address that the web server is bound to.

`S3_URL` ::p::
: Ti permette di fornire la configurazione del tuo provider di storage S3. Esempio per.

## Zammad

`VERSION` ::d::&#x20;
: Allows customization of the Zammad image tag. Example: `6.3.1-54`. This default version may be increased when you
update your Zammad Docker stack. Please see the
[example env file](https://github.com/zammad/zammad-docker-compose/blob/master/.env.dist){target=\_blank}
for more details on this variable.

`AUTOWIZARD_JSON` ::d::
: This variable allows you to provide initial configuration data for your instance. Autowizard JSON is out of scope of
this documentation, however
[this example file](https://github.com/zammad/zammad/blob/stable/contrib/auto_wizard_example.json){target=\_blank}
should help.

`ZAMMAD_HTTP_TYPE`
:
Set the http type for your instance. Possible values are `http` and `https`.

`ZAMMAD_FQDN`
:
Set the FQDN for your instance.

`RAILS_TRUSTED_PROXIES`&#x20;
: Questa impostazione è importante.

Per impostazione predefinita, Zammad si fida solo dei proxy localhost. Eventuali server proxy aggiuntivi devono essere aggiunti.

Nota che nel contesto Docker, Zammad potrebbe vedere l'indirizzo IP del gateway di rete invece di.

The same list decides which address Zammad treats as the client's, and single sign-on checks that address against
the **Trusted SSO Proxy IPs** setting, see [Single sign-on with Kerberos](/en/tutorials/sso-kerberos).

`ZAMMAD_MANAGE_SESSIONS_JOBS_WORKERS`&#x20;
: Permette di forkare il worker.

`ZAMMAD_PROCESS_DELAYED_AI_JOBS_WORKERS`&#x20;
: Tale worker gestisce.

Gli utenti AI self-hosted dovrebbero fare attenzione ad aumentarlo, il tuo servizio AI potrebbe collassare.

`ZAMMAD_PROCESS_DELAYED_AI_JOBS_WORKERS_THREADS`&#x20;
: Quanti.

`ZAMMAD_PROCESS_DELAYED_COMMUNICATION_INBOUND_JOBS_WORKERS`&#x20;

`ZAMMAD_PROCESS_DELAYED_COMMUNICATION_INBOUND_JOBS_WORKER_THREADS` \<Badge type="tip" text=

`MEMCACHE_SERVERS`  \<Badge type=

`REDIS_URL` &#x20;
: Fornisci una tua istanza Redis se ne hai già una. Il fallback dell’installazione tramite pacchetto è
`/opt/zammad/tmp/websocket_*`. Consulta [Variabili Redis](/en/reference/redis) per una configurazione con Sentinel.

`LD_PRELOAD`  ::p::
: Preloads a shared library for all Zammad processes. Package installations use it to enable
[jemalloc](/en/reference/memory-allocator) as memory allocator and set it automatically if the library is present on
your system. This variable is managed by the package install script and may be overwritten during updates.

`ZAMMAD_USE_JEMALLOC` ::p::
: Set to `no` to opt out of [jemalloc](/en/reference/memory-allocator) as memory allocator. Takes effect on the next
package installation or upgrade. Unset it to opt back in; any value other than `no` re-enables `jemalloc` on the
next package installation or upgrade.

## Elasticsearch

`ELASTICSEARCH_ENABLED` ::d::&#x20;
: Impostare questa variabile su.

`ELASTICSEARCH_HOST` ::d::&#x20;
:
Provide a host name or address to your external Elasticsearch cluster.

`ELASTICSEARCH_PORT` ::d::&#x20;
:
Provide a different port for Elasticsearch if needed.

`ELASTICSEARCH_SCHEMA` ::d::&#x20;
:
Change it to `https` if your Elasticsearch cluster is configured to use SSL.

`ELASTICSEARCH_NAMESPACE` ::d::&#x20;
:
With this name space all Zammad related indexes will be created. Change this if you're using external clusters.

`ELASTICSEARCH_REINDEX` ::d::
: L'indice di ricerca viene ricostruito automaticamente quando nessun indice.

`ELASTICSEARCH_SSL_VERIFY` ::d::&#x20;
: Ti permette di far.

`ELASTICSEARCH_HEAP_SIZE` ::d::&#x20;
: Imposta la memoria disponibile.

## PostgreSQL

::: tip
Le variabili per l'installazione Docker e tramite pacchetto sono parzialmente diverse. Controlla le limitazioni.
:::

`POSTGRESQL_HOST` ::p::&#x20;
: Nome host o indirizzo IP.

`POSTGRESQL_PORT` ::p::&#x20;
:
Adjust the port of your PostgreSQL server.

`POSTGRESQL_USER` ::p::&#x20;
:
The database user for Zammad.

`POSTGRESQL_PASS` ::p::&#x20;
:
The password of Zammad's database user.

`POSTGRESQL_DB` ::p::&#x20;
:
Zammad's database to use.

`POSTGRES_HOST` ::d::&#x20;
: Host name or IP address of your PostgreSQL server. In case you use an IPv6 address, enclose the address in square
brackets (e.g. `[2001:db8::2]`).

`POSTGRES_PORT` ::d::&#x20;
:
Adjust the port of your PostgreSQL server.

`POSTGRES_USER` ::d::&#x20;
:
The database user for Zammad.

`POSTGRES_PASS` ::d::&#x20;
:
The password of Zammad's database user.

`POSTGRES_DB` ::d::&#x20;
:
Zammad's database to use.

`POSTGRESQL_OPTIONS`&#x20;
:
Additional PostgreSQL params to be appended to the database URI.

`POSTGRESQL_DB_CREATE`&#x20;
: Per impostazione predefinita, Zammad crea il database necessario. Su server di database già esistenti, il valore predefinito potrebbe
causare problemi.

## Nginx

`NGINX_EXPOSE_PORT` ::d::&#x20;
: La porta da esporre per l'accesso.

`NGINX_PORT` ::d::&#x20;
:
The internal port the Nginx service will listen on.

`NGINX_SERVER_NAME` ::d::&#x20;
:
By default, the Nginx container of Zammad will respond to all request. You can provide your IP / FQDN if you want to.

`NGINX_SERVER_SCHEME` ::d::&#x20;
: If the Nginx container for Zammad **is not** the upstream server (aka you're using another proxy in front of Nginx)
`$scheme` may be wrong. You can set the correct scheme `http` or `https` if needed. Set this if you face a
`CSRF Token Verification Failed` error.

`NGINX_CLIENT_MAX_BODY_SIZE` ::d::
:
Define the maximum size of data that a client can send to the server.

`ZAMMAD_RAILSSERVER_HOST` ::d::&#x20;
:
Host name of the Rails server container.

`ZAMMAD_RAILSSERVER_PORT` ::d::&#x20;
:
Port of Zammad's Rails server.

`ZAMMAD_RAILS_PORT` ::p::&#x20;
:
Port of Zammad's Rails server.

`ZAMMAD_WEBSOCKET_HOST` ::d::&#x20;
:
Host name of Zammad's WebSocket server.

`ZAMMAD_WEBSOCKET_PORT` ::d::&#x20;
:
Port of Zammad's WebSocket server.

## Performance tuning

Ognuna delle impostazioni seguenti comporta dei compromessi. Non ci sono
valori consigliati qui.

Procedi con cautela; quando regoli una di queste impostazioni, c'è un punto
in cui le prestazioni.

Le impostazioni riportate di seguito possono consumare tutte le connessioni
disponibili del database. Considera la sezione [Configure Database
Server](config-db-server) per maggiori informazioni.

`ZAMMAD_WEB_CONCURRENCY`
: Consente di avviare `n` worker per permettere più connessioni simultanee all’interfaccia web di Zammad. Nel caso tu abbia applicato
[limiti alle risorse hardware di Docker](docker-compose-scenarios#limit-resources), l’impostazione della CPU del servizio zammad-railsserver
dovrebbe corrispondere al valore di questa variabile.

`ZAMMAD_PROCESS_SESSION_JOBS_WORKERS`
: Quanti processi del worker di sessione eseguire.

Nel caso tu abbia applicato [limiti alle risorse hardware di Docker](docker-compose-scenarios#limit-resources), l’impostazione della CPU del servizio zammad-scheduler
dovrebbe corrispondere alla somma di tutte le variabili di impostazione dei worker.

`ZAMMAD_PROCESS_SCHEDULED_JOBS_WORKERS`
: Permette di generare `1` worker indipendente per i job pianificati.

Nel caso tu abbia applicato [limiti alle risorse hardware di Docker](docker-compose-scenarios#limit-resources), l’impostazione della CPU del servizio zammad-scheduler
dovrebbe corrispondere alla somma di tutte le variabili di impostazione dei worker.

`ZAMMAD_PROCESS_DELAYED_JOBS_WORKERS`
: Permette di generare `n` processi worker per rilasciare.

Nel caso tu abbia applicato [limiti alle risorse hardware di Docker](docker-compose-scenarios#limit-resources), l’impostazione della CPU del servizio zammad-scheduler
dovrebbe corrispondere alla somma di tutte le variabili di impostazione dei worker.

`ZAMMAD_PROCESS_DELAYED_JOBS_WORKER_THREADS`
: Thread usati da **un** worker dei job ritardati.

## HTTP client settings

Impostazioni globali di timeout HTTP. Queste variabili controllano il
comportamento di timeout predefinito.

`ZAMMAD_HTTP_OPEN_TIMEOUT`&#x20;
: Definisce il tempo massimo in secondi.

`ZAMMAD_HTTP_READ_TIMEOUT`&#x20;
: Definisce il tempo massimo in secondi.

`ZAMMAD_HTTP_TOTAL_TIMEOUT`&#x20;
: Defines the maximum total time in seconds for the complete HTTP request, wrapping connection establishment and
response read. This is an additional hard ceiling on top of `ZAMMAD_HTTP_OPEN_TIMEOUT` and
`ZAMMAD_HTTP_READ_TIMEOUT`.

## How to set environment variables

Dipende da come hai installato Zammad (pacchetto, Docker). Impostala tramite
`zammad config`.

Esempi per installazioni tramite pacchetto:

Imposta OPZIONE a "valore":

```sh
zammad config:set OPTION=value
```

Ottieni OPZIONE:

```sh
zammad config:get OPTION
```

Rimuovi OPZIONE:

```sh
zammad config:unset OPTION
```

Riavvia Zammad dopo aver modificato le impostazioni:

```sh
sudo systemctl restart zammad
```
