DigitalOcean Droplet Setup
by matsjfunke
Configuration
- choose Location, OS image, Droplet Type, CPU options
SSH setup
- generate ssh-key in you terminal
bash
1cd ~/.ssh
2
3ssh-keygen -t ed25519 -f ~/.ssh/<project-name>
4
5Enter passphrase (empty for no passphrase): <CR> / hit enter
6
- to add ssh-key
bash
1cat ~/.ssh/<project-name>.pub
2
copy it and paste it in DigitalOcean website and name th public key
Create Droplet
Allow incoming traffic on ports 80 and 443
on web dashboard:
- go to Networking -> Firewalls -> Create Firewall -> select http & https, add droplet -> create Firewall
SSH into server
copy ip-address on DigitalOcean
bash
1ssh -i ~/.ssh/<project-name> root@<ip-address>
2
File transfer / management setup
1. git
bash
1sudo apt update
2sudo apt upgrade -y
3sudo reboot
4# ssh into server again
5sudo apt install git -y
6# now generate an access token on github, done
7git clone https://<token>@github.com/your-username/your-repo.git
8git pull https://<token>@github.com/your-username/your-repo.git
9
2. rsync
bash
1sudo apt update
2sudo apt upgrade -y
3sudo reboot
4# ssh into server again
5sudo apt install rsync -y
6# use rsync on your maschine to send to server
7rsync -avz /source/directory/ user@remote:/destination/directory/
8