# Data Gateway

The Lumi AI Data Gateway is a lightweight application for facilitating secure connections between local systems and the Lumi AI platform. It is an effective alternative for systems that should not be directly accessible from the Internet.

If you're looking for a guide to setup an instance of the Data Gateway, view our article on [Deploying the Data Gateway](https://docs.lumi-ai.com/product-features/data-gateway/deploying-the-data-gateway).

## How it Works <a href="#how-it-works" id="how-it-works"></a>

The Data Gateway runs as a service on a local system. It continuously polls the Lumi AI platform for pending requests, executes those requests against the local source system, and returns the results — including query data and associated metadata — back to the platform.

<figure><img src="https://1092914297-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbsNNtXffkOLYrtYRQIcx%2Fuploads%2FfTZQKFzP7HpwfOJLjcAg%2Fdata-gateway-connection.png?alt=media&#x26;token=0b6045bc-f8dd-4a66-9d6e-501cf1b150a6" alt=""><figcaption></figcaption></figure>

## Supported Source Systems

The Data Gateway supports the following database engines:

* PostgreSQL
* MySQL
* Microsoft SQL Server
* Oracle
* Snowflake
* SAP HANA
* Databricks

## Network Details <a href="#network-details" id="network-details"></a>

The Data Gateway requires no inbound ports to be opened. All communication is outbound-initiated HTTPS (port 443) from the gateway host to the Lumi AI platform.

The gateway host does require outbound TCP access to the source system on the relevant database port, so internal firewalls between the gateway and the source system must permit this.

For environments with strict outbound firewall rules, deep packet inspection, or TLS inspection, see [Network Configuration](https://docs.lumi-ai.com/using-lumi/network-configuration) for protocol details, required FQDNs, and guidance on SSL interception.

## Logging <a href="#logging" id="logging"></a>

The Data Gateway writes logs to a logs folder in the same directory as the executable. Log files are named `lumi_data_gateway.log`, rotate daily at midnight, and are retained for 7 days.

The log file captures all events at DEBUG level. Console output defaults to INFO level and can be adjusted via the `console_log_level` configuration setting (see [Deploying the Data Gateway](https://docs.lumi-ai.com/product-features/data-gateway/deploying-the-data-gateway)).

**CloudWatch Logs**: For deployments where Lumi AI has configured CloudWatch integration, the gateway will automatically forward application logs to the designated AWS CloudWatch log group. This is provisioned from the Lumi AI platform side and requires no configuration on the gateway host.

## Management & Monitoring <a href="#management--monitoring" id="management--monitoring"></a>

Individuals with administrative access to the Lumi AI platform can manage and monitor Data Gateways via the Admin Settings panel. This includes creating, relabeling, removing, and monitoring the status of gateway instances.

{% hint style="warning" %}
A gateway's status is usually reflected immediately, but under certain conditions (e.g., the host is shut down unexpectedly) it may take 10 to 15 minutes for the status change to be reflected in the panel.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lumi-ai.com/product-features/data-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
