Pllan on GCP Compute Engine (Docker, Production VPS Guide)
Goal
Run a persistent Pllan Gateway on a GCP Compute Engine VM using Docker, with durable state, baked-in binaries, and safe restart behavior. If you want “Pllan 24/7 for ~$5-12/mo”, this is a reliable setup on Google Cloud. Pricing varies by machine type and region; pick the smallest VM that fits your workload and scale up if you hit OOMs.What are we doing (simple terms)?
- Create a GCP project and enable billing
- Create a Compute Engine VM
- Install Docker (isolated app runtime)
- Start the Pllan Gateway in Docker
- Persist
~/.pllan+~/.pllan/workspaceon the host (survives restarts/rebuilds) - Access the Control UI from your laptop via an SSH tunnel
- SSH port forwarding from your laptop
- Direct port exposure if you manage firewalling and tokens yourself
Quick path (experienced operators)
- Create GCP project + enable Compute Engine API
- Create Compute Engine VM (e2-small, Debian 12, 20GB)
- SSH into the VM
- Install Docker
- Clone Pllan repository
- Create persistent host directories
- Configure
.envanddocker-compose.yml - Bake required binaries, build, and launch
What you need
- GCP account (free tier eligible for e2-micro)
- gcloud CLI installed (or use Cloud Console)
- SSH access from your laptop
- Basic comfort with SSH + copy/paste
- ~20-30 minutes
- Docker and Docker Compose
- Model auth credentials
- Optional provider credentials
- WhatsApp QR
- Telegram bot token
- Gmail OAuth
Install gcloud CLI (or use Console)
Option A: gcloud CLI (recommended for automation)Install from https://cloud.google.com/sdk/docs/installInitialize and authenticate:Option B: Cloud ConsoleAll steps can be done via the web UI at https://console.cloud.google.com
Create a GCP project
CLI:Enable billing at https://console.cloud.google.com/billing (required for Compute Engine).Enable the Compute Engine API:Console:
- Go to IAM & Admin > Create Project
- Name it and create
- Enable billing for the project
- Navigate to APIs & Services > Enable APIs > search “Compute Engine API” > Enable
Create the VM
Machine types:
CLI:Console:
| Type | Specs | Cost | Notes |
|---|---|---|---|
| e2-medium | 2 vCPU, 4GB RAM | ~$25/mo | Most reliable for local Docker builds |
| e2-small | 2 vCPU, 2GB RAM | ~$12/mo | Minimum recommended for Docker build |
| e2-micro | 2 vCPU (shared), 1GB RAM | Free tier eligible | Often fails with Docker build OOM (exit 137) |
- Go to Compute Engine > VM instances > Create instance
- Name:
pllan-gateway - Region:
us-central1, Zone:us-central1-a - Machine type:
e2-small - Boot disk: Debian 12, 20GB
- Create
SSH into the VM
CLI:Console:Click the “SSH” button next to your VM in the Compute Engine dashboard.Note: SSH key propagation can take 1-2 minutes after VM creation. If connection is refused, wait and retry.
Install Docker (on the VM)
Clone the Pllan repository
Create persistent host directories
Docker containers are ephemeral.
All long-lived state must live on the host.
Configure environment variables
Create Generate strong secrets:Do not commit this file.
.env in the repository root.Docker Compose configuration
Create or update
docker-compose.yml.--allow-unconfigured is only for bootstrap convenience, it is not a replacement for a proper gateway configuration. Still set auth (gateway.auth.token or password) and use safe bind settings for your deployment.Shared Docker VM runtime steps
Use the shared runtime guide for the common Docker host flow:
GCP-specific launch notes
On GCP, if build fails with If you changed the gateway port, replace
Killed or exit code 137 during pnpm install --frozen-lockfile, the VM is out of memory. Use e2-small minimum, or e2-medium for more reliable first builds.When binding to LAN (PLLAN_GATEWAY_BIND=lan), configure a trusted browser origin before continuing:18789 with your configured port.Access from your laptop
Create an SSH tunnel to forward the Gateway port:Open in your browser:Paste the token from that URL.If Control UI shows Need the shared persistence and update reference again?
See Docker VM Runtime and Docker VM Runtime updates.
http://127.0.0.1:18789/Fetch a fresh tokenized dashboard link:unauthorized or disconnected (1008): pairing required, approve the browser device:Troubleshooting
SSH connection refused SSH key propagation can take 1-2 minutes after VM creation. Wait and retry. OS Login issues Check your OS Login profile:Killed and exit code 137, the VM was OOM-killed. Upgrade to e2-small (minimum) or e2-medium (recommended for reliable local builds):
Service accounts (security best practice)
For personal use, your default user account works fine. For automation or CI/CD pipelines, create a dedicated service account with minimal permissions:-
Create a service account:
-
Grant Compute Instance Admin role (or narrower custom role):
Next steps
- Set up messaging channels: Channels
- Pair local devices as nodes: Nodes
- Configure the Gateway: Gateway configuration