Benefits of Running Dokku on a Digital Ocean Droplet
How running Dokku on a Digital Ocean Droplet can facilitate deploying apps, servers, databases, and websites.
Disclaimer: links in this article are affiliate links. Think of them like a small tip jar that helps keep the lights on during the creation of content like this.
What is Digital Ocean?
Digital Ocean Droples are affordable and powerful virtual machines where we can deploy our apps and databases.
What is Dokku?
Dokku is a self hosted command line PaaS based on Heroku’s build packs and Docker containers which will help us get our apps up and running easier and faster than ever.
Why use Dokku on a Digital Ocean Droplet?
You have a great new app that you’ve developed (it could be anything at all), and while it’s cool to have running locally, now it’s time to share it with the world! The tools and options available for deploying your app are almost endless, but there’s no reason to feel like you’re lost at sea (no pun intended). The great thing about this setup is that it’s a perfect choice for everything from hobby projects to full production builds. As it supports apps written in just about any programming language, as well as a variety of databases to connect them to, setting up and maintaining our work is a breeze.
Some possibilities include:
- Static websites
- Wordpress websites
- Headless CMS's
- Servers for apps or web apps
- Databases
The one caveat is that it’s not designed for horizontal scaling, so if that’s something you expect to need right off the bat, this probably isn’t the best option. There are however other tools offered by Digital Ocean that will fit the bill perfectly; I’ll cover those in a future article.
If you're already convinced, and know you want to try this setup out, head over to this article for a detailed guide on how to get things up and running.
Benefits of Digital Ocean
Affordability
Digital Ocean offers some very affordable entry level droplets (virtual machines), my favorite being the $6/month option which is still generally powerful enough to host several apps at once. Even the higher ram and faster processers versions are a great bang for our buck.
Scalability
One great thing about Digital Ocean Droplets is that we can scale them up and down at any time. Ram, processor, storage are all adjustable, so if our app is getting more traffic than expected we can simply dial up the droplet.
Performance
When compared to the numerous shared hosting options available, Digital Ocean droplets win hands down. With guaranteed resources, we don’t ever have to worry about dips in performance during peak times.
Benefits of Dokku
Cost Effective
One of the best things about Dokku is that it allows us to host multiple apps and websites on a single droplet. This lets us use our resources more efficiently and save money.
Open Source
Dokku is free to use, and who doesn’t love open source!
Easy to Use
While it does take some initial set up and headaches, Dokku is a relatively simple to use set up that we will learn quickly and it will allow us to get new projects up and running lickety-split.
Environment Setup
Using build packs based on Heroku’s takes all of the heavy lifting out of setting up our environment. When an app is pushed, the environment is automatically detected based on the technologies we’ve used, and set up for us without the headache of doing it manually each time.
Database Setup
With Dokku we can spin up databases and connect them to our app on the same droplet in seconds. We can also configure automatic backups to a variety of locations such as AWS S3, so we always know our data is safe in case of any unforeseen failures.
Nginx Setup
Dokku makes setting up an Nginx reverse proxy trivial. This allows us to easily point any number of domains and subdomains to the desired apps and forward ports without any headache.
Automatic Deploys
Configuring Dokku to use Github actions is straight forward and allows us to automatically deploy our apps just by pushing to a specified branch. This allows us to integrate our entire work flow for a seamless experience.
Zero Downtime Deploys
Dokku leverages Docker containers to deploy our apps. What’s great about that is, when we push an update, Dokku will build the app in a new container and deploy it, before destroying the old container. That means our app will never be down just because we needed to push an update.
Automated SSL
Dokku has integrated Let’s Encrypt which allows us to set up ssl on our sites virtually effortlessly. Certificate renewals can also be easily automated so you never have to keep track of expiration dates.
Large Community
If we ever run into issues or bugs, there is a plethora of content available, and if that doesn’t do the trick, Dokku’s Discord server is incredibly active with many users around to help us out. To top it all off, the developer goes above and beyond to help answer any questions and make sure everyone is getting the support they need and no one is getting overlooked.
Next Steps
Ready to dive in (the last pun, I promise)? Then head over to this article for a detailed guide on setting things up.
And if you ever get stuck feel free to head back to Naughty Cat and shoot us a message; We're always happy to chat or help troubleshoot. We’re also always available for consulting, web development, maintenance, hosting, and anything else web related.