What is this used for?
To help maintain your server automatically
Why set up this functionality?
Setting up a server with DigitalOcean is easy. Once you have created your first server, sadly, you need to spend time maintaining it. (e.g. Updating packages and securing the server on an ongoing basis)
Serverpilot offers a free service that can take care of this for you. They also offer other paid services. See their pricing here
WHAT TO UNDERSTAND
The recommended service to use is Serverpilot. Just create an account with them
The free service will exclude some functionality. E.g.
- logs
- stats
- multiple system users
But for a basic setup, you don't need that so you'll be ok
This Tutorial assumes you have already setup an empty server with DigitalOcean
It takes less than 5 minutes to do and if you are unsure and need help, here is an excellent tutorial for that: https://serverpilot.io/community/articles/how-to-create-a-server-on-digitalocean.html
Ok, let's do it!
(1) In ServerPilot, go to the Servers page and click
+ Connect Server.
(2) Enter your IP address, your root password, and type a password for the SSH/SFTP user serverpilot. (you will need that later when you upload files with SFTP, so write it down.) Go ahead and click
Connect to ServerPilot
WHERE DO I GET THE ACCESS CODES FROM? - You get the IP address and your root password from an email that Digitalocean sends you upon creating a server with them
(3) ServerPilot will check the connection and begin installing on your server. Once the installation is complete, your server will show as connected in ServerPilot, and you'll be prompted to create your first app.
WHAT DOES SERVERPILOT DO? - It will set up the firewall; install PHP 5.4, 5.5, 5.6, 7.0 and 7.1; Apache configured with .htaccess and mod_rewrite enabled; NGINX; MySQL; and more.
Most of above came from this great tutorial that you should read if you want more details:
https://serverpilot.io/community/articles/how-to-connect-a-server-to-serverpilot.html
THE GOTCHA'S
Server Name - Choose a name for your server on DigitalOcean wisely because ServerPilot will copy that name and if you wish to change it later you need to change the name in two places, (ServerPilot and DigitalOcean.) Furthermore, the change will not show up in command line on a ServerPilot managed server. To have the change show up in command line, you'll have to edit the files /etc/hostname and /etc/hosts and you might find that a bit outside your comfort zone.
ADDITIONAL INFORMATION
Out of the box, Serverpilot. will also set up the swap space for you, which is a wonderful time saver!!.
If you want to know how to do that by yourself, I suggest you have a look at:
Ghost Digital Ocean Droplet Memory / Set Up Swap File Issue
Learning More about Serverpilot
You might want to also read this other article I wrote about Setting Up Ghost As An App on ServerPilot
Learn more about the basic structure that Serverpilot sets up on your server, here: https://serverpilot.io/community/articles/system-user-guide.html
Reference Links:
https://serverpilot.io/community/articles/how-to-connect-a-server-to-serverpilot.html
https://serverpilot.io/community/articles/getting-started-with-serverpilot.html
https://serverpilot.io/community/articles/system-user-guide.html
http://www.tutdepot.com/first-steps-after-serverpilot-has-been-installed/
Ghost Digital Ocean Droplet Memory / Set Up Swap File Issue
Setting Up Ghost As An App on ServerPilot