Skip to content

How to Create a DigitalOcean Ubuntu VPS

  • by

This guide explains how to create a fresh Ubuntu VPS (Droplet) on DigitalOcean for hosting City School.

For a new production server, DigitalOcean currently recommends using a current Ubuntu LTS release such as Ubuntu 24.04, SSH-key authentication, IPv6, monitoring, a VPC network, and automated backups.

Prerequisites

Before you begin, you need:

  • A DigitalOcean account
  • A valid payment method
  • An SSH key
  • A domain name for your City School installation
  • Basic knowledge of SSH and Linux

Step 1 — Log in to DigitalOcean

Go to the DigitalOcean Control Panel and sign in to your account.

From the dashboard, select:

Create → Droplets

DigitalOcean calls its VPS instances Droplets.

Step 2 — Choose Ubuntu

Under Choose an image, select the OS tab.

Select:

Ubuntu 24.04 LTS

Ubuntu 24.04 is a suitable current LTS choice for this installation guide. DigitalOcean’s current documentation specifically lists Ubuntu 24.04 as an example of a current LTS version.

Step 3 — Choose the Droplet Size

For a small City School installation, choose a plan that provides enough CPU, RAM, and SSD storage for your expected traffic.

The minimum suitable size depends on the number of users and services you will run. For production, avoid choosing a very small VPS if the server will also run MySQL, PHP, web-server software, queues, and other services.

DigitalOcean’s Droplet plan determines the available RAM, disk space, and vCPUs.

For a basic starting server, a configuration such as:

  • 2 vCPUs
  • 2–4 GB RAM
  • SSD storage

is a reasonable starting point, with the ability to resize the Droplet later as required.

Step 4 — Select a Data Center Region

Choose the DigitalOcean region closest to your primary users.

For example, if most of your users are located in Europe, choose a European data center.

Keeping your application geographically close to your users generally helps reduce network latency.

Step 5 — Configure the VPC Network

Under VPC Network, use the default VPC unless you have a specific network architecture that requires a different VPC.

DigitalOcean’s production setup recommendations include using a VPC network.

Step 6 — Enable IPv6 and Monitoring

Enable:

  • IPv6
  • Improved Metrics and Monitoring

DigitalOcean recommends enabling these during Droplet creation because they are easier to configure at this stage.

Step 7 — Configure SSH Authentication

Under Choose Authentication Method, select:

SSH Key

Select an existing SSH key or add your public SSH key to DigitalOcean.

SSH-key authentication is recommended instead of relying on password-based root access.

Important

Keep your private SSH key secure.

Never upload your private key to your server or share it with another person.

Your public key can be added to DigitalOcean, while the private key remains on your own computer.

Step 8 — Configure Backups

For a production City School server, enable:

Automated Backups

Backups provide an additional recovery option if the server experiences a failure or important data is accidentally deleted.

DigitalOcean recommends automated backups as part of its production-ready Droplet setup.

Important: Backups should not be your only backup strategy. Database backups and application backups should also be considered separately.

Step 9 — Name the Droplet

Give the server a descriptive hostname.

For example:

city-school-production

or:

cityschool-server

Use a name that makes it obvious what the server is used for.

Step 10 — Create the Droplet

Review the configuration and click:

Create Droplet

DigitalOcean will provision the Ubuntu server.

After creation, you will see the Droplet’s public IP address in the Control Panel.

Save this IP address because you will use it to connect to the server and later configure your domain’s DNS records.

Step 11 — Connect to the VPS

Open Terminal on your local computer.

Use SSH to connect to the server:

ssh root@YOUR_SERVER_IP

Replace:

YOUR_SERVER_IP

with the public IPv4 address of your Droplet.

DigitalOcean documents SSH access using the Droplet’s IP address and the root user for initial access on most distributions.

Example:

ssh root@203.0.113.25

The first time you connect, SSH may ask you to confirm the server fingerprint.

Step 12 — Verify Ubuntu

After connecting, check the Ubuntu version:

lsb_release -a

You can also check the kernel and system information:

uname -a

You should see that the server is running Ubuntu 24.04.

Step 13 — Update the Server

Before installing City School or other software, update the Ubuntu package index:

apt update

Then install available updates:

apt upgrade -y

After the update completes, the VPS is ready for the next stage.

Security Note

Do not use the newly created server as a production application server without completing the security configuration.

The next guide should configure:

  • A non-root sudo user
  • SSH key-only access
  • Firewall rules
  • Root login restrictions
  • Automatic security updates