Deploying vow-web-server
Decision tree
Section titled “Decision tree”- Install toolchain — Install Vow
- Install vow-serve globally —
vpm add vow-serve -g - Pick a path:
- Local dev →
vds(live reload) - Production daemon →
vow-serve start - Single VPS →
vow-serve init systemd - Container →
vow-serve init docker - TLS → reverse proxy + loopback bind
- Local dev →
Install vow-serve (once)
Section titled “Install vow-serve (once)”vpm add vow-serve -g# ergonomic alias:vow add vow-serve -gThis links vow-serve, vs, and vds into ~/.vow/global/bin/. Add that directory to your PATH if needed.
Monorepo / offline:
vpm add vow-serve --path ../vow-frameworks/vow-serve -gPer-project setup
Section titled “Per-project setup”cd my-apivow-serve init # vow.serve.toml, vow.grants.toml, Dockerfile, systemd unitvow.serve.toml
Section titled “vow.serve.toml”[app]main = "src/main.vow"name = "my-api"port = 8787
[bind]mode = "loopback" # loopback | public
[process]release = truehealth_path = "/health"bind.mode |
Grant | Address |
|---|---|---|
loopback |
--grant net::8787 |
127.0.0.1 |
public |
--grant net:*:8787 |
0.0.0.0 |
Extra grants live in vow.grants.toml (fs, db, …). Net bind is merged from vow.serve.toml.
Dev — vds
Section titled “Dev — vds”vds# or: vds src/main.vow -- --grant net:Foreground watch + rebuild. Not registered in the global process list.
Prod — vow-serve (PM2-style)
Section titled “Prod — vow-serve (PM2-style)”vow-serve startvow-serve listvow-serve status my-apivow-serve logs my-api -fvow-serve restart my-apivow-serve stop my-apivow-serve delete my-apiGlobal registry: ~/.vow/serve/apps/. Logs: ~/.vow/serve/logs/.
VPS (systemd)
Section titled “VPS (systemd)”vow-serve init systemdsudo cp my-api.service /etc/systemd/system/sudo systemctl enable --now my-apiDocker
Section titled “Docker”vow-serve init dockerdocker build -t my-api .docker run --rm -p 8787:8787 my-apiReverse proxy (TLS)
Section titled “Reverse proxy (TLS)”Bind loopback only (bind.mode = "loopback"), put nginx or Caddy in front. See Net grants.
Troubleshooting
Section titled “Troubleshooting”| Issue | Fix |
|---|---|
vow-serve: command not found |
vpm add vow-serve -g; add ~/.vow/global/bin to PATH |
| Health check timeout | Ensure /health route exists; check grants and port |
| Grant denied | Review vow.grants.toml and bind mode |
| Port in use | Change [app].port or stop the other process |
See also
Section titled “See also”- vow-serve package
- vpm global install
- Deploying to serverless (short-lived vs long-running)