Deployment
Cloud Providers
GCP Compute Engine

Before you start

  • You need a Google account (opens in a new tab)
  • New GCP accounts get $300 in free credits valid for 90 days — no charge until you manually upgrade
  • A credit card is required for verification only

Step 1 — Create a GCP account

Go to console.cloud.google.com/freetrial (opens in a new tab)

  1. Sign in with your Google account
  2. Enter your credit card details (verification only — you will not be charged)
  3. Click Start free — your $300 credit activates immediately

Step 2 — Create a project

  1. Go to console.cloud.google.com (opens in a new tab)
  2. Click the project dropdown at the top → New Project
  3. Enter a name (e.g. rtsurvey) → Create
  4. Select the new project from the dropdown

Step 3 — Enable Compute Engine API

Go to Compute Engine API (opens in a new tab) → click Enable

Wait about 1 minute for GCP to provision the API.


Step 4 — Create a VM instance

  1. Go to Compute EngineVM instancesCreate Instance
  2. Fill in the form:
FieldRecommended value
Namertsurvey-prod
RegionClosest to your users (e.g. asia-east1 for Southeast Asia)
Machine typee2-medium (2 vCPU / 4 GB RAM)
Boot diskClick Change → Ubuntu 22.04 LTS → 20 GB → Select
Firewall✅ Allow HTTP traffic   ✅ Allow HTTPS traffic
  1. Click Advanced optionsManagement → scroll to Automation
  2. Paste the full contents of gcp-compute.sh into the Startup script field
  3. Click Create

No configuration needed. The script uses safe defaults and starts in HTTP mode. You configure the domain and SSL from the app UI after the server is running — the same flow as Linode.

Download script: gcp-compute.sh

Recommended VM sizes

Machine typeRAM~$/month$300 trial lasts
e2-medium4 GB~$27~11 months
e2-standard-28 GB~$49~6 months

Step 5 — Open port 3838 (Shiny)

GCP's Allow HTTP/HTTPS checkboxes only open ports 80 and 443. Port 3838 (Shiny analytics) requires a separate rule.

  1. Go to VPC networkFirewallCreate firewall rule
  2. Fill in the rule:
FieldValue
Nameallow-shiny-3838
DirectionIngress
ActionAllow
TargetsAll instances in the network
Source IPv4 ranges0.0.0.0/0
Protocols and portsTCP 3838
  1. Click Create

Step 6 — Wait for setup to complete

The script runs automatically on first boot. It installs Docker, pulls the rtCloud image, initialises the database, and starts all services. This takes 5–10 minutes.

No console access needed. Open your browser and go to http://<vm-external-ip>. You will see a loading page while the app finishes starting up. It refreshes automatically every 5 seconds and loads the app once ready.

The VM external IP is shown in the Compute Engine → VM instances list.

To watch the log directly:

ssh <user>@<vm-external-ip>
sudo tail -f /var/log/rtcloud-setup.log

Step 7 — Set up SSL

Once the app is running, follow the Set Up SSL guide → to configure HTTPS. The free rtsurvey.com subdomain is the fastest option — no DNS setup needed.


Step 8 — Change the default password

All passwords default to admin. Change them immediately after your first login:

  • App admin password — account settings inside the app
  • Keycloak admin — accessible at https://your-domain.com/auth/admin (login: admin / admin)

Firewall rules (GCP VPC)

The startup script configures ufw inside the VM. You also need these VPC-level firewall rules in GCP:

Inbound

Rule nameProtocolPortNotes
default-allow-sshTCP22SSH access (GCP default)
default-allow-httpTCP80Nginx HTTP + ACME challenge
default-allow-httpsTCP443Nginx HTTPS after SSL setup
allow-shiny-3838TCP3838Shiny Server (R analytics)

Ports NOT needed externally

PortServiceReason
8080App containerNginx proxies to it internally
8090Keycloak containerNginx proxies to it internally
3306MySQLInternal Docker network only

Troubleshooting

Check the setup log

sudo tail -200 /var/log/rtcloud-setup.log

Check the SSL log

sudo tail -200 /var/log/rtcloud-ssl.log

View container status

docker compose -f /opt/rtcloud/docker-compose.production.yml ps

Reboot behavior

GCP reruns the startup script on every VM reboot. The script detects an existing installation at /opt/rtcloud/ and exits immediately — no re-provisioning occurs.