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)
- Sign in with your Google account
- Enter your credit card details (verification only — you will not be charged)
- Click Start free — your $300 credit activates immediately
Step 2 — Create a project
- Go to console.cloud.google.com (opens in a new tab)
- Click the project dropdown at the top → New Project
- Enter a name (e.g.
rtsurvey) → Create - 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
- Go to Compute Engine → VM instances → Create Instance
- Fill in the form:
| Field | Recommended value |
|---|---|
| Name | rtsurvey-prod |
| Region | Closest to your users (e.g. asia-east1 for Southeast Asia) |
| Machine type | e2-medium (2 vCPU / 4 GB RAM) |
| Boot disk | Click Change → Ubuntu 22.04 LTS → 20 GB → Select |
| Firewall | ✅ Allow HTTP traffic ✅ Allow HTTPS traffic |
- Click Advanced options → Management → scroll to Automation
- Paste the full contents of
gcp-compute.shinto the Startup script field - 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 type | RAM | ~$/month | $300 trial lasts |
|---|---|---|---|
e2-medium | 4 GB | ~$27 | ~11 months |
e2-standard-2 | 8 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.
- Go to VPC network → Firewall → Create firewall rule
- Fill in the rule:
| Field | Value |
|---|---|
| Name | allow-shiny-3838 |
| Direction | Ingress |
| Action | Allow |
| Targets | All instances in the network |
| Source IPv4 ranges | 0.0.0.0/0 |
| Protocols and ports | TCP 3838 |
- 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.logStep 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 name | Protocol | Port | Notes |
|---|---|---|---|
default-allow-ssh | TCP | 22 | SSH access (GCP default) |
default-allow-http | TCP | 80 | Nginx HTTP + ACME challenge |
default-allow-https | TCP | 443 | Nginx HTTPS after SSL setup |
allow-shiny-3838 | TCP | 3838 | Shiny Server (R analytics) |
Ports NOT needed externally
| Port | Service | Reason |
|---|---|---|
| 8080 | App container | Nginx proxies to it internally |
| 8090 | Keycloak container | Nginx proxies to it internally |
| 3306 | MySQL | Internal Docker network only |
Troubleshooting
Check the setup log
sudo tail -200 /var/log/rtcloud-setup.logCheck the SSL log
sudo tail -200 /var/log/rtcloud-ssl.logView container status
docker compose -f /opt/rtcloud/docker-compose.production.yml psReboot 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.