Configure Domain
Choose a domain or IP address that points to your server. You have different options:
1. Use your own domain (make sure DNS A or CNAME record points to server IP):
dokku domains:set-global yourdomain.com
2. Or use your server IP directly (not recommended for production):
dokku domains:set-global 10.0.0.2
3. Or use sslip.io for automatic DNS resolving your IP:
dokku domains:set-global 10.0.0.2.sslip.io
Add Your SSH Public Key
A public SSH key is used to securely authenticate access to the server.
Your public key is usually in ~/.ssh/id_rsa.pub (on your local machine). If you don’t have one, generate it with:
ssh-keygen
Add your public key to Dokku to grant deployment permissions.
# Add existing authorized keys cat ~/.ssh/authorized_keys | dokku ssh-keys:add admin # Or add a specific public key string PUBLIC_KEY="your-public-key-contents-here" echo "$PUBLIC_KEY" | dokku ssh-keys:add admin
Deploy Your First Application
Follow the official guide to deploy apps: https://dokku.com/docs/deployment/application-deployment/