Accessing your Server

After you have created your droplet, you'll need to access it, set it up, and push your application files so that others can consume them.

There isn't much point having an empty droplet sitting in the cloud is there? So, let's walk through how you can get access to your droplet, confirm your configuration, and transfer the application files.

We recommend you take a look at our Get Started with your Product section to familiarize yourself with the project files before actually running your project.

Accessing your Droplet

You have a couple of options available to access your droplet. One method involves accessing your droplet console via DigitalOcean's dashboard. You'll simply need to log into your DigitalOcean dashboard, find the droplet, and then find the relevant console option via your droplet menu. You'll need to log in as 'root' and provide the same password you created as part of the droplet creation process. But DigitalOcean can handle the rest from there.

If you prefer a method which doesn't require you to log into your DigitalOcean dashboard, then you'll need an application such as PuTTY or OpenSSH. If you didn't create a SSH key pair when you created the droplet, you should be fine to simply point these applications at your droplet public IP address and to log in via your root password. However, if you did create a key pair (which we highly recommend), you'll need to go through some extra steps which are well covered by DigitalOcean.

If all goes well, you should be able to access your droplet and see a screen similar to the below.

Droplet Configuration

Even though we created a droplet which has Ubuntu and Docker pre-installed, we still need to run through a couple of quick steps to make sure everything is ready for your Django application.

First, you'll want to make sure the distribution is up-to-date. To do so, simply run the following commands via your console:

apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y
do-release-upgrade

It should take 5 minutes or so to check, download and install any updates. So use this time to take a quick break if you need.

Next, we want to enable brute-force protection by running the following via console:

apt-get install fail2ban

This step will prevent IP addresses from logging into the server for 10 minutes if they provide an incorrect password three times, which is critical towards preventing patrolling bots which try brute-force tactics to access root.

Finally, we need to make sure we are running the correct version of Docker and docker-compose. This step is covered in the Install Docker and docker-compose section as part of your development environment setup. But in short, you'll want to check the current installed versions and make sure they are up-to-date according to the requirements of your DjangoMango project.

Pushing your Files

If you worked through our steps to Set up Version Control as part of your Development Environment, you are going to find this step a breeze. You simply need to repeat the same steps to clone your project repository to your droplet. Job done.

However, if you don't want to set up version control, your other option is to access the droplet using File Transfer Protocol (FTP). FileZilla provides an FTP interface which can be installed on most OS types. And likewise, DigitalOcean provides a handy guide on how to get set up for file transfer using FileZilla. In short, you should be able to access your droplet by simply entering your droplets public IP address into FileZilla and using SFTP over the default port 22.

Last updated