# Zymonic Gateway systemd service This directory contains a sample `systemd` unit for running the gateway as `zymonic-gateway.service`. The gateway reads one JSON configuration file. By default, it looks for this file in the current working directory: ```text zymonic-gateway.json ``` Pass another file with: ```sh dotnet ZymonicGateway.dll --gateway-config /path/to/zymonic-gateway.json ``` After loading the JSON file, the gateway overlays: 1. `ZYMONIC_GATEWAY_` environment variables 2. command-line arguments For production installs, place the gateway configuration in: ```text /etc/zymonic/zymonic-gateway.json ``` The service unit defaults `ZYMONIC_GATEWAY_CONFIG` to that path and passes it with `--gateway-config`. It also uses `ConditionPathExists` for the same file so `systemctl start zymonic-gateway` fails clearly when the deployed configuration has not been created. The sample unit assumes the published gateway lives at: ```text /opt/zymonic/ZymonicGateway/ZymonicGateway.dll ``` Adjust `WorkingDirectory`, `ExecStart`, `User`, `Group`, and writable paths to match the target host before installing it under `/etc/systemd/system/`. Local development is unchanged: from `ZymonicApp/ZymonicGateway`, run: ```sh dotnet run ```