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.

VariableDefaultDescription
Zato_Port_Dashboard8183Port for the Zato web dashboard. Access the admin interface at http://localhost:8183
Zato_Port_Dashboard_SSL8184TLS variant of the dashboard port
Zato_Port_OpenAPI_Console8185Port for the OpenAPI console
Zato_Port_OpenAPI_Console_SSL8186TLS variant of the OpenAPI console port
Zato_Port_Server17010Port for the Zato server HTTP endpoint. This is where your services are exposed
Zato_Port_Load_Balancer11223Port 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_SSL11224TLS variant of the load balancer port
Zato_Port_MLLP11553Port for HL7 MLLP traffic from clinical systems
Zato_Port_MLLP_SSL11554TLS variant of the MLLP port
Zato_Port_SSH22SSH 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.

VariableDefaultDescription
Zato_TCP_Max_Msg_Size8Maximum size of a single incoming HTTP message, in megabytes. Requests larger than this limit are rejected
Zato_API_Key_NameX-API-KeyThe default header name of API key security definitions
Zato_Skip_SSL_VerifyFalseSet 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.

VariableDefaultDescription
Zato_Auto_REST_Channel_EnabledtrueSet 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.

VariableDefaultDescription
Zato_Trust_Forwarded_HeadersFalseSet 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_ProxyFalseSet 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.

VariableDefaultDescription
Zato_ODB_TypesqliteThe 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_SSLoffWhether 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_VerifyonWhether 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.

VariableDefaultDescription
Zato_Audit_Log_DB_TypesqliteThe 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_Port3306, 5432 or 1521The 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_Nameaudit.dbThe database name - the service name with Oracle DB, or the full file path with SQLite
Zato_Audit_Log_DB_SSLoffWhether 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_VerifyonWhether 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.

VariableDefaultDescription
Zato_Audit_Log_EnabledTrueSet to False to turn the audit log off entirely - every write becomes a no-op
Zato_Audit_Log_Retention_Days30How 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_Size10485760How 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_Size1How 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_Ms500How 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:

PrefixData 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

VariableDescription
Zato_PubSub_Delivered_Max_MessagesHow many delivered pub/sub messages may accumulate before they are cleaned up
Zato_PubSub_Delivered_Max_DaysHow many days delivered messages are kept before they are cleaned up
Zato_PubSub_DB_Batch_SizeHow many rows one database statement contains

Scheduler

The multi-server chapter explains where the scheduler runs in environments with more than one server.

VariableDescription
Zato_Scheduler_Redis_HostHost of the Redis instance backing the scheduler
Zato_Scheduler_Redis_PortIts port
Zato_Scheduler_Redis_PasswordIts password
Zato_Scheduler_HTTP_PortThe HTTP port the scheduler listens on
Zato_Scheduler_Bind_PortThe port the scheduler binds to
Zato_Server_To_Scheduler_Use_TLSWhether servers reach the scheduler over TLS
Zato_Scheduler_Use_TLSWhether the scheduler itself serves TLS
Zato_Scheduler_TLS_VerifyWhether certificates are verified
Zato_Scheduler_TLS_Cert_LocationPath to the scheduler's certificate
Zato_Scheduler_TLS_Private_Key_LocationPath to its private key
Zato_Scheduler_TLS_CA_Certs_Key_LocationPath to the CA certificates

Dashboard

Dashboard authentication covers the admin account and Microsoft Entra ID single sign-on that these variables configure.

VariableDescription
Zato_Dashboard_Auth_TypeThe authentication backend, e.g. entra for Microsoft Entra ID single sign-on
Zato_Dashboard_Auth_Entra_Tenant_IdThe Entra tenant
Zato_Dashboard_Auth_Entra_Client_IdThe application's client ID
Zato_Dashboard_Auth_Entra_Client_SecretIts client secret
Zato_Dashboard_Auth_Entra_Redirect_URLThe URL Entra redirects back to
Zato_Dashboard_Auth_Entra_Group_AdminThe group whose members are administrators
Zato_Dashboard_Auth_Entra_Auto_LoginWhether to skip the login screen and go straight to Entra
Zato_Dashboard_Session_TimeoutSession lifetime in seconds, 7200 by default
Zato_Dashboard_WorkersHow many worker processes serve the dashboard
Zato_Dashboard_CSRF_Trusted_OriginsComma-separated origins trusted for CSRF protection, needed when the Dashboard is reached through a proxy or under its own domain
Zato_Server_AddressThe host:port address of the server the dashboard invokes

HL7 MLLP

Tuning for the MLLP listener, all integers unless noted.

VariableDescription
Zato_HL7_MLLP_Max_ConnectionsHow many concurrent connections one listener accepts
Zato_HL7_MLLP_Accept_BacklogThe TCP accept backlog
Zato_HL7_MLLP_Idle_TimeoutSeconds an idle connection is kept open
Zato_HL7_MLLP_Max_Msg_SizeThe largest accepted message, in bytes
Zato_HL7_MLLP_Read_Buffer_SizeThe socket read buffer size
Zato_HL7_TraceSet 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.

VariableDefaultDescription
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.

VariableDefaultDescription
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.

VariableDefaultDescription
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_LevelinfoLog level of the scheduler process - one of error, warn, info, debug or trace
Zato_Log_User_Services_DeployedFalseSet to True to log the name of each user service deployed on startup
Zato_Server_Log_Max_Size1000000000Size in bytes at which server.log and http_access.log are rotated, 1 GB by default
Zato_Server_Log_Backup_Count2How 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.

VariableDefaultDescription
Zato_SSL_Subject/C=US/ST=State/L=City/O=Organization/CN=localhostCertificate subject, auto-generated only
Zato_SSL_Subject_Alt_NamesubjectAltName=DNS:localhost,IP:127.0.0.1Subject alternative names, auto-generated only
Zato_SSL_Cert_Days3650Validity period in days, auto-generated only
Zato_SSL_Key_AlgorithmecdsaKey algorithm, ecdsa or rsa, auto-generated only
Zato_SSL_Key_Size4096Key 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_VerifyoptionalSet to required to reject clients without a valid certificate at the handshake, which applies when client-ca.pem is mounted
Zato_Update_CA_CertificatesFalseSet 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

VariableDefaultDescription
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.

VariableDefaultDescription
Zato_Start_SchedulerTrueWhether 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_DetailsFalseSet 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.

VariableDefaultDescription
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_Password variable 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.json and .txt files inside the container - nothing is written there otherwise
  • Port variables only affect the internal configuration, you still need to map ports with Docker's -p flag

Learn more