Deployment
GioJS ships as two processes: the giojs-server Rust binary (HTTP, routing, caching) and a Node.js worker (React SSR). Both start automatically.
Before deploying
- Run
gio buildto produce.gio/manifest.jsonand compiled assets - Ensure Node.js 20+ is installed on the target host
- Place the
giojs-serverbinary and your app directory on the host - Set
NODE_ENV=production
Choose a deployment method
| Method | When to use |
|---|---|
| Linux systemd | Linux VPS or bare metal, long-running service |
| Docker | Containerized, single instance or scaling |
| Kubernetes | Kubernetes, multi-instance with shared Redis cache |
| Windows NSSM | Windows Server host |
Linux systemd
Run GioJS as a systemd service on any Linux VPS or bare metal server. Survives reboots, logs to journald, supports nginx as a TLS reverse proxy.
Full guide: docs/deployment/linux-systemd.md in the repository.
Docker
Multi-stage Dockerfile keeps the final image small (~80MB) by building Rust and Node separately. Includes a docker-compose.yml with optional Redis for shared caching.
Full guide: docs/deployment/docker.md in the repository.
Kubernetes
Deployment, Service, Ingress, HPA, and Redis StatefulSet YAMLs. Uses readinessProbe on /_gio/health and scales on CPU utilization.
Full guide: docs/deployment/kubernetes.md in the repository.
Windows NSSM
Run GioJS as a Windows Service using NSSM. Survives reboots, writes to Event Viewer, and can be managed with PowerShell cmdlets.
Full guide: docs/deployment/windows-nssm.md in the repository.
Health check
/_gio/health returns JSON and is always available. Use it for readiness probes, load balancer health checks, and uptime monitors:
{
"status": "ok",
"deploymentId": "abc12345",
"nodeReady": true,
"cacheSize": "12MB",
"uptime": 3600
}Multi-instance caching
When running multiple instances (Kubernetes, multiple VMs), configure Redis so all instances share a single ISR cache:
[cache.redis]
enabled = true
url = "redis://redis:6379"
prefix = "gio:prod:"