Learn how to upload your website to DigitalOcean with Server Pilot!
1. Purchase a Domain and Point It to Digital Ocean
Watch the video above (and the ones below) for more clarification!
First, you need to purchase a domain name for your website. I bought mine from Namecheap.com. After I bought example.com from Namecheap.com, I changed its name servers to point to Digital Ocean. If you need more info, follow Digital Ocean’s tutorial on connecting a generic domain name to its servers.
To do that, go to Namecheap.com, hover your mouse over Account at the top right of the page and click Domain List.
On the next page, click the Manage button to the right of your domain
Now, change the the Namecheap BasicDNS to Custom DNS.
And fill in the the blank lines with the following information (Digital Ocean’s name servers): ns1.digitalocean.com, ns2.digitalocean.com, ns3.digitalocean.com and click the green check (the save button).
2. On Digital Ocean, Point the Domain to the Server
Head over to Digital Ocean and create a droplet. To do that, just follow Digital Ocean’s tutorial on creating a droplet. Next, click droplets in the top left (this should be your default home page). Then, next to your droplet, on the right, click More and Add a Domain.
Next, enter your domain name and click Create Record.
The following A Records will be created for you, but you will want to create a CNAME record. Click CNAME Record, enter www into the Name portion and @ into the Hostname portion, and click Create CNAME Record. This will allow visitors to search for www.example.com. Otherwise, anybody who enters www before your domain name would not be able to find your website.
Doing the above will produce the following (underlined in red). @ should have turned into your domain name (with a period at the end), and www should’ve stayed the same. Now, just hit Save.
As a side note, you can add another CNAME record with an asterisk (*) instead of www. This will accomplish the same thing, but if someone types in wwww (four ws) it will also redirect them. Here is another helpful tutorial on Digital Ocean on setting up a host name with Digital Ocean.
3. Use Server Pilot to Finish It Off
Head over to server pilot and connect your Digital Ocean server to Server Pilot. You can follow this helpful tutorial on connecting your Digital Ocean droplet to ServerPilot. After clicking the green Connect Server button on Server Pilot home page, you will be prompted to enter your IP address, Root Password, and SFTP Password. The first two were provided by Digital Ocean in an email. The SFTP Password was a new password for a user called serverpilot. ServerPilot does the rest (installing PHP and other programs). Once that is done, the following should become your home page.
Click your digital ocean server.
And click Create App.
Enter a Name for your app (the Name will be the name of the folder on your server. It can be anything). Enter the domain that you purchased on Namecheap. The Server should be your Digital Ocean server that you connected to Server Pilot. The System User should be serverpilot.
You should see the following page.
Congratulations! Try pushing something to your server with rsync. Open up a terminal, navigate to a folder with some contents that you want to push to the server and enter the following command.
rsync -avz -e ‘ssh’ ./ firstname.lastname@example.org:/srv/users/serverpilot/apps/exampleapp/public
You will be prompted for the password that you created for your serverpilot user. You should now be able to visit example.com and see the files that you pushed to the server. Again, congratulations! This was a long, complicated process, but it is totally worth it! You will most definitely notice increases in speed!
Here’s a summary for once you get it down and don’t need all the pictures!
Purchase example.com from namecheap.com
Set the Nameservers to
This may take a couple hours.
DigitalOcean.com>Droplets>More>Add a Domain
Domain = example.com.com
Enter Name = (don’t enter anything here)
Enter IP Address = your IP address
This will produce the availibility of allianceofhealth.com
Name = exampleapp
Domain = exampleapp.com
Creating the app will make http://example.com/ available.