Skip to content

Instantly share code, notes, and snippets.

@col
Last active January 10, 2024 17:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save col/96c26676c57d6b4b0f55 to your computer and use it in GitHub Desktop.
Save col/96c26676c57d6b4b0f55 to your computer and use it in GitHub Desktop.

Setup Dokku instance on Digital Ocean

Step 1 - Create a Droplet

  1. Goto https://www.digitalocean.com
  2. Create Droplet
  3. Choose 'One Click App' - 'Dokku 0.4.7 14.04'
  4. Choose size (I chose the $10 option)
  5. No additional requirements
  6. Setup an SSH Key
  7. Enter a hostname (this is not a real hostname and can be anything you like)
  8. Wait for your droplet to start...
  9. Get the IP of your droplet and open it in a browser ( http://<droplet_ip> )
  10. On the Dokku Setup page enter the actual domain name you want to use (ie. mydomain.com)
  11. Check 'Use virtualhost naming for apps'
  12. Finish setup

Step 2 - Setup SSH connection to your droplet

  1. Add an entry to your ~/.ssh/config file
Host mydomain.com
  HostName mydomain.com
  User root
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_rsa
  1. (optional) I didn't have a real domain at this point so I just added my fake domain name to my own /etc/hosts file
<droplet_ip> <mydomain.com>
  1. Try to connect $ ssh <mydomain.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment