macOS Installation
1. Download / Install
brew tap shiyuecamus/ng-gateway
brew install ng-gatewayAfter installation, it is recommended to verify the version and command-line arguments:
ng-gateway --help
ng-gateway --version || true2. Upgrade / Uninstall
2.1 Upgrade
brew upgrade ng-gateway2.2 Uninstall
brew uninstall ng-gatewayComplete Uninstallation
Since Homebrew's best practice is to avoid automatically deleting user data during uninstallation (to prevent accidental deletion), if you confirm that you want to clean up the runtime directory and data, please manually execute the following steps.
# 1) Stop the background service first (if running)
brew services stop ng-gateway || true
# 2) Uninstall the program itself
brew uninstall ng-gateway
# 3) Delete the runtime directory (will delete SQLite DB, certificates, drivers/plugins, runtime generated files, etc.)
rm -rf "$(brew --prefix)/var/lib/ng-gateway"
# 4) Delete logs
rm -f "$(brew --prefix)/var/log/ng-gateway.log" \
"$(brew --prefix)/var/log/ng-gateway.error.log"3. Runtime Directories
- Runtime Directory:
$(brew --prefix)/var/lib/ng-gateway/ - Configuration File:
$(brew --prefix)/var/lib/ng-gateway/gateway.toml
Default ports and access conventions:
- HTTP:
8978 - HTTPS:
8979 - API Prefix:
/api - UI Mode:
embedded_zip
4. Modify Configuration
After modifying $(brew --prefix)/var/lib/ng-gateway/gateway.toml, restart the service to make the configuration take effect:
brew services restart ng-gateway5. View Logs
5.1 Start / Stop
If your environment does not have brew services yet:
brew tap homebrew/servicesStart/View/Stop:
brew services start ng-gateway
brew services list
brew services stop ng-gateway5.2 Log Files
Homebrew services usually write standard output/error output to log files under $(brew --prefix)/var/log/:
tail -f "$(brew --prefix)/var/log/ng-gateway.log"
tail -f "$(brew --prefix)/var/log/ng-gateway.error.log"TIP
If you are not sure where the service writes logs, you can first check the service status/definition:
brew services info ng-gateway6. Health Check
Health Check:
curl -fsS "http://127.0.0.1:8978/health" && echo7. Default Access Address
- UI:
http://<host-ip>:8978/ - API:
http://<host-ip>:8978/api
TIP
- Default Account: system_admin
- Default Password: system_admin
