| title | Install on a VM |
|---|
Target: Ubuntu 22.04 / 24.04, outbound HTTPS. Installer lives in grid-core/install.
Remote state first
Create a remote Terraform state backend before applying real infra (S3, GCS, Azure, OCI, OSS, COS, or S3-compatible).
Local state on the VM is lab-only. See Remote Terraform state, then setGRID_TF_*in Compose.env//etc/grid/grid.env.
Runs everything in Docker on that VM (core + ui). Same stack as Docker Compose.
export GRID_AUTH_ADMIN_PASSWORD='choose-a-strong-password'
# after creating remote state:
# export GRID_TF_BACKEND=s3 GRID_TF_STATE_BUCKET=… GRID_TF_LOCK_TABLE=… GRID_TF_STATE_REGION=…
curl -fsSL https://raw.githubusercontent.com/gridplatform/grid-core/main/install/install.sh | sudo -E bashOr clone and Compose yourself:
git clone https://github.com/gridplatform/grid-core.git
cd grid-core
cp install/.env.example install/.env # password + GRID_TF_*
docker compose -f install/docker-compose.yml --env-file install/.env up -d --build
bash install/verify.shOpen http://<vm-ip>/.
install.sh and the Compose examples use docker compose … up -d (detached). Closing the terminal does not stop Grid.
| Layer | What it does |
|---|---|
up -d |
Process leaves your SSH session immediately |
restart: unless-stopped on core / ui |
Containers restart after crash or Docker restart |
systemctl enable docker |
Docker daemon starts on VM reboot |
grid-compose.service |
On boot, runs compose up -d again (installed by install.sh) |
Check anytime:
docker compose -f /opt/grid/grid-core/install/docker-compose.yml ps
systemctl status grid-compose dockerDo not run docker compose up without -d on a server, and do not use npm run dev for production — those die when the session ends.
No Docker. Set GRID_USE_NATIVE=1 — installs Node + Terraform, builds under /opt/grid, starts grid-core via systemd, nginx on port 80.
export GRID_USE_NATIVE=1
export GRID_AUTH_ADMIN_PASSWORD='choose-a-strong-password'
curl -fsSL https://raw.githubusercontent.com/gridplatform/grid-core/main/install/install.sh | sudo -E bash| Piece | How it runs (native) |
|---|---|
| API | systemd unit grid-core → node dist/index.js |
| CLI + Terraform | On the host; core spawns them |
| UI | Static files under /opt/grid/grid-ui/dist via nginx |
| Need | Notes |
|---|---|
| CPU / RAM | 2 vCPU, 4 GB RAM minimum; 8 GB preferred |
| Disk | ≥ 20 GB |
| Ports | 80 (UI), Compose also uses Docker networking to core |
| Cloud creds | On the VM / in the core container if this host will apply Terraform |
sudo apt-get update
sudo apt-get install -y curl git ca-certificates build-essential nginx
# Node 24+ and Terraform ≥ 1.5 on PATH — then:
sudo mkdir -p /opt/grid && sudo chown "$USER":"$USER" /opt/grid
cd /opt/grid
git clone https://github.com/gridplatform/grid-core.git
git clone https://github.com/gridplatform/grid-cli.git
git clone https://github.com/gridplatform/grid-ui.git
cd grid-cli && npm ci && npm run build
cd ../grid-core && npm ci && npm run build
cd ../grid-ui && VITE_GRID_API_URL=/api/v1 npm ci && npm run buildCopy env from install/.env.example, install systemd/grid-core.service and nginx-host.conf, then:
sudo systemctl enable --now grid-core nginxSee Configuration. Defaults pull desired-state from grid-config and modules from grid-terraform.
curl -fsS http://127.0.0.1/health→{"status":"ok"}- UI loads; admin login works
- Create a plan release for a cheap unit — confirm Releases + live logs
- Apply only when you accept cloud cost
Same script URL — change the tag (or use a channel). Full matrix: Releases.
export GRID_REF=v0.1.0
export GRID_AUTH_ADMIN_PASSWORD='…'
curl -fsSL https://raw.githubusercontent.com/gridplatform/grid-core/${GRID_REF}/install/install.sh | sudo -E bash