Here's a quick and dirty guide on how to run your bots 24/7 using Google Compute Engine (GCE). Google Cloud is giving free trial worth $300 credits to be used within 60 days.
Part 0: Some prerequisites:
- Google account.
- Valid credit card. (USD$1 will be charged for validation purposes.)
Part 1: Here are the registration steps:
- Go to
- Click on the "Free Trial" blue button.
- Login using your google account.
- Fill in the form and give your credit card info.
- Once you are done, you can start to create a 'project'.
Part 2: Here are the steps to create a new VM:
- In your project, select 'Compute'->'Compute engine'->'VM instances' section in the left pane.
-
Hide contents
-
- Click on the blue 'New Instance' to create a new VM.
-
Hide contents
-
- In the 'create a new instance' section, fill in and select the following:
a. Name - put in any name you desire.
b. Zone - select default - 'us-central1-c' (Note: other zones cost more credits!)
c. Machine type - select n1-highcpu-2 (2 vcpus, 1.8 GB memory) (Note: this is sufficient to run the bot smoothly. Other options are overkill and also cost more credits!)
d. Image - select 'windows-server2012-r2-dc-v20150331'
e. Username - any name you desire (do not use the same machine name as in step a! Failure to do so will not allow you to login to your server.)
f. Password - Click on 'create or reset Windows password' button in the console.Use the password to login to your Windows 2012 machine and then change to the password you desire.
g. External IP - select default - 'Ephemeral'
h. Click on 'create' once you are ready.
Part 3: Here are the steps to login and setup your VM:
- Click on your new VM to view the profile page.
- Click on 'Download the RDP' file to help you connect.
-
Hide contents
-
- Save the file into your PC desktop.
- Check the status of your VM creation via the Serial Console -> View output. Scroll all the way down to view this message. Please be patient as it may it up to 5-10mins for VM creation to complete:
-
Hide contents
--> SUCCESS: Attempted to run the scheduled task "GCEStartup".
-------------------------------------------------------------
Instance setup finished. VM is ready to use.
-------------------------------------------------------------
Starting ScriptManager
Finished running startup scripts.
-
- You can now start a RDP session into your VM using the downloaded file.
- Once you are remotely in your new 'Windows server 2012 R2', do the following steps:
- a. Go to the Server Manager window, select Local Server on the left menu and then disable the following:
- Windows Firewall
- Windows Update
- IE Enhanced Security Configuration
- b. Go to the Power Options to select Turn off Display to Never.
- a. Go to the Server Manager window, select Local Server on the left menu and then disable the following:
- You are now ready to transfer Bluestacks/AutoIt/MyBot files into the server. I use Teamviewer FTP function to do this transfer.
***Important - Install the latest version of Bluestacks available here:
Part 4: Final steps for running the bot without interruptions when logging out of RDP:
- For some strange reason, when you log-out of RDP, the bot stops running. A workaround to prevent this is to have a 'RDP over RDP' session. You can create an additional user ID in your server to do this. It should be something like this:
-
Hide contents
-
Detailed steps:
- From your own desktop, login to your server via RDP using original 'user1' credentials.
- In the remote server logging in as 'user1' - install and run your bot.
- In the remote server logging in as 'user1' - create a new user - 'user2'.
- Disconnect your RDP session logging in as 'user1'.
- From your own desktop, re-connect your RDP session to your remote server - but this time login using 'user2'.
-
Hide contents
-
- Once you are in your remote server logging in as 'user2', you should see an 'empty' desktop without any bot running.
- 7. In the remote server logging in as 'user2', create a new RDP profile with Computer - 127.0.0.1 and User name: user
-
Hide contents
-
- In the remote server logging in as 'user2', you should see your bot running in the RDP session[user1] within your RDP session[user2].
- From now on, on your own desktop, just use the RDP profile you have created in step 5 to check your bot.
The steps above is for running a single bot in a single VM. What if you are running 'multiple' bots in 'multiple' VMs?
Hide contentsIf you are running 2 bots in 2 VMs, create 2 user IDs in each VM. Use the 2nd user ID to rdp to the other VM and leave it running.
Example:
VM1 with user1 and user2
VM2 with userA and userB
In VM1, run the bot using user1.
In VM2, run the bot using userA.
In VM1, rdp into VM2 using user2.
In VM2, rdp into VM1 using userB.
Alternatively, if you running 2 or even more bots. You can create a dedicated a VM just to rdp into VMs running those bots.
Example:
VM1 with bot running.
VM2 with bot running.
VM3 with bot running.
VM4 with permanent rdp sessions into VM1,VM2,VM3.
Part 5: Monitoring your bot:
- On your PC/laptop: Use default RDC.
- On your Android/IOS devices: Download Microsoft 'RD Client' app.
Part 6: How long can my bot run with free $300 credits?
- You can use the pricing calculator ( ) to estimate how long can your $300 credit last. If you have 2 or more VMs running 24/7, your $300 will not last a full 60 days.
- Below is a sample calculation for running 2 VM instances type n1-highcpu-2:
-
Hide contents
-
Hide contents
-
Estimated cost is ~$200/month. With $300 free credits, 2VMs running 24/7 can last ~45days.
Part 7: Frequently Asked Questions
- Out of Sync (OOS)
- Why bot running slow? How to improve performance?
- Suspension/Ban?
- Will my credit card be charged?