Google Cloud
Run the ByteChef container on Cloud Run or a Compute Engine VM with Cloud SQL for PostgreSQL.
ByteChef runs on Google Cloud as the container image docker.bytechef.io/bytechef/bytechef:latest on port 8080. Cloud Run is the simplest managed target; the same image also runs on Google Kubernetes Engine (GKE) using the Helm chart or on a Compute Engine VM with Docker (see Compute Engine below). Pair it with Cloud SQL for PostgreSQL.
Prerequisites
- A Google Cloud project and the
gcloudCLI. - A Cloud SQL for PostgreSQL 15+ instance with a
bytechefdatabase and a private IP address. - A VPC network and subnet from which Cloud Run reaches that private IP through Direct VPC egress.
- Secret Manager for the sensitive values.
Provision the database
Create a Cloud SQL for PostgreSQL instance with a private IP and a bytechef database. Note the private IP, user, and password.
The ByteChef image does not include the Cloud SQL Java connector (postgres-socket-factory), and the PostgreSQL JDBC driver cannot use the Unix socket that --add-cloudsql-instances mounts. Connect over the private IP instead.
Deploy to Cloud Run
gcloud run deploy bytechef \
--image=docker.bytechef.io/bytechef/bytechef:latest \
--port=8080 \
--allow-unauthenticated \
--cpu=2 --memory=4Gi \
--no-cpu-throttling \
--min-instances=1 --max-instances=1 \
--network=<vpc-network> --subnet=<subnet> --vpc-egress=private-ranges-only \
--set-env-vars=BYTECHEF_DATASOURCE_URL="jdbc:postgresql://<private-ip>:5432/bytechef",BYTECHEF_DATASOURCE_USERNAME="<db-user>",BYTECHEF_ENCRYPTION_PROVIDER=PROPERTY,BYTECHEF_PUBLIC_URL="https://bytechef.example.com" \
--set-secrets=BYTECHEF_DATASOURCE_PASSWORD=db-password:latest,BYTECHEF_ENCRYPTION_PROPERTY_KEY=encryption-key:latest,BYTECHEF_SECURITY_REMEMBER_ME_KEY=remember-me-key:latestUse stable values for the encryption and remember-me keys in Secret Manager so stored credentials and sessions survive revision restarts.
ByteChef runs schedules, polling triggers and workflow tasks in the background, outside HTTP requests. --no-cpu-throttling keeps CPU allocated between requests, and --min-instances=1 prevents scale to zero, which would stop schedules from firing. --max-instances=1 keeps a single coordinator; see the note on instances below.
Tune the service
- Health checks: point the Cloud Run startup / liveness probe at
GET /actuator/health/readinessand/actuator/health/livenesson port8080. - Public URL: set
BYTECHEF_PUBLIC_URLto the Cloud Run service URL (or your mapped custom domain) so webhook and OAuth2 redirect URLs resolve. - Startup time: ByteChef runs schema migrations on first start; give the startup probe a generous timeout so the first revision becomes ready.
- Concurrency and instances: because migrations run at startup, deploy a single revision for the first release and any upgrade. Every instance runs the coordinator, and more than one coordinator requires Enterprise Edition. Before you scale beyond one instance, apply the settings in Running multiple instances: a shared encryption key, a shared message broker, shared file storage, a shared session store and cache provider, and a clustered scheduler.
Access the instance
Open the Cloud Run service URL and click Create account to register the first user.
Compute Engine
Cloud Run is the managed path. To run a VM you control, with local Docker and optionally a containerized database, deploy to Compute Engine instead.
Machine sizing
ByteChef runs a JVM alongside the workflow engine, so memory is the binding constraint.
| Use case | Machine type | RAM |
|---|---|---|
| Testing / development | e2-medium | 4 GB |
| Production | e2-standard-2 | 8 GB |
| Heavy workloads | e2-standard-4 | 16 GB |
Do not use e2-micro, e2-small, or f1-micro. They have insufficient memory and the container
will be killed under load.
Create the instance
From the Compute Engine console, choose Create Instance and configure:
- Name:
bytechef-server - Region: whichever is closest to your users
- Machine type:
e2-mediumor larger, per the table above - Boot disk: Ubuntu 22.04 LTS, 30 GB
- Firewall: allow HTTP and HTTPS traffic
Open the ByteChef port
Cloud Console's HTTP/HTTPS checkboxes open 80 and 443 only, so port 8080 needs its own rule
under VPC Network → Firewall:
- Name:
allow-bytechef - Targets: all instances in the network (or a target tag on this VM)
- Source IP ranges: restrict to your own ranges where you can;
0.0.0.0/0exposes the instance to the internet - Protocols and ports:
tcp:8080
If you terminate TLS on the instance (below), you do not need to open 8080 publicly at all.
Connect and install Docker
gcloud compute ssh bytechef-server --zone=<zone>curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USERLog out and back in so the group membership takes effect.
Deploy
curl -O https://raw.githubusercontent.com/bytechefhq/bytechef/master/docker-compose.yml
docker compose up -dThat Compose file brings up ByteChef and PostgreSQL together, but ships with fixed default
credentials and a fixed remember-me key - use it for evaluation only. For anything durable, point
the container at a Cloud SQL instance and supply your own secrets, as in the
docker run command in the AWS EC2 guide.
Then browse to http://<external-ip>:8080 and click Create account to register the first user.
Production notes
-
Reserve a static IP. Under VPC Network → IP Addresses, reserve an external static address and attach it to the instance, so the address survives a stop/start cycle. Without one, stopping the instance changes its IP and breaks any webhook URL pointing at it.
-
Terminate TLS. Put nginx in front and set
BYTECHEF_PUBLIC_URLto the HTTPS URL so webhook and OAuth2 redirect URLs are correct:sudo apt install nginx certbot python3-certbot-nginx -y sudo certbot --nginx -d your-domain.com -
Back up PostgreSQL. See Upgrades and backups.
Storage note (Cloud Run)
Cloud Run instances have an in-memory local filesystem that counts against the instance's memory and is lost when the instance stops, and file storage defaults to FILESYSTEM - so set BYTECHEF_FILE_STORAGE_PROVIDER=JDBC explicitly to keep files in the database, or store them in object storage of your own. Leaving the default in place writes files to a disk that disappears with the instance.
How is this guide?
Last updated on