On-prem gateway
Connect a cloud-hosted Zato environment to systems on a private network.
The On-prem gateway connects a Zato environment running in a public cloud to systems that reside on a private network, such as databases, APIs and file servers.
Zato itself is self-hosted and runs in your own data center, in a private cloud or in a public cloud, as described under Installation. The gateway is used only when Zato runs outside the private network of the systems it connects to.

The gateway is installed on a host on the private network and connects to the Zato container. Once it is connected, Zato accesses the on-prem systems as if it ran on the private network itself. The connection is always made from the private network outwards, so a deployment requires neither a VPN nor an inbound firewall rule.
Installation
The gateway runs on Linux hosts with systemd. On Windows, it runs under WSL2, in a Linux distribution with systemd enabled, and setting up WSL2 is described in Installation on Windows.
To install a gateway:
- In the Dashboard, open System and then On-prem gateways, and create a gateway with the on-prem systems it provides access to, as described in Configuration.
- Click Enrollment token next to the gateway, then click Copy.
On a host on the private network that meets the requirements, run the command below, with the token in place of
TOKEN:sudo curl -fsSL -o /usr/local/bin/zato-on-prem-gateway \ https://github.com/zatosource/zato-on-prem-gateway/releases/latest/download/zato-on-prem-gateway-linux-amd64 && \ sudo chmod +x /usr/local/bin/zato-on-prem-gateway && \ sudo zato-on-prem-gateway install --token TOKENOn ARM64 hosts, use
linux-arm64in place oflinux-amd64. When the host reaches the internet through a proxy, the proxy is set as described in Proxies.
The gateway then runs as a service that starts on boot, and the Dashboard shows it as Connected. The other commands of the gateway are listed in the On-prem gateway reference.
Outgoing connections
An outgoing connection is configured with the host name and the port of the on-prem system, exactly as it would be if Zato ran on the private network:
No property of an outgoing connection refers to the gateway. The same applies to every kind of outgoing connection, including SQL, REST, SOAP, AMQP, LDAP and SFTP. TLS certificates are validated as they are on a direct connection.
Configuration
Gateways are configured in the Dashboard, under System and then On-prem gateways. A gateway has the following properties.
| Property | Description |
|---|---|
| Name | The name of the gateway |
| Active | Whether the gateway may connect |
| Require key resets | Whether a gateway that is already enrolled can be enrolled again only after Reset key, as described in Re-enrollment |
| On-prem systems | The systems the gateway provides access to, one host:port per line |
A list of on-prem systems takes the following form:
Only the systems on the list can be accessed through the gateway. The same host:port cannot be configured under two gateways, because two private networks may each have a different system under the same name and Zato would not know which one a connection is meant for.
Port numbers
Note that each of the following port numbers can be used by only one on-prem system: 8183, 8184, 8185, 8186, 11223, 11224, 11553, 11554 and 17010.
The SSH port of the container, 22 by default, cannot be used by on-prem systems.
Enrollment
A gateway is connected to Zato with the enrollment token that is copied from the Dashboard during the installation.
A token is valid for 24 hours and can be used once. Issuing a new token for a gateway replaces any earlier token of that gateway that has not been used yet. After enrollment, the gateway authenticates with its own key, which is generated on the host and never leaves it. No further action is required when the Zato environment or the host is restarted, the gateway reconnects on its own.
Gateway list
The list of gateways in the Dashboard is refreshed on its own and shows the following columns for each gateway.
| Column | Description |
|---|---|
| Status | The current state of the gateway, as described in Status reference |
| Systems | The number of on-prem systems configured for the gateway |
| Connected since | How long the gateway has been connected |
| Remote address | The address the gateway connects from |
| Version | The version of the gateway running on the on-prem host |
| Platform | The operating system and the architecture of the on-prem host, e.g. linux/amd64 |
Status reference
The Dashboard reports one of the following statuses for each gateway.
| Status | Description |
|---|---|
| Connected | The gateway is connected and the on-prem systems can be accessed. |
| Enrolled, offline | The gateway is enrolled but not connected. Either the gateway is not running or the host cannot reach the Zato environment. |
| Not enrolled | The gateway is configured in the Dashboard and no enrollment token has been used yet. |
| Not active | The gateway is inactive and may not connect. |
Re-enrollment
A gateway is enrolled again when the host is reinstalled or the gateway is moved to another host, as described in Relocating a gateway. To revoke the key of a gateway, click Reset key next to it. The gateway is disconnected and remains so until it is enrolled again.
The Require key resets setting determines how a new enrollment token is treated.
| Setting | Behavior |
|---|---|
| Enabled | A new enrollment token is accepted only after Reset key. This is the default. |
| Disabled | A new enrollment token is accepted directly and Reset key is not required. |
Public address
An enrollment token contains the address the gateway connects to. By default, this is the host name the Dashboard is reached on, combined with the port of the load balancer of the Zato environment. When gateways are to use a different address, for instance one published by a Kubernetes ingress, set Zato_On_Prem_Gateway_Public_Address to that address, e.g. https://api.example.com.
Configuration as code
Gateways are part of enmasse and are maintained in the same repository as the rest of an environment's configuration:
on_prem_gateway:
- name: head-office
is_active: true
is_key_reset_required: true
hosts:
- erp-db.corp.local:5432
- crm.corp.local:443
Enrollment tokens and keys are not part of an exported file.