Configuring the Data Gateway for Boot
The Data Gateway can be configured to start automatically when its host starts up. The exact steps depend on the operating system.
When you update the Data Gateway executable, update any file path references in your startup configuration to point to the new version.
Linux
Using systemd (Recommended)
systemd is the standard service manager on modern Linux distributions (Ubuntu, Debian, RHEL, Fedora, etc.) and is the recommended approach for production deployments. It handles automatic restart on failure and integrates with the system journal.
Create a new service file:
sudo nano /etc/systemd/system/lumi-data-gateway.service Add the following content, substituting the actual executable filename and a dedicated service user:
[Unit]
Description=Lumi AI Data Gateway
After=network-online.target
Wants=network-online.target
[Service]
User=lumi
WorkingDirectory=/opt/lumi-gateway
ExecStart=/opt/lumi-gateway/lumi-agent-linux-vX.X.XX
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.targetExecStart— full absolute path to the executable. The gateway locatesconfig.yamland writes itslogsfolder relative to the executable itself, so the directory containing the binary is what matters, notWorkingDirectory.User— a dedicated non-root user is recommended. Create one withuseradd -r -s /bin/false lumiif it doesn't exist, and ensure it has read/write access to the gateway directory.Restart=on-failure / RestartSec=10— automatically restarts the gateway if it exits unexpectedly, with a 10-second delay.
Reload systemd and enable the service to start at boot:
Start the service immediately:
Confirm it is running:
Using cron with @reboot
A simpler option for systems without systemd or for quick setups.
Open the crontab for the user that will run the gateway:
Add a line using the full absolute path to the executable:
Use the full absolute path — the gateway resolves config.yaml and logs relative to the executable itself, so there is no need to cd first.
Using rc.local (Older Systems)
Edit rc.local:
Add the following before the exit 0 line:
Ensure rc.local is executable:
Desktop Environment Autostart (GUI)
If running on a Linux desktop, use the built-in autostart mechanism for your environment:
GNOME:
gnome-session-propertiesKDE: Autostart module in System Settings
Other environments: refer to their documentation
Note: desktop autostart only runs when the user is logged in. For unattended or server deployments, systemd is the appropriate choice.
Windows
Using Windows Service (Recommended for Production)
The Windows gateway executable includes built-in Windows Service support — the recommended approach for production deployments. The service runs under the SYSTEM account, starts at boot without requiring a user login, and restarts automatically on failure.
Install the service:
Open a Command Prompt or PowerShell as Administrator in the directory containing the gateway executable, then run:
This installs and starts the service with the default name LumiAIDataGateway. To use a custom name (e.g., for multiple instances):
After installation, the service will start automatically on the next reboot and on any subsequent failure. You can also start it immediately from Services (services.msc) or via:
Uninstall the service:
Using Task Scheduler
An alternative to the Windows Service, suitable if you prefer not to use the built-in service mode.
Open Task Scheduler (search for it in the Start menu) and click Create Task.
General tab: Enter a name (e.g.,
Lumi AI Data Gateway). Click Change User or Group, typeSYSTEM, and confirm.Triggers tab: Click New..., set Begin the task to
At startup,click OK.Actions tab: Click New..., click Browse... and select the gateway executable. In the Start in (optional) field, enter the directory containing the executable (e.g.,
C:\lumi-gateway). Click OK.Conditions tab: Uncheck Start the task only if the computer is on AC power.
Settings tab: Uncheck Stop the task if it runs longer than.
Click OK to save, then reboot to verify the task runs correctly.
Using Group Policy (Domain-Joined Machines)
For domain-joined machines managed via Group Policy:
Create a
.batfile:
Open Group Policy Editor (
gpedit.msc).Navigate to
Computer Configuration → Windows Settings → Scripts (Startup/Shutdown).Add the
.batfile as a Startup script.
After any startup configuration: reboot the host and confirm the gateway appears as Active in the Lumi AI Admin Settings panel.
Last updated
Was this helpful?