Prepare a Server on Google Cloud
This guide gets a Compute Engine VM ready for Bring Your Own Server, with its firewall, fixed IP and backup storage. Skysize installs everything else on the server.
Each step has two tabs: click through the Console, or paste from Command line. Your choice applies to the whole page.
Commands run in Cloud Shell, the terminal icon at the top of the Google Cloud console, so there is nothing to install. Select your project first, and keep the same tab open: each block reuses the values from step 1.
1. Choose your values
Pick the zone closest to your users, and the size for your use.
| Use | Machine type | vCPU | RAM | Disk |
|---|---|---|---|---|
| One production and one staging | e2-standard-2 | 2 | 8 GB | 100 GB |
| Production with staging and development branches | e2-standard-4 | 4 | 16 GB | 200 GB |
Avoid the Arm series T2A, C4A and N4A: the installer refuses to run on them.
- Console
- Command line
Select your project at the top of the Google Cloud console. Use the same region in every step.
ZONE=us-central1-a
NAME=skysize-odoo
TYPE=e2-standard-2
DISK_GB=100
PROJECT=$(gcloud config get-value project)
REGION=${ZONE%-*}
BUCKET=$NAME-backups-$PROJECT
2. Add the firewall rule
The server needs these inbound ports, and no others:
| Protocol | Port | Source | Why |
|---|---|---|---|
| TCP | 80 | Anywhere (0.0.0.0/0) | Certificates and redirects |
| TCP | 443 | Anywhere (0.0.0.0/0) | Your Odoo sites |
Skysize itself needs no inbound port. SSH is already allowed by the default network's default-allow-ssh rule. Leave PostgreSQL (5432) closed unless you use read-only database access. Outbound traffic is allowed by default, and the server needs it.
- Console
- Command line
- Open VPC network → Firewall → Create firewall rule.
- Set the name to
skysize-odoo-web. - Set Targets to Specified target tags, and Target tags to
skysize-odoo-web. - Set Source IPv4 ranges to
0.0.0.0/0. - Under Protocols and ports, tick TCP and enter
80,443. - Click Create.
gcloud compute firewall-rules create "$NAME-web" \
--allow tcp:80,tcp:443 --source-ranges 0.0.0.0/0 --target-tags "$NAME-web"
3. Create the backup bucket and the server's identity
Skysize makes no backups until a project has a backup target. This creates a private bucket and a service account that lets the server use it, with no key to store.
- Console
- Command line
Service account
- Open IAM & Admin → Service Accounts → Create service account.
- Set the name to
skysize-odoo, and click Done. - Copy its email address.
Bucket
- Open Cloud Storage → Buckets → Create.
- Enter a name that is unique across Google Cloud, such as
skysize-odoo-backups-followed by your project ID. - Choose your region, keep uniform access control, and keep public access prevention on. Click Create.
- On the bucket's Permissions tab, click Grant access.
- Paste the service account's email, choose the role Storage Object Admin, and click Save.
gcloud storage buckets create "gs://$BUCKET" --location "$REGION" \
--uniform-bucket-level-access --public-access-prevention
gcloud iam service-accounts create "$NAME"
SA="$NAME@$PROJECT.iam.gserviceaccount.com"
sleep 15
gcloud storage buckets add-iam-policy-binding "gs://$BUCKET" \
--member "serviceAccount:$SA" --role roles/storage.objectAdmin
The sleep gives Google Cloud time to make the new account available.
4. Create the VM with a fixed IP
Use Ubuntu 24.04 for x86, and a static IP so your DNS records keep working if the VM stops. Note this IP: your DNS records will point to it.
- Console
- Command line
Open Compute Engine → VM instances → Create instance, and set:
| Setting | Value |
|---|---|
| Name | skysize-odoo |
| Region and Zone | Yours |
| Machine type | The type from step 1 |
| OS and storage | Ubuntu, Ubuntu 24.04 LTS, the x86/64 version. Balanced persistent disk, with the size from step 1. |
| Networking → Network tags | skysize-odoo-web |
| Networking → Network interface → External IPv4 address | Reserve a new static address |
| Security → Service account | skysize-odoo |
| Security → Access scopes | Allow full access to all Cloud APIs |
Then click Create.
gcloud compute addresses create "$NAME" --region "$REGION"
gcloud compute instances create "$NAME" \
--zone "$ZONE" \
--machine-type "$TYPE" \
--image-family ubuntu-2404-lts-amd64 --image-project ubuntu-os-cloud \
--boot-disk-size "${DISK_GB}GB" --boot-disk-type pd-balanced \
--address "$NAME" \
--tags "$NAME-web" \
--service-account "$SA" --scopes cloud-platform
gcloud compute addresses describe "$NAME" --region "$REGION" --format 'value(address)'
echo "Bucket: $BUCKET"
5. Connect to the server
This is where you paste the Skysize install command.
- Console
- Command line
Click SSH next to the VM in the list of VM instances. A terminal opens in your browser.
gcloud compute ssh "$NAME" --zone "$ZONE"
6. Set the backup target
Once your project exists, open its Settings → Backup Target, click Add Target, and fill in:
| Field | Value |
|---|---|
| Type | Google Cloud Storage |
| Bucket | Your bucket's name |
| Prefix | The project name |
| Credentials | Server default |
Click Test to check it from your server.
Sending email from Odoo
Google Cloud blocks outgoing port 25 by default. Use an SMTP relay on port 587. See Configure Outgoing Email.
Connect the server to Skysize
Your server is ready. Follow Set Up Your Own Server, starting at the step that registers the server. In short: register it in the dashboard, connect to it over SSH, and paste the install command. The status changes to Online within a minute of the installer finishing.
Once your first project runs, add your domain.
If something goes wrong
The dashboard says ports 80 and 443 are not reachable. Check the firewall rules above, and that the public IP in the server's settings is the one you noted. Then click Check again.
The server stays Offline. The server connects out to Skysize, so no inbound rule fixes this. Run these on the server:
sudo systemctl status skysize-agent
sudo journalctl -u skysize-agent -n 50
nc -zv cp.skysize.io 50051
If the installer did not finish, or the join token was already used, use Regenerate join token on the server's page and run the install command again.
Still stuck? Open Support in the dashboard and include the output of those commands.