DigitalOcean Deployment Guide
End-to-end guide for creating a DigitalOcean VPS, configuring SSH access, installing Docker, and preparing a server for Matrix Easy Mode.
This guide follows the same deployment flow shown in the YouTube walkthrough.
It covers:
- SSH key creation
- DigitalOcean droplet setup
- Ubuntu VPS preparation
- Docker installation
- Docker Compose verification
- basic firewall configuration
Use this guide alongside the video walkthrough for the smoothest setup experience.
Video Walkthrough
Overview
This guide walks through setting up a fresh Ubuntu 24 VPS on DigitalOcean for Matrix Easy Mode.
The deployment flow includes:
- Creating SSH keys
- Creating a DigitalOcean droplet
- Connecting to the server
- Configuring firewall access
- Installing Docker and Docker Compose
- Verifying the environment is ready for Matrix Easy Mode
SSH Key Setup
Create SSH Key
Create a dedicated SSH key called do-key:
ssh-keygen -t ed25519 -f ~/.ssh/do-keyThis creates:
~/.ssh/do-key(private key — keep secret)
and:
~/.ssh/do-key.pub(public key — safe to share)
View Public Key
Display the public key contents:
cat ~/.ssh/do-key.pubExample:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... yourname@machineCopy the ENTIRE line.
Add SSH Key To DigitalOcean
In DigitalOcean:
- Settings
- Security
- SSH Keys
- Add SSH Key
Paste the contents of:
~/.ssh/do-key.pubGive it a friendly name:
do-keyCreate The Ubuntu VPS
Create a new droplet using:
- Ubuntu 24
- your SSH key
- your preferred region and size
This guide assumes:
- Ubuntu 24
- root login via SSH key
- a public IPv4 address
Connect To The VPS
Since you created:
~/.ssh/do-keyexplicitly specify it when connecting:
ssh -i ~/.ssh/do-key root@YOUR_SERVER_IPExample:
ssh -i ~/.ssh/do-key root@203.0.113.10First Connection Prompt
The first connection may show:
The authenticity of host '203.0.113.10' can't be established.
ED25519 key fingerprint is ...
Are you sure you want to continue connecting (yes/no/[fingerprint])?Type:
yesSuccessful Login
A successful login will look similar to:
root@ubuntu-s-2vcpu-2gb-lon1:~#Common SSH Issues
Permission denied (publickey)
This usually means:
- wrong SSH key
- forgot
-i - wrong username
- public key not added to DigitalOcean
- droplet created without the SSH key attached
Optional: Create A Non-Root User
For day-to-day administration, you may want a non-root sudo user.
Example:
adduser nigel
usermod -aG sudo nigelCopy SSH keys:
rsync --archive --chown=nigel:nigel ~/.ssh /home/nigelConnect:
ssh -i ~/.ssh/do-key nigel@YOUR_SERVER_IPFirewall Setup
Configure a minimal firewall using UFW.
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 81/tcp
ufw allow 443/tcp
ufw enable
ufw statusPorts
80/tcp= HTTP443/tcp= HTTPS81/tcp= Nginx Proxy Manager admin UI
Install Useful Utilities
apt update
apt install -y \
curl \
git \
unzip \
jq \
htop \
net-tools \
dnsutilsInstall Docker
Install Docker using the official Docker convenience installer:
curl -fsSL https://get.docker.com | shAllow Docker Without Root
usermod -aG docker $USER
newgrp dockernewgrp docker reloads the current shell so Docker group permissions apply immediately.
Alternative
Log out and SSH back into the server:
exitVerify Docker
docker --version
docker compose version
docker run hello-worldTest Docker Compose
Create a test project:
mkdir ~/docker-test
cd ~/docker-test
nano compose.ymlPaste:
services:
hello:
image: hello-worldRun:
docker compose upNext Step
Once Docker is installed and verified, continue with the main Matrix Easy Mode installation flow.
Recommended next steps:
- configure DNS
- install Nginx Proxy Manager
- create wildcard certificates
- deploy Matrix Easy Mode
Continue here:
Appendix: Manual Docker Installation
The repository-based Docker installation path is:
- more explicit
- more auditable
- useful for production-oriented environments
Install Required Packages
apt install -y ca-certificates curl gnupgCreate Docker Keyring Directory
install -m 0755 -d /etc/apt/keyringsAdd Docker GPG Key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
gpg --dearmor -o /etc/apt/keyrings/docker.gpgFix Permissions
chmod a+r /etc/apt/keyrings/docker.gpgAdd Docker Repository
IMPORTANT: Run as a single command.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/nullRefresh Repositories
apt updateInstall Docker Packages
apt install -y \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-pluginVerify Installation
docker --version
docker compose version
docker run hello-worldSSH Key Cleanup
Delete the SSH key pair:
rm ~/.ssh/do-key ~/.ssh/do-key.pubVerify deletion:
ls -la ~/.ssh | grep do-keyIf nothing prints, the files are gone.
Safer Alternative
Rename instead of deleting:
mv ~/.ssh/do-key ~/.ssh/do-key.old
mv ~/.ssh/do-key.pub ~/.ssh/do-key.old.pubOnly remove keys if you are certain no existing servers still depend on them.
