Starting Zendrite
After you finish the preparation and installation steps, start Zendrite by running the zendrite binary:
By default, Zendrite listens for HTTP on port 8008.
To change the addresses or ports Zendrite listens on, use the -http-bind-address and -https-bind-address command line arguments:
To list the command line options:
Systemd example
Section titled “Systemd example”To run Zendrite as a systemd service, install a unit like this at /etc/systemd/system/zendrite.service:
Notes on the hardening block:
ProtectHome=read-onlyplusReadWritePaths=/home/zendriteis the trade-off for keeping state under/home/zendrite. Do not “tighten” this toProtectHome=truewhile Zendrite keeps its state in/home/zendrite.truemakes the directory inaccessible (not only read-only) and overrides theReadWritePaths=exemption, which locks Zendrite out of its own state. Debian-style packaging instead uses/var/lib/zendriteas the user’s home andWorkingDirectory=. In that layout, you can dropReadWritePaths=and useProtectHome=truesafely, becauseProtectHomecovers only/home,/root, and/run/user.- The unit leaves
SystemCallFilterunset on purpose.@system-serviceis broad, but failures surface as silentEPERMorSIGSYS, which are hard to debug. Add it if you want it and have tested your build. CapabilityBoundingSet=(empty) is safe because the example binds to127.0.0.1:8008. To bind to a port below 1024, setCAP_NET_BIND_SERVICEon bothCapabilityBoundingSetandAmbientCapabilities.RestrictAddressFamiliesincludesAF_UNIXfor Postgres-over-socket setups andAF_INET6for outgoing IPv6 federation.- The unit omits
MemoryDenyWriteExecute=trueon purpose, because Go’s runtime and cgo can need W+X pages in some configurations. Test before you enable it.
Score the resulting unit with: