$ ssh host
# adduser somename
# usermod -aG sudo somename
# usermod -aG dokku somename
$ ssh-copy-id -i ~/.ssh/mykey somename@host
Host servername
HostName host
User somename
IdentityFile /home/someuser/.ssh/id_key
IdentitiesOnly yes
ssh servername
then exit
root ssh
sudo apt update
sudo apt dist-upgrade
$ sudo apt install dokku-update
$ sudo dokku-update run
Then reboot
sudo reboot
$ sudo vim /etc/ssh/sshd_config
PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
MaxAuthTries 3
X11Forwarding no
AllowTcpForwarding no
sudo systemctl restart ssh
then try to login as root, shouldn't work
Add swap (if memory low)
Helps with deploying faster if you don't need a lot of storage space
$ sudo fallocate -l 4G /swapfile
$ ls -lh /swapfile
$ sudo mkswap /swapfile
$ sudo swapon /swapfile
$ sudo cp /etc/fstab /etc/fstab.bak
$ echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
$ echo 'PUB KEY' | sudo dokku ssh-keys:add somename
Should be good to create dokku apps now. Set git remote to dokku instance and push branch
git remote add dokku dokku@servername:appname // use servername from ~/.ssh/config setup
git push dokku master