[Unit] Description=Edge service (public port + VNC transport — independent of the main brand service) # No ordering dependency on the main brand service: the edge is the long-running # front door. The main brand unit declares Wants/After this unit so it only # starts once the edge is listening, but this unit has no such reciprocal # dependency. [Service] Type=simple # ExecStartPre owns the VNC stack so an `npx -y @rubytech/create-maxy@latest` # run from the admin UI can restart the main brand service without taking # Xtigervnc or websockify down with it. The ttyd transport was removed — # upgrades now run via systemd-run --user transient units that are peers # of maxy-ui and survive its restart structurally. ExecStartPre=/bin/bash __INSTALL_DIR__/platform/scripts/vnc.sh start ExecStart=/usr/bin/node __INSTALL_DIR__/server/maxy-edge.js ExecStopPost=/bin/bash __INSTALL_DIR__/platform/scripts/vnc.sh stop Restart=on-failure RestartSec=5 TimeoutStartSec=60 TimeoutStopSec=10 Environment=NODE_ENV=production Environment=EDGE_PORT=__EDGE_PORT__ Environment=EDGE_HOSTNAME=0.0.0.0 Environment=MAXY_UI_HOST=127.0.0.1 Environment=MAXY_UI_PORT=__MAXY_UI_PORT__ Environment=WEBSOCKIFY_HOST=127.0.0.1 Environment=WEBSOCKIFY_PORT=__WEBSOCKIFY_PORT__ Environment=CDP_PORT=__CDP_PORT__ Environment=RFB_PORT=__RFB_PORT__ Environment=DISPLAY=:__VNC_DISPLAY__ Environment=MAXY_PLATFORM_ROOT=__INSTALL_DIR__/platform Environment=PATH=%h/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin StandardOutput=append:__PERSIST_DIR__/logs/edge.log StandardError=append:__PERSIST_DIR__/logs/edge.log [Install] WantedBy=default.target