How to set up Dokku on VPS | Deploy your first app using Dokku.

How to set up Dokku on VPS | Deploy your first app using Dokku.

Table of contents

No heading

No headings in the article.

Welcome to the kitchen, where we're going to whip up a delicious deployment using Dokku and a custom domain! Are you tired of complicated and time-consuming deployment processes? Well, we have just the recipe for you.

Let's gather all the ingredients we need:

  • 1 VPS

  • 1 terminal

  • 1 ssh connection

  • 1 magic commands:

sudo DOKKU_TAG=v0.21.4 bash
  • 1 custom domain

  • 1 pinch of patience (very important!)

Now that we have all our ingredients, let's get started.

  1. Connect to your VPS via ssh and start the magic spell by typing in the command.

  2. Follow the on-screen prompts to complete the setup and make sure Dokku is properly installed.

  3. Now, let's create a new app on Dokku using this spell:

dokku apps:create app-name
  1. Push your app to the newly created app on Dokku using git from your local machine:
git remote add dokku dokku@your-server-ip:app-name
git push dokku master
  1. Finally, it's time to add the custom domain. Get your domain name and create a DNS A record pointing to your server IP.

  2. In Dokku, use this spell to add the custom domain to your app:

dokku domains:add app-name

And there you have it, a beautifully deployed app with a custom domain, all made in the kitchen!

Bon appetit!

Here's a video tutorial for the same!

Did you find this article valuable?

Support Harsh Vardhan Goswami by becoming a sponsor. Any amount is appreciated!