> For the complete documentation index, see [llms.txt](https://docs.djangomango.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.djangomango.com/create-your-production-environment/create-a-digital-ocean-server.md).

# Create a Digital Ocean Server

The first step towards setting up your deployment environment will be to provision and access a remote server so you can host and serve your application files. And to do that, you'll want to get yourself a DigitalOcean account.&#x20;

{% hint style="info" %}
If you haven't yet signed up to DigitalOcean, we would appreciate you using [our referral link](https://m.do.co/c/d39885943d7c). You'll get $100 credit as soon as you add a valid payment method to your account, and you'll be helping support our efforts too.&#x20;
{% endhint %}

{% hint style="info" %}
Note that you may also [reference the DigitalOcean guide](https://www.digitalocean.com/docs/droplets/how-to/create/) for these steps.
{% endhint %}

### Create your Droplet

DigitalOcean refers to their cloud servers as 'droplets'. And this is what you will be installing and running your Django application on. So to get started, access your DigitalOcean dashboard and find the 'Create > Droplet' option. You'll be presented with a set of options, which we will work through step-by-step below.

### Choose an Image

First, you'll need to pick the image you want to install on your droplet. If you want to take advantage of the Docker configurations we ship with our products, then we recommend you pick DigitalOcean's pre-configured Docker image. Which can be found via their marketplace.

![](/files/-MGV1cn5HhygQJhC6h9M)

Note that the above droplet is actually built on Ubuntu 20.04, but it'll come installed with Docker 19.03.12 and docker-compose 1.27.0 from the get-go per [the official Docker recommendations](https://docs.docker.com/engine/install/ubuntu/).

### Choose a Plan

Next, you'll need to select what droplet size you would like. Droplets come in all shapes and sizes, and the one you should go for will ultimately depend on your application type and use-case. A dynamic content application which serves a great deal of traffic will want a well provisioned and dedicated server. While a small app which generally serves static content (such as a blog), will run fine on a shared server with minimal resources.

![](/files/-MGV4eXudwQFN35g3zFO)

If you aren't sure, then we recommend DigitalOcean's 'Shared CPU/ Basic' droplet with 1 vCPU and 2GB of memory. That droplet should be more than sufficient for most small to medium sized web applications built on Django. Or, you may even get away with a 1 vCPU / 1 GB droplet if you're simply looking to run a personal blog.&#x20;

{% hint style="info" %}
You'll easily be able to scale up to the next tiered droplet as your web application grows. But there are some restrictions on scaling down tiers. Particularly with respect to disk space allocations.
{% endhint %}

### Choose a Region

One of the benefits of cloud-based hosting, is that you can provision your resources almost anywhere across the globe. And DigitalOcean is no different.

![](/files/-MGV5q7GrU3tsmLxcXTR)

If you're running a simple application which is light on content and media, then your choice here may not have a significant impact on performance. But either way, try to pick the region closest to your majority user-base and/or your own location.&#x20;

Keep in mind, you do have the option to create a managed [Storage Space on DigitalOcean](/create-your-production-environment/create-a-storage-space.md), which will allow you to replicate and serve your application files via a global Content Delivery Network (CDN). That way, your users will be able to retrieve your app files, particularly large media files, from a CDN server nearest to their own location rather than your droplet location.&#x20;

{% hint style="info" %}
Take note of your selected droplet region. If you create additional resources later on, such as a managed database, then locating them in the same region will provide some set up benefits.
{% endhint %}

### Additional Options

You have a few additional options for your droplet in the next section. Here, let's enable monitoring so we can take advantage of Digital Ocean's metric collection and monitoring functions. But we can leave IPv6 and User data as disabled.

![](/files/-MGV8zf_ltukPWnxpk6k)

### Authentication

Next, you need to either create a root password or SSH key to access your droplet. We highly recommend you create a key for the additional security. To do so, you can follow DigitalOcean's instructions on the right of the screen.

![](/files/-MGV80zpPTv6vDECSYOV)

Once set up, you can make use of [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) to access your droplet if you are on Windows, or [OpenSSH](https://www.openssh.com/) if you prefer to use terminal via Linux or MacOS.

### Enabling Backups

You're almost ready to finalize and build your droplet. But you'll first need to decide whether you want to enable backups of your droplet's file system. The choice is yours of course, but in our opinion, you'll only need to enable droplet backups if you don't intend on creating a separate managed database.&#x20;

Why you may ask? Well, it's important to understand that if you don't run a separate managed database, all of your application data will be created and stored via our pre-configured Docker database image which will actually reside on your droplet disk. So if something happens to your droplet and you don't have a backup, you will also lose all of your application data.

Alternatively, if you do create a separate [Managed Database on DigitalOcean](/create-your-production-environment/create-a-managed-datastore.md), all of your application data will be on a separate dedicated server which will have it's own regular backup. And while your actual Django application files may still be at risk, these should be read-only from the perspective of the droplet. So you should be in a position to quickly and easily get a fresh set of your project files back on the droplet, and get back up and running again.

### Create the Droplet

And that's it. You're now ready to create your new droplet via the Create Droplet button at the bottom of the page.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.djangomango.com/create-your-production-environment/create-a-digital-ocean-server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
