Scripts to manage cloud gaming on Google Compute Engine.
A collection of bash scripts to help create and maintain a cloud gaming rig in Google Cloud Platfom, on the cheap.
It’s also recommended to install the following on your local device (PC, Mac, Android, etc) that you’ll be streaming to :
You’ll be charged for the following resources while your rig is running:
You’ll also be charged for the following while your rig is running and at rest:
Cloud responsibly. These scripts are provided as-is, with minimal support. While they’re designed to minimise costs at-rest, things may not always go to plan. It’s recommended to use a dedicated GCP project and/or billing account with billing alerts to avoid any nasty suprises.
gcloud init
$ git clone "https://github.com/gcloudrig/gcloudrig"
Run setup.sh
and follow the prompts
$ cd "gcloudrig"
$ ./setup.sh
Created [gcloudrig].
Activated [gcloudrig].
You can use https://cloudharmony.com/speedtest-latency-for-google:compute to test for latency and find your closest region.
Select a region to use:
1) asia-southeast1 5) us-central1
2) australia-southeast1 6) us-east4
3) europe-west4 7) us-west2
4) northamerica-northeast1
#? 2
Would you like to automatically install some things? [y/n] y
1) InstallBattlenet=false 4) ZeroTierNetwork=
2) InstallSteam=false 5) Done
3) VideoMode=1920x1080
#? 1
1) InstallBattlenet=true 3) VideoMode=1920x1080 5) Done
2) InstallSteam=false 4) ZeroTierNetwork=
#? 2
1) InstallBattlenet=true 3) VideoMode=1920x1080 5) Done
2) InstallSteam=true 4) ZeroTierNetwork=
#? 4
We strongly recommend you create a new ZeroTier network for Gcloudrig
https://my.zerotier.com/network
Gcloudrig ZeroTier network id [or quit]: abcdef1234567890
1) InstallBattlenet=true 3) VideoMode=1920x1080 5) Done
2) InstallSteam=true 4) ZeroTierNetwork=abcdef1234567890
#? 5
Enabling Gcloudrig software installer...
Creating instance template 'gcloudrig-setup-template'...
Creating managed instance group 'gcloudrig-group'...
Done! Run './scale-up.sh' to start your instance.
./scale-up.sh
to start your instance.default-allow-rdp
rule in VPC Firewall.Run ./scale-up.sh
to start your instance.
After your rig has started, it will create a new games disk or restore an existing one from a snapshot and attach it to itself.
Run ./scale-down.sh
to shutdown your instance.
Once stopped, it will take a few minutes to pack away the boot disk and games disk. Read What happens when I stop my rig? below for more info.
If you’re having difficulty connecting with a game streaming client, use RDP or TightVNC to access your machine.
If you forget your password, use ./reset-windows-password.sh
to get a new one. Note that when you do this, you’ll also need to update the password for automatic login (use Start > Run > control userpasswords2
)
If you need to setup a custom resolution (e.g. 1800x1200), you might have issues with the native NVidia drivers. Custom Resolution Utility (CRU) works well, and while the automatic options in Parsec should also work you can force it to behave too.
If you need a nuclear option, delete everything and start over with these commands:
$ ./destroy.sh
$ ./setup.sh
During the scale-down script, your boot disk (C:) is stored away as a custom image, and your games disk (G:) is stored away as a persistent disk snapshot. These are the only two at-rest costs that should be associated with your rig.
If you need more space or faster disk performance, you can always increase the size of your disks while your rig is running.
It’s recommended to keep usage on your boot disk (C:) as small as possible, since at-rest it’s stored as a custom image which has higher pricing than the snapshots used to store the games disk (G:).
To take advantage of the (performance boost)[https://cloud.google.com/compute/docs/disks/performance] from having a larger disk but limit your actual disk usage for at-rest costs, after resize simply shrink the volume back down in Windows Disk Manager.
These are all symptoms of NVIDIA GRID / Quadro Licence failures; the best suggestion is to reinstall the GRID® drivers for virtual workstations and restart your rig.
The easiest way to browse and download the drivers is using the Storage Browser in Google Cloud Console: https://console.cloud.google.com/storage/browser/nvidia-drivers-us-public/GRID
gcloudrig keeps your rig as a boot image and disk snapshot in the same GCE region. To move your rig to a different part of the world, just run ./change-region.sh
to change your default region, then run ./scale-up.sh
. Restoring snapshots in a different region may incurr network costs, so be careful!
If you answered No to automatic installation during ./setup.sh
, run ./scale-up.sh
and a clean Windows Server instance will be created.
Run ./reset-windows-password.sh
to get the IP, Username and Password, then connect to your instance with Remote Desktop. See Creating Passwords for Windows Instances and Connecting to Windows Instances for more info.
We recomend the following software, but feel free to find your own:
Pull requests against the develop branch are welcome!