Nice — and good news on the environment: HestiaCP + full SSH is fine for self-hosting realtime. Unlike shared cPanel you can run the persistent daemon, so you're not blocked.
Your two issues share one root cause — the realtime stack isn't fully stood up yet. Let's finish it:
1. Daemon exits immediately. That systemctl log is from Jun 26, before you enabled the extension, so ignore it. Get the current error by running it in the foreground from your Flarum root, as your web user:
cd /path/to/flarum
php flarum realtime:serve -vvv --debug
A 263 ms exit with status 1 is almost always a startup-config problem — usual suspects: the websocket block / app-key not set in config.php, a wrong WorkingDirectory/User in the unit (so php flarum can't find the install), a missing PHP CLI extension, or port 6001 already in use. The debug output will say which — paste it here.
2. Error on post + duplicate posts is a symptom of #1: with realtime enabled but the websocket unreachable, the composer submits, gets no socket confirmation, throws that error, and the post can render twice. Two pieces get the browser connected over wss://:
- nginx: the extension ships a snippet —
include it in your HestiaCP server block: include /path/to/flarum/vendor/flarum/realtime/.nginx.conf; (the README says blomstra/realtime, but the package is flarum/realtime now — confirm the real path with ls vendor/*/realtime/.nginx.conf), then reload nginx.
config.php websocket: daemon listens on 6001 (server-port); set the js-client-* options so the browser connects over TLS on your domain (js-client-secure => true). Keys: server-host/server-port, js-client-host/js-client-port/js-client-secure, php-client-*, app-key/app-secret.
Also — realtime needs a persistent queue + worker to broadcast events: run Redis and php flarum queue:work --timeout=360 under Supervisor next to the realtime program (that 360 timeout is specifically for realtime's trigger job). Without it you get no live updates even once the daemon is up.
Do #1 first (get it staying up), then #2 (nginx + client config), and the duplicate/error clears. Paste the realtime:serve -vvv --debug output and I'll pinpoint it — happy to sanity-check your HestiaCP nginx block too if you share your domain.