Environment variables
The reference of environment variables for Zato environments - ports, databases, passwords and platform settings.
This is the reference of environment variables that configure Zato environments, grouped by subject. Every variable is applied anew each time a container starts - set the variable, restart the container, it applies.
Port configuration
These variables control the network ports that Zato components listen on. You can override these to avoid port conflicts or to match your infrastructure requirements. A one-table summary of all the defaults is in the default ports reference.
| Variable | Default | Description |
|---|---|---|
Zato_Port_Dashboard | 8183 | Port for the Zato web dashboard. Access the admin interface at http://localhost:8183 |
Zato_Port_Dashboard_SSL | 8184 | TLS variant of the dashboard port |
Zato_Port_OpenAPI_Console | 8185 | Port for the OpenAPI console |
Zato_Port_OpenAPI_Console_SSL | 8186 | TLS variant of the OpenAPI console port |
Zato_Port_Server | 17010 | Port for the Zato server HTTP endpoint. This is where your services are exposed |
Zato_Port_Load_Balancer | 11223 | Port for the load balancer frontend. REST and HTTP traffic travels over this port - publish it if external API clients connect to your services |
Zato_Port_Load_Balancer_SSL | 11224 | TLS variant of the load balancer port |
Zato_Port_MLLP | 11553 | Port for HL7 MLLP traffic from clinical systems |
Zato_Port_MLLP_SSL | 11554 | TLS variant of the MLLP port |
Zato_Port_SSH | 22 | SSH port for accessing the container. Change this if port 22 is already in use on your host |
Server configuration
These variables control the runtime behavior of the Zato server.
| Variable | Default | Description |
|---|---|---|
Zato_TCP_Max_Msg_Size | 8 | Maximum size of a single incoming HTTP message, in megabytes. Requests larger than this limit are rejected |
Zato_API_Key_Name | X-API-Key | The default header name of API key security definitions |
Zato_Skip_SSL_Verify | False | Set to True to turn TLS verification off process-wide. For development only |
Automatic REST channels
The server can create REST channels automatically for deployed services - the linked chapter explains the pattern syntax and how the channels behave.
| Variable | Default | Description |
|---|---|---|
Zato_Auto_REST_Channel_Enabled | true | Set to false to turn auto-created channels off entirely |
Zato_Auto_REST_Channel_Prefix | /api/ | The URL prefix of auto-created channels |
Zato_Auto_REST_Channel_Include | (none) | Patterns of service names that receive a channel |
Zato_Auto_REST_Channel_Exclude | (none) | Patterns of service names that never receive one |
Zato_Auto_REST_Channel_Active | (none) | Patterns of service names whose channels start active |
Running behind another proxy
When something of your own - another load balancer, an ingress, a TLS terminator - stands in front of the container, these two say what to expect from it. Both are off by default, because whatever they turn on takes what arrives at face value. The ports reference shows which ports such a proxy stands in front of.
| Variable | Default | Description |
|---|---|---|
Zato_Trust_Forwarded_Headers | False | Set to True when the proxy in front sets X-Forwarded-For - the client address Zato reports is then taken from that header. Left off, forwarded headers are dropped and the address is the one the container itself sees |
Zato_MLLP_Expect_Proxy | False | Set to True when the proxy in front sends the PROXY protocol header on HL7 MLLP connections - the MLLP port then requires every connection to open with one and refuses senders that connect without it |
ODB configuration
The ODB of a quickstart container is SQLite by default and can use an external MySQL or PostgreSQL database instead. These variables configure its connection, including SSL/TLS. The certificate paths point to locations inside the container, so mount the certificate files first, e.g. under /opt/hot-deploy/ssl.
| Variable | Default | Description |
|---|---|---|
Zato_ODB_Type | sqlite | The database type - one of sqlite, mysql or postgresql |
Zato_ODB_Host | (none) | The host the database runs on |
Zato_ODB_Port | (none) | The port the database listens on |
Zato_ODB_Username | (none) | The username to connect with |
Zato_ODB_Password | (generated) | The password to connect with. Also sets the database passwords of full containers |
Zato_ODB_Name | (none) | The database name |
Zato_ODB_SSL | off | Whether to encrypt the connections with SSL/TLS - on or off |
Zato_ODB_SSL_CA_File | (system store) | Path to the CA certificate the server certificate is verified against |
Zato_ODB_SSL_Cert_File | (none) | Path to the client certificate, for mutual TLS |
Zato_ODB_SSL_Key_File | (none) | Path to the client private key, for mutual TLS |
Zato_ODB_SSL_Verify | on | Whether to verify the server certificate and hostname when SSL is on |
Audit log configuration
The audit log stores its events in SQLite by default and can use MySQL, PostgreSQL or Oracle DB instead. These variables configure its database connections, including SSL/TLS.
| Variable | Default | Description |
|---|---|---|
Zato_Audit_Log_DB_Type | sqlite | The database type - one of sqlite, mysql, postgresql or oracle |
Zato_Audit_Log_DB_Host | (none) | The host the database runs on |
Zato_Audit_Log_DB_Port | 3306, 5432 or 1521 | The port the database listens on, defaulting per database type |
Zato_Audit_Log_DB_Username | (none) | The username to connect with |
Zato_Audit_Log_DB_Password | (none) | The password to connect with |
Zato_Audit_Log_DB_Name | audit.db | The database name - the service name with Oracle DB, or the full file path with SQLite |
Zato_Audit_Log_DB_SSL | off | Whether to encrypt the connections with SSL/TLS - on or off |
Zato_Audit_Log_DB_SSL_CA_File | (system store) | Path to the CA certificate the server certificate is verified against |
Zato_Audit_Log_DB_SSL_Cert_File | (none) | Path to the client certificate, for mutual TLS |
Zato_Audit_Log_DB_SSL_Key_File | (none) | Path to the client private key, for mutual TLS |
Zato_Audit_Log_DB_SSL_Verify | on | Whether to verify the server certificate and hostname when SSL is on |
Audit log retention and writing
These control how long events live, how much of a message is kept, and how events are written.
| Variable | Default | Description |
|---|---|---|
Zato_Audit_Log_Enabled | True | Set to False to turn the audit log off entirely - every write becomes a no-op |
Zato_Audit_Log_Retention_Days | 30 | How many days of events are kept before the rows are deleted |
Zato_Audit_Log_Content_Retention_Days | (same as rows) | How many days message content is kept. Set it lower than the row retention to keep the record of a message - when it happened and with what outcome - after its payload is gone |
Zato_Audit_Log_Archive_Dir | (none) | A directory to write rows into before they are deleted. Nothing is archived if it is not set |
Zato_Audit_Log_Max_Attachment_Size | 10485760 | How big one attachment may be, in bytes, for its bytes to be stored. Larger ones are recorded but their content is not kept |
Zato_Audit_Log_Flush_Max_Size | 1 | How many events are batched before a write. The default of one means events are written synchronously, raise it for high-volume producers |
Zato_Audit_Log_Flush_Max_Wait_Ms | 500 | How long a batched event may wait before it is written regardless of the batch size |
Both retention variables can be applied to one source only, by appending the source name in upper case with dashes turned into underscores, e.g. Zato_Audit_Log_Retention_Days_AS2 or Zato_Audit_Log_Content_Retention_Days_REST_CHANNEL. The per-source variable wins over the general one. The audit log chapter lists the source names.
Other databases configured through the environment
Three more data stores can each use their own external database, configured entirely through the environment. Each family follows the same shape as the audit log's table above, with the prefix replaced:
| Prefix | Data store |
|---|---|
Zato_Analytics_DB_ | Traffic analytics |
Zato_PubSub_DB_ | Pub/sub messages |
Zato_Ext_DB_ | The external data store available to services |
Additional pub/sub settings
| Variable | Description |
|---|---|
Zato_PubSub_Delivered_Max_Messages | How many delivered pub/sub messages may accumulate before they are cleaned up |
Zato_PubSub_Delivered_Max_Days | How many days delivered messages are kept before they are cleaned up |
Zato_PubSub_DB_Batch_Size | How many rows one database statement contains |
Scheduler
The multi-server chapter explains where the scheduler runs in environments with more than one server.
| Variable | Description |
|---|---|
Zato_Scheduler_Redis_Host | Host of the Redis instance backing the scheduler |
Zato_Scheduler_Redis_Port | Its port |
Zato_Scheduler_Redis_Password | Its password |
Zato_Scheduler_HTTP_Port | The HTTP port the scheduler listens on |
Zato_Scheduler_Bind_Port | The port the scheduler binds to |
Zato_Server_To_Scheduler_Use_TLS | Whether servers reach the scheduler over TLS |
Zato_Scheduler_Use_TLS | Whether the scheduler itself serves TLS |
Zato_Scheduler_TLS_Verify | Whether certificates are verified |
Zato_Scheduler_TLS_Cert_Location | Path to the scheduler's certificate |
Zato_Scheduler_TLS_Private_Key_Location | Path to its private key |
Zato_Scheduler_TLS_CA_Certs_Key_Location | Path to the CA certificates |
Dashboard
Dashboard authentication covers the admin account and Microsoft Entra ID single sign-on that these variables configure.
| Variable | Description |
|---|---|
Zato_Dashboard_Auth_Type | The authentication backend, e.g. entra for Microsoft Entra ID single sign-on |
Zato_Dashboard_Auth_Entra_Tenant_Id | The Entra tenant |
Zato_Dashboard_Auth_Entra_Client_Id | The application's client ID |
Zato_Dashboard_Auth_Entra_Client_Secret | Its client secret |
Zato_Dashboard_Auth_Entra_Redirect_URL | The URL Entra redirects back to |
Zato_Dashboard_Auth_Entra_Group_Admin | The group whose members are administrators |
Zato_Dashboard_Auth_Entra_Auto_Login | Whether to skip the login screen and go straight to Entra |
Zato_Dashboard_Session_Timeout | Session lifetime in seconds, 7200 by default |
Zato_Dashboard_Workers | How many worker processes serve the dashboard |
Zato_Dashboard_CSRF_Trusted_Origins | Comma-separated origins trusted for CSRF protection, needed when the Dashboard is reached through a proxy or under its own domain |
Zato_Server_Address | The host:port address of the server the dashboard invokes |
HL7 MLLP
Tuning for the MLLP listener, all integers unless noted.
| Variable | Description |
|---|---|
Zato_HL7_MLLP_Max_Connections | How many concurrent connections one listener accepts |
Zato_HL7_MLLP_Accept_Backlog | The TCP accept backlog |
Zato_HL7_MLLP_Idle_Timeout | Seconds an idle connection is kept open |
Zato_HL7_MLLP_Max_Msg_Size | The largest accepted message, in bytes |
Zato_HL7_MLLP_Read_Buffer_Size | The socket read buffer size |
Zato_HL7_Trace | Set to True to trace MLLP wire traffic in logs and the audit log |
Authentication and passwords
These variables set passwords for various Zato components. If not provided, secure random passwords are generated automatically - changing passwords and security defaults cover what to change and when.
| Variable | Default | Description |
|---|---|---|
Zato_Password | (generated) | One password for the SSH, IDE and Dashboard users and the two load balancer passwords below. It does not cover Zato_Metrics_Password or Zato_ODB_Password. Useful for development |
Zato_Dashboard_Password | (generated) | Password for the admin user in the Zato web dashboard |
Zato_IDE_Password | (generated) | Password for the ide_publisher user for IDE integration |
Zato_SSH_Password | (generated) | SSH password for the zato user inside the container |
Zato_ODB_Password | (generated) | Password for database users. Sets both main and pub/sub database passwords |
Monitoring configuration
These variables configure monitoring with Prometheus and the load balancer's own endpoints listed in the ports reference.
| Variable | Default | Description |
|---|---|---|
Zato_Metrics_Password | (generated) | Password for HTTP Basic Auth on the /metrics Prometheus endpoint. If not set, a random password is generated automatically. Can also be changed later in the web admin dashboard under Security -> HTTP Basic Auth |
Zato_Load_Balancer_Stats_Password | (generated) | Password of the stats user for the load balancer's own /stats page on port 8404 - see default ports |
Zato_Load_Balancer_Metrics_Password | (generated) | Password of the metrics user for the load balancer's own Prometheus /metrics endpoint on port 8404 |
Logging configuration
These variables change log levels and rotation settings. The logging chapter covers them all in detail.
| Variable | Default | Description |
|---|---|---|
Zato_Log_Level | (unset) | Overrides the level of every logger, e.g. DEBUG |
Zato_Log_Level_<Suffix> | (unset) | Overrides one logger only, with the suffix derived from the logger's name, e.g. Zato_Log_Level_Root, Zato_Log_Level_Server_Main or Zato_Log_Level_REST |
Zato_Scheduler_Log_Level | info | Log level of the scheduler process - one of error, warn, info, debug or trace |
Zato_Log_User_Services_Deployed | False | Set to True to log the name of each user service deployed on startup |
Zato_Server_Log_Max_Size | 1000000000 | Size in bytes at which server.log and http_access.log are rotated, 1 GB by default |
Zato_Server_Log_Backup_Count | 2 | How many rotated copies of those two logs are kept |
SSL/TLS configuration
These configure the TLS the load balancer serves. The variables marked "auto-generated only" shape the self-signed certificate the container creates when you do not mount a zato.pem of your own, and are ignored when you do. The SSL/TLS chapter covers the whole subject.
| Variable | Default | Description |
|---|---|---|
Zato_SSL_Subject | /C=US/ST=State/L=City/O=Organization/CN=localhost | Certificate subject, auto-generated only |
Zato_SSL_Subject_Alt_Name | subjectAltName=DNS:localhost,IP:127.0.0.1 | Subject alternative names, auto-generated only |
Zato_SSL_Cert_Days | 3650 | Validity period in days, auto-generated only |
Zato_SSL_Key_Algorithm | ecdsa | Key algorithm, ecdsa or rsa, auto-generated only |
Zato_SSL_Key_Size | 4096 | Key size for RSA keys, auto-generated only |
Zato_SSL_Protocols | (empty) | Minimum TLS version, e.g. TLSv1.2 or TLSv1.3 |
Zato_SSL_Ciphers | (empty) | Allowed cipher suites |
Zato_SSL_DH_Params | (empty) | Path to a Diffie-Hellman parameters file |
Zato_SSL_Extra_Options | (empty) | Additional load balancer SSL options |
Zato_SSL_Client_Verify | optional | Set to required to reject clients without a valid certificate at the handshake, which applies when client-ca.pem is mounted |
Zato_Update_CA_Certificates | False | Set to True to have certificates mounted under /usr/local/share/ca-certificates/ added to the container's trust store. Needed when your outgoing connections talk to systems using a private CA |
Environment configuration
| Variable | Default | Description |
|---|---|---|
Zato_Env_Name | (empty) | Custom name for your environment, displayed during startup - pair it with the Dashboard environment indicators |
Startup behavior configuration
These variables control what components start and how the container behaves during startup - starting and stopping covers the container lifecycle.
| Variable | Default | Description |
|---|---|---|
Zato_Start_Scheduler | True | Whether to start the scheduler. Set to False on every container except the one that is to run it, see multi-server environments |
Zato_Log_Env_Details | False | Set to True to write environment details - passwords and ports - to files on startup |
Zato_Suppress_Output | (empty) | Set to True to suppress verbose output during container startup |
Zato_Verbose | (empty) | Set to True to enable verbose logging during startup |
Proxy configuration
These variables configure HTTP/HTTPS proxy settings for the container's own outgoing traffic.
| Variable | Default | Description |
|---|---|---|
HTTP_PROXY | (empty) | HTTP proxy URL for outgoing connections |
HTTPS_PROXY | (empty) | HTTPS proxy URL for outgoing connections |
http_proxy | (empty) | Lowercase variant of HTTP proxy URL |
https_proxy | (empty) | Lowercase variant of HTTPS proxy URL |
NO_PROXY | (empty) | Comma-separated list of hosts to exclude from proxy |
no_proxy | (empty) | Lowercase variant of NO_PROXY |
Usage examples
Basic development setup
docker run -it --rm \
-p 8183:8183 \
-p 17010:17010 \
-e Zato_Password=mypassword \
-e Zato_Log_Env_Details=True \
zatosource/zato-4.1:latest
Custom port configuration
docker run -it --rm \
-p 9000:9000 \
-p 18000:18000 \
-e Zato_Port_Dashboard=9000 \
-e Zato_Port_Server=18000 \
-e Zato_Password=mypassword \
zatosource/zato-4.1:latest
Notes
- All passwords are automatically generated with secure random values if not explicitly provided
- The
Zato_Passwordvariable is a convenience setting that covers the SSH, IDE and Dashboard passwords and the two load balancer ones - When
Zato_Log_Env_Details=True, credentials are saved to/opt/zato/env/details/all-zato-env-details.jsonand.txtfiles inside the container - nothing is written there otherwise - Port variables only affect the internal configuration, you still need to map ports with Docker's
-pflag