I started using DigitalOcean (DO) when my previous hosting supplier suddenly raised its prices. I already had experience working with server installations myself so I gave DO a chance as it is not that expensive and setting up a server for myself was a fun experiment to do. It wasn’t very complicated as there are many DO tutorials scattered around.
I’m writing this post to document all the tutorials I used to set up my server and domain and share with you my referral link, which gives you an initial $10 credit to start with and once they spend $25 on the platform the referrer gets $25 as well. My referral link is https://m.do.co/c/0b71ad4b3f4b , if you decide to use it.
First you will need to create an account (you can do so clicking the link above to net you the $10 credit).
After you have an account, follow the steps here to create an SSH key used for logging in to your future server and read what’s below when you are about to create you new server.
Tip: When using PUTTY you can paste text in the clipboard by right clicking.
You could choose any droplet configuration you want, or even choose to have a pre-configured server but for now I’ll stick to a blank Ubuntu 16.04 x64 server. At the time of writing the latest version is 16.04.3.
I’ll choose the $5dll per month plan as it is enough for my webserver. You can change upgrade this later if you need to.
I chose NYC data server but you can choose one that’s near you.
Choose the SSH key you added.
Choose a hostname and click CREATE button at the bottom.
That’s it to get your droplet. Now you can follow the next tutorials to setup the webserver (I’m not the owner of the content in the links).
- Initial Server Setup with Ubuntu 16.04
- When you get to install SSH for the new user, use Option 2 and copy the public key’s text straight from PuttyGEN.
- Then, you should edit your Putty configuration to login as your new user instead of as root (otherwise it makes no sense adding a new user).
- How To Set Up a Host Name with DigitalOcean
- I just added an A record (@) and a CNAME record (*).
- How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04
- How To Secure Apache with Let’s Encrypt on Ubuntu 16.04
- How To Use Filezilla to Transfer and Manage Files Securely on your VPS
- Optional: How To Install WordPress on Ubuntu 14.04
Important: You need to change permissions on the /var/www/html/ folder to add files throuhg SFTP (source):
- Change the directory owner and group:
sudo chown -R www-data:www-data /var/www/html
- allow the group to write to the directory with appropriate permissions:
sudo chmod -R 775 /var/www/html
- Add myself to the www-data group:
sudo usermod -a -G www-data [my username]
Now just upload your webpage to your server’s /var/www/html/ folder and your done!