Create the unit
1
Write the unit file
Create
/etc/systemd/system/pgw.service:2
Enable and start pgw
3
Check that it started
pgw ready and the addresses that pgw listens on. If it doesn’t, the last line says why pgw didn’t start.Read the log
systemd sends pgw’s log to the journal:journalctl -p filters by level. To show only warnings and errors:
log_level, log_format, or log_color. See Settings.
Restart or reload pgw
A reload makes pgw read a new certificate, and closes no connection. Every other change needs a restart.
You can restart pgw at any time, but calls that it is holding at that moment fail. When pgw stops, it answers those calls with
503, saves the registrations in flight, and finishes the pushes that it already started. This takes up to about 15 seconds, and the last log line is pgw stopped. To stop pgw at once, send a second SIGINT or SIGTERM.
Next steps
Install a TLS certificate
Replace the self-signed certificate, which apps reject.
Tune the host
Raise the UDP receive buffer and set the keepalive before many devices register.