command resolves against the plugin directory — you can ship a
compiled binary inside the plugin and point at it directly.
Environment
The panel passes everything your process needs as environment variables:A complete runtime
Bind the address you’re given, answer/health, store state in the data dir:
Reaching it from the browser
The runtime listens on localhost only; the panel exposes it through two authenticated routes:
So
fetch('/api/plugins/hello/proxy/api/state') from your frontend lands on
GET /api/state in your runtime — with the panel’s session auth already
enforced.
Lifecycle
- The runtime starts with the panel (if the plugin is enabled) and on
install / enable /
myrax plugin restart <id>. - On stop the panel sends
SIGINT, waits 3 seconds, then kills. HandleSIGINTfor a clean shutdown. - If the process exits on its own, its status shows
failedwith the exit error in the Plugins screen. - stdout and stderr go to a per-plugin log:
myrax plugin logs <id>.
Unix sockets
Fortransport = "unix" the panel skips ports entirely: listen on the path
from MYRAX_PLUGIN_SOCKET (it lives inside your data directory) and the
proxy routes work exactly the same.