Deployment
A deployment is two things: the esrun binary and the bundle esdev build produced from your source. esdev stays on the build machine — it is not a deployment target.
esdev build --minify # on the build machine esrun --allow-listen=8080 dist/server.js # on the server
Every target follows the same steps:
Install
esrun. See Installation, which also shows how to pin a version; on Linux it needs glibc 2.39 or newer.Copy the bundle — the
dist/directory — and nothing else.Grant only what the service uses on the command line: the port it listens on, the hosts it calls, the variables it reads. Nothing is granted by default. See Permissions & capabilities.
Let the supervisor stop it with
SIGTERM. esrun drains in-flight requests for up to--shutdown-gracemilliseconds and exits with code 143.Leave memory to the platform. The heap ceiling is sized from the memory limit esrun runs under. See Memory.
Targets
Containers — a Docker or Podman image of about 43 MB plus the binary, and Quadlet for running it under systemd.
Docker Compose — the service beside its database, as one stack.
Linux server (systemd) — a sandboxed systemd service on a VM or bare metal.
Reverse proxy and TLS — Caddy or nginx in front, or TLS in esrun itself.