Using Digital Ocean for OSBot Referral code Since I took the time to write this, I’m gonna be a shill and say use my referral code: https://www.digitalocean.com/?refcode=49d74b3ac319 This will give you $10 in free credits along with giving me $25 once you deposit $25 real monies. I believe you only need to deposit $5 to get the $10 credit, else hookup a credit card (don’t quote me).
Fast Method (alternative to all the stuff below)
I made a script that will take care of all these issues for you. Simply setup a VPS (as below), and once you have a SSH Terminal run:
apt-get install curl
bash <(curl -sL http://git.io/vWPiu)
- It will ask you for a username, password, and VNC password. Enter these.
- Wait for it to say something about rebooting.
- Reboot, wait 10 seconds and connect to <dropletip>:5901 with a VNC client and enter your VNC password.
- Login to OSBot client.
This scripts source can be viewed by visiting http://git.io/vWPiu or https://gist.github.com/Lem0ns/52ccbf8d5038e8f2f446
Making the VPS This only has to be done once, then all future VPSs will be ready on creation! Step 1 - Create the Droplet Give it a hostname, then choose any size you’d like. I personally use the 512mb droplets as they are enough for the scripts I am using. If you need more resources you may want to get a larger package, this is mostly experimentation. Select a region, then pick “Ubuntu” as the OS. I personally use 14.04 32-bit as its easiest to work with and has long term support. Step 2 - While we wait You will learn this screen lies, and just always says “30 seconds”. While we wait, please download PuTTY if you are on windows: http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe This program allows us to execute commands in a remote setting. If you are on linux/mac you will just use the ‘ssh’ terminal command. Step 3 - Connect to VPS We are now ready to connect using PuTTY! Open putty.exe and you’ll be faced with: Enter the IP of your VPS then hit “Open”, then on the window that pops up “Yes”. Now login as “root” and enter the password you got in the email they sent you. Once you login it will ask you to change your password, do so. Note this is NOT the account we will be using, but make it secure regardless and unique if possible. Step 4 - Make a non-sudo user Now you should have a prompt. First thing we are going to do is make a new user. Note when I give commands that # and $ are not part of it, just shows its entered into a prompt.
# adduser botter
This will prompt you to enter a password and some details (Just hit enter for nothing), then enter for Yes (captial letter = default choice). Now we have a non-sudo user. To fix this, simply do:
# adduser botter sudo
Now disconnect and reconnect as that user (botter). Step 5 - Installing a desktop environment Now we need to make it so we have a GUI. We will install lxde, as its lightweight and does what we need:
$ sudo apt-get update
For those interested, the # turned to $ as this user is not root. Running the command will spew a list of urls (these list all the packages available in repos). Wait until it finishes, then:
$ sudo apt-get install lxde
This will display a large block of text (a ton of packages it will install, don’t worry). Just hit enter and then wait as your desktop is installed. Step 6 - Installing VNC Now we install VNC:
$ sudo apt-get install x11vnc
Now it needs a password file to authenticate users, create one by doing:
$ x11vnc -storepasswd /home/botter/vncpasswd
It will prompt you with a password, then a confirmation on the location of the file. After this, we need to add this command to the startup. Run:
$ sudo nano /etc/rc.local
and after all the blue comments but before the green exit 0, put:
x11vnc -forever -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lxdm/lxdm-\:0.auth -rfbauth /home/botter/vncpasswd
Now press Ctrl-X and then the Y key, and enter. Finally, we do: Step 7 - Setup swap space Just as a precaution, and since 512mb is so small, we setup some swap space to make our lives easier. Just enter all these commands and tada, swap:
$ sudo fallocate -l 4G /swapfile
$ sudo chmod 600 /swapfile
$ sudo mkswap /swapfile
$ sudo sysctl vm.swappiness=10
$ sudo nano /etc/fstab
That last command edits a file, at the end of it put:
/swapfile none swap sw 0 0
Now for all this to take effect, we must restart:
$ sudo reboot
This will reboot the server with the new LXDE desktop environment, VNC, and swap in action! Step 8 - Connecting via VNC If you don’t have a VNC client, or even if you do, I suggest TigerVNC for connecting. Its pretty damn fast, and most of the time I get 20fps+ on a connection. Download from https://bintray.com/tigervnc/stable/tigervnc/1.4.3 When you open it TigerVNC, enter your IP into the box and press connect. It will prompt you for a password, use the password you made. You should now see your VPS desktop! Step 9 - Install Java 8 Open a terminal over VNC, or reconnect using putty. Either way, once your ready, enter:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
This will begin the Java installer, which will ask you to accept the license and then will download and install the package. After this is complete, you got java! Step 10 - Install Chromium I like to have a browser installed, so:
$ sudo apt-get install chromium-browser
Step 11 - Download OSBot I make some scripts which ease this process. First start up leafpad, then make a file containing:
#!/bin/bash
wget http://osbot.org/mvc/get -O osbot.jar
Save this to the desktop as “OSBotUpdate.sh”, now make a new file and put:
#!/bin/bash
if ls osbot\ *.jar 1> /dev/null 2>&1; then
mv osbot\ *.jar osbot.jar
fi
java -jar osbot.jar
Save this file as “OSBotRun.sh”. Now, go to your desktop and change both files Permissions to allow executing by the owner only. Just right-click the file, Properties, then the second tab and select “Owner only” in the Execute dropdown. Step 12 - Creating a backup to use when creating new Droplets Do anything you want to be easily replicated onto other servers before this! You can always take another snapshot, so don’t worry too much. Now go to DigitalOcean’s website and power off the machine. Then click on “Snapshots”, give it a name, and click “Take Snapshot”. It will take a while, once the process is done you can startup the VPS and start botting. Note I didn’t have you login to OSBot as it wipes the user info on new VPSs. Step 13 - Creating more VPSs Now when you create a VPS, go to the “Snapshot” section and select your snapshot instead of choosing Ubuntu.
Thats it!