Harsh Vardhan Goswami
TechTitters

Follow

TechTitters

Follow
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.

Harsh Vardhan Goswami's photo
Harsh Vardhan Goswami
·Feb 2, 2023·

2 min read

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:

wget https://raw.githubusercontent.com/dokku/dokku/v0.21.4/bootstrap.sh;
sudo DOKKU_TAG=v0.21.4 bash bootstrap.sh
  • 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 your-custom-domain.com

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!

http://www.youtube.com/watch?v=tYS-ihv1vpY

 
Share this