Fased on GCP Compute Engine (Docker VPS Guide)
Goal
Run a persistent Fased Gateway on a GCP Compute Engine VM using Docker, with durable state, baked-in binaries, and predictable restart behavior. 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 Fased Gateway in Docker
- Persist
~/.fased+~/.fased/workspaceon the host (survives restarts/rebuilds) - Join the VM to Tailscale before onboarding
- Keep operator access private through Tailscale
- bootstrap with
gcloud compute sshonly long enough to provision the host - join the VM to your Tailscale tailnet
- keep the gateway loopback-only on the VM
- use Tailscale or a private tunnel over Tailscale for ongoing admin access
Quick path (experienced operators)
- Create GCP project + enable Compute Engine API
- Create Compute Engine VM (e2-small, Debian 12, 20GB)
- Bootstrap into the VM with SSH
- Install Docker
- Join Tailscale, then clone the Fased 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 for bootstrap
- 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
1) Install gcloud CLI (or use Console)
Option A: gcloud CLI (recommended for automation) Install from https://cloud.google.com/sdk/docs/install Initialize and authenticate:2) Create a GCP project
CLI:- 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
3) Create the VM
Machine types:| 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:
fased-gateway - Region:
us-central1, Zone:us-central1-a - Machine type:
e2-small - Boot disk: Debian 12, 20GB
- Create
4) SSH into the VM
CLI:5) Install Docker (on the VM)
5.5) Join the VM to Tailscale before onboarding
Create or sign into your Tailscale account first, then join the VM to your tailnet before you continue with the runtime setup.sudo tailscale up prints a login URL in SSH. Open that URL in
your local computer’s browser, then return to the SSH session. Use a Tailscale
auth key only when you need unattended provisioning, cloud-init, Terraform, or
another non-interactive install path.
6) Clone the Fased repository
7) Create persistent host directories
Docker containers are ephemeral. All long-lived state must live on the host.8) Configure environment variables
Create.env in the repository root.
9) Docker Compose configuration
Create or updatedocker-compose.yml.
10) Bake required binaries into the image (critical)
Installing binaries inside a running container is a trap. Anything installed at runtime will be lost on restart. All external binaries required by skills must be installed at image build time. The examples below show three common binaries only:gogfor Gmail accessgoplacesfor Google Placeswaclifor WhatsApp
- Update the Dockerfile
- Rebuild the image
- Restart the containers
11) Build and launch
Killed / 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.
The container binds on LAN internally while the host port stays on 127.0.0.1.
If the Control UI rejects the local origin, set an explicit allowed origin:
18789 with your configured port.
Verify binaries:
12) Verify Gateway
13) Access from your laptop
Use a private tailnet path from your laptop:- Tailscale Serve on the VM
- an SSH tunnel carried over Tailscale
- another private tailnet path you control
unauthorized or disconnected (1008): pairing required, approve the browser device:
What persists where (source of truth)
Fased runs in Docker, but Docker is not the source of truth. All long-lived state must survive restarts, rebuilds, and reboots.| Component | Location | Persistence mechanism | Notes |
|---|---|---|---|
| Gateway config | /home/node/.fased/ | Host volume mount | Includes fased.json, tokens |
| Model auth profiles | /home/node/.fased/ | Host volume mount | OAuth tokens, API keys |
| Skill configs | /home/node/.fased/skills/ | Host volume mount | Skill-level state |
| Agent workspace | /home/node/.fased/workspace/ | Host volume mount | Code and agent artifacts |
| WhatsApp session | /home/node/.fased/ | Host volume mount | Preserves QR login |
| Gmail keyring | /home/node/.fased/ | Host volume + password | Requires GOG_KEYRING_PASSWORD |
| External binaries | /usr/local/bin/ | Docker image | Must be baked at build time |
| Node runtime | Container filesystem | Docker image | Rebuilt every image build |
| OS packages | Container filesystem | Docker image | Do not install at runtime |
| Docker container | Ephemeral | Restartable | Can be destroyed |
Updates
To update Fased on the VM: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
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
- Configure model auth in Agent > Models, then send a first message in Chat
- Set up messaging channels in Agent > Channels
- Connect API services in Agent > Services
- Pair local devices in Advanced > Nodes: Nodes
- Configure the Gateway: Gateway configuration