What You'll Need
Before starting, ensure you have:
Server Requirements
- • RamNode VPS (minimum 1GB RAM recommended)
- • Ubuntu 22.04/24.04 LTS
- • A domain name (optional but recommended)
- • SSH access to your server
Knowledge Requirements
- • Basic command line knowledge
- • An application ready for deployment
- • Git basics
- • Understanding of web applications
Why Choose RamNode + Dokku?
RamNode Benefits
- • Reliable, affordable VPS hosting
- • Excellent performance and customer support
- • Perfect for small to medium-scale applications
- • Multiple data center locations
Dokku Benefits
- • Git-based deployments
- • Automatic SSL certificates
- • Database management
- • Plugin ecosystem
- • Cost savings vs managed PaaS
Setting Up Your RamNode VPS
Order your VPS and set up the initial configuration:
Ordering Your VPS
- 1. Visit the Cloud Control Panel and choose a VPS plan (1GB RAM minimum for Dokku)
- 2. Choose your preferred data center location
- 3. Select Ubuntu 22.04 or 24.04 LTS as your operating system
- 4. Complete the order and wait for provisioning
ssh root@your-server-ipapt update && apt upgrade -yInitial Server Configuration
Set up basic security and create a user:
adduser dokku
usermod -aG sudo dokku
su - dokkumkdir -p ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keysSet up a basic firewall:
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable⚠️ Warning: Make sure SSH is allowed before enabling UFW to avoid losing access!
Install Dokku
Install Dokku using the official installation script:
wget -NP . https://dokku.com/install/v0.34.8/bootstrap.sh
sudo DOKKU_TAG=v0.34.8 bash bootstrap.sh⏱️ Note: The installation process may take 10-15 minutes. Be patient while Docker and dependencies are installed.
dokku version✅ Dokku is now installed and ready for configuration!
Domain and SSH Setup
Configure your domain and SSH keys for deployment:
dokku domains:set-global yourdomain.comAdd your SSH public key for Git deployments:
# On your local machine, copy your public key
cat ~/.ssh/id_rsa.pub
# On the server, add the key
echo "your-public-key-here" | dokku ssh-keys:add admin💡 Tip: If you don't have an SSH key, generate one with ssh-keygen -t rsa -b 4096
Create Your First App
Create a new application in Dokku:
dokku apps:create my-appdokku domains:set my-app my-app.yourdomain.comdokku apps:listApp Configuration Options
- •
dokku config:set my-app KEY=value- Set environment variables - •
dokku domains:add my-app domain.com- Add additional domains - •
dokku ps:scale my-app web=2- Scale application
Deploy Your Application
Deploy your application using Git:
cd /path/to/your/app
git remote add dokku dokku@your-server:my-appgit push dokku mainSample Application Structure
For a Node.js app, ensure you have:
- •
package.jsonwith start script - •
Procfile(optional):web: node server.js - • Your application files
🚀 Your application should now be deployed and accessible at your domain!
Configure Your Application
Configure environment variables and application settings:
dokku config:set my-app NODE_ENV=production
dokku config:set my-app DATABASE_URL=your-database-url
dokku config:set my-app SECRET_KEY=your-secret-keydokku config:show my-appdokku logs my-app --tailSSL Certificate Setup
Enable automatic SSL certificates with Let's Encrypt:
sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.gitdokku config:set --no-restart my-app DOKKU_LETSENCRYPT_EMAIL=your-email@domain.com
dokku letsencrypt:enable my-appdokku letsencrypt:cron-job --add🔒 Your application now has automatic SSL certificates that will renew automatically!
Database Setup
Install and configure databases for your applications:
💡 Tip: Database connection URLs are automatically added to your app's environment variables when linked.
Monitoring and Maintenance
Monitor your applications and perform maintenance tasks:
Monitoring Commands
- •
dokku logs my-app - •
dokku ps:report my-app - •
dokku apps:list - •
dokku config:show my-app
Maintenance Tasks
- •
dokku cleanup - •
dokku ps:restart my-app - •
dokku apps:destroy my-app - •
dokku system:report
# Backup database
dokku postgres:export my-app-db > backup.sql
# Import database
dokku postgres:import my-app-db < backup.sqlTroubleshooting Common Issues
Best Practices and Security
Security Best Practices
- • Keep Dokku and plugins updated
- • Use SSH keys instead of passwords
- • Enable automatic SSL certificates
- • Regularly backup your databases
- • Monitor application logs
- • Use environment variables for secrets
Performance Tips
- • Right-size your VPS for your apps
- • Use appropriate scaling for web processes
- • Implement proper caching strategies
- • Monitor resource usage regularly
- • Clean up unused containers and images
- • Use CDN for static assets
# Update Dokku
sudo dokku plugin:update
# Clean up unused containers and images
dokku cleanup
# View system resource usage
dokku system:report🎉 Congratulations! You now have a fully functional Dokku PaaS running on your RamNode VPS. You can deploy multiple applications, manage databases, and scale as needed—all with simple Git-based deployments!
