Here we will cover how to deploy a virtual private Linux server instance on Vultr. Feel free to use the following link for http://bit.ly/cuevultr for 50$ USD worth of credit.
You can use your favorite server provider if you don’t want to use vultr but we won’t cover the different details regarding every specific provider.
- Log into your Vultr account
- Click Products
- Click the + blue sign that displays “Deploy New Server”
- And Click Cloud Compute
- Then Choose Tokyo (better ping if you are using Binance as your trading platform)
- Server type is 64 bits: Ubuntu 19.04 x64
- Server size is 55 GB SSD, 1 CPU, 2048MB memory and 2000GB Bandwidth
- Don’t enable additional features
- Set up hostname with something like “server” (without the quotes) , and, set a label that you can use to identify the server (this can be bot1 or any other word)
- Click “Deploy Now” and wait until the server is ready
- Depending on your OS:
- Linux/macOS: Open a terminal and write ssh root@serverip (server ip should be something like xx.xx.xx.xx
- Lastly, Windows: Download PutTTy from https://the.earth.li/~sgtatham/putty/latest/w64/putty-64bit-0.71-installer.msi and follow this guide https://mediatemple.net/community/products/dv/204404604/using-ssh-in-putty-
After login as root, we need to create a new username you should see root@hostname, where hostname is the hostname you set up before, you don’t need to type # as it’s used to denote that you are logged in as root and have admin permissions.
# adduser username (replace username with the desired name)
# usermod -aG sudo username (give your user admin permissions)
We need to change ssh port, disable root login and import ssh-key, to edit files we will use a program called nano, make sure to save files when modifying them by pressing Control+O, use Control+x to exit
# nano /etc/ssh/sshd_config
Search for PermitRootLogin, remove the # if its commented and change it from Yes to No (use arrow keys to move through your file).
You can change port 22 to other port, make sure to remember this port as you’ll need it when you log in with the other username on ssh or using PuTTy. Optional (more secure login):
Search for PubKeyAuthentication on /etc/ssh/sshd_config/ and remove the # and set it to yes if it says no.
Generating an SSH key
Enabling UFW (firewall), allow SSH connections, installing fail2ban
# ufw default deny incoming
# ufw default allow outgoing
# apt install fail2ban
# cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
# ufw allow ssh (this is assuming you’re using port 22, replace ssh with another port if you used another port)
# ufw enable
# nano /etc/fail2ban/jail.local
Search for ssh then erase the # from [sshd] and the enabled = true below it
That’s it, your server should be ready to go, from now on we’ll log in as the new username rather than the root account we’ll cover how to install specific bots in another post.