Jump to content

Welcome to NulledBlog
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

[Guide] 24/7 Bot using Google Cloud VPS - free for 2 months!


  • Please log in to reply
No replies to this topic

#1
Chiefmunna

  • Offline
  • Advanced Member

  • Posts:
    82
    Reputation:
    61
    Joined:
    18 Dec, 2015

  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:

  1. Google account.
  2. Valid credit card. (USD$1 will be charged for validation purposes.)

Part 1: Here are the registration steps:

  1. Go to 

    Please Login or Register to see this Hidden Content

  2. Click on the "Free Trial" blue button.
  3. Login using your google account.
  4. Fill in the form and give your credit card info.
  5. Once you are done, you can start to create a 'project'.

Part 2: Here are the steps to create a new VM:

  1. In your project, select 'Compute'->'Compute engine'->'VM instances' section in the left pane.
    • Please Login or Register to see this Hidden Content

       Hide contents
       

      G8MAJff.gif

       

  2. Click on the blue 'New Instance' to create a new VM.
    • Please Login or Register to see this Hidden Content

       Hide contents

      ZGUjcbL.gif

       

  3. 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:

  1. Click on your new VM to view the profile page.
  2. Click on 'Download the RDP' file to help you connect.
    • Please Login or Register to see this Hidden Content

       Hide contents

      kiS2mMm.gif

       

  3. Save the file into your PC desktop.
  4. 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:
    • Please Login or Register to see this Hidden Content

       Hide contents

      -->  SUCCESS: Attempted to run the scheduled task "GCEStartup".

      -------------------------------------------------------------

      Instance setup finished. VM is ready to use.

      -------------------------------------------------------------

      Starting ScriptManager

      Finished running startup scripts.

       

  5. You can now start a RDP session into your VM using the downloaded file.
  6. 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.
  7. 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: 

Please Login or Register to see this Hidden Content

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:
    • Please Login or Register to see this Hidden Content

       Hide contents

      W5Ny5id.gif

       

Detailed steps:

  1. From your own desktop, login to your server via RDP using original 'user1' credentials.
  2. In the remote server logging in as 'user1' - install and run your bot.
  3. In the remote server logging in as 'user1' - create a new user - 'user2'.
  4. Disconnect your RDP session logging in as 'user1'.
  5. From your own desktop, re-connect your RDP session to your remote server - but this time login using 'user2'.
    • Please Login or Register to see this Hidden Content

       Hide contents

      COX4VAb.gif

       

  6. Once you are in your remote server logging in as 'user2', you should see an 'empty' desktop without any bot running.
  7. 7. In the remote server logging in as 'user2', create a new RDP profile with Computer - 127.0.0.1 and User name: user
    • Please Login or Register to see this Hidden Content

       Hide contents

      MBIP9qt.png

  8. In the remote server logging in as 'user2', you should see your bot running in the RDP session[user1] within your RDP session[user2].
  9. 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?

Please Login or Register to see this Hidden Content

 Hide contents

If 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 (

    Please Login or Register to see this Hidden Content

    ) 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:
    • Please Login or Register to see this Hidden Content

       Hide contents

      oxFXFE8.gif

       

    • Please Login or Register to see this Hidden Content

       Hide contents

      8AJ12ND.gif

       

Estimated cost is ~$200/month. With $300 free credits, 2VMs running 24/7 can last ~45days.

 

Please Login or Register to see this Hidden Content

 Hide contents

 

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?

 


  • 0

27x0b5k.png



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users