Last modified: March 23, 2026
This article is written in: πΊπΈ
Digital Ocean provides cloud-based virtual machines called Droplets that let you deploy and manage CentOS servers. The overall flow looks like this:
+-------------+ SSH (port 22) +----------------------+
| | ----------------------------> | |
| Local | | Digital Ocean |
| Machine | | Droplet (CentOS) |
| | <---------------------------- | |
+-------------+ Response +----------------------+
| | |
| | |
+---+ +---+ +---+
|Web| |DB | |App|
+---+ +---+ +---+
:80/443 :5432 :8080
ssh-keygen -t ed25519 -C "your_email@example.com"
~/.ssh/id_ed25519) or specify a custom path.cat ~/.ssh/id_ed25519.pub
prod-api-01) and click "Create Droplet."ssh root@YOUR_DROPLET_IP
adduser deploy
passwd deploy
usermod -aG wheel deploy
rsync --archive --chown=deploy:deploy ~/.ssh /home/deploy
ssh deploy@YOUR_DROPLET_IP.sudo dnf update -y
sudo dnf install -y vim git curl wget
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
sudo firewall-cmd --list-all
sudo dnf install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx
http://YOUR_DROPLET_IP in a browser.scp:git clone https://github.com/your-org/your-app.git /var/www/your-app
/etc/ssh/sshd_config:PermitRootLogin no
PasswordAuthentication no
sudo systemctl restart sshd
curl -sSL https://repos.insights.digitalocean.com/install.sh | sudo bash
htop, journalctl, or Prometheus for deeper insight into resource usage.pg_dump mydb > /backups/mydb_$(date +%F).sql
sudo dnf install -y dnf-automatic
sudo systemctl enable --now dnf-automatic-install.timer
sudo dnf needs-restarting -r periodically to check if a reboot is required after updates.sudo dnf install -y epel-release
sudo dnf install -y fail2ban
sudo systemctl enable --now fail2ban
sudo firewall-cmd --list-all and remove any that are no longer needed.