Question

How to change dokku domain

I feel happy with my Droplet with Ubuntu + Dokku. However, In the installation I used a domain and I want to change for another.

It is possible without make a fresh install? I put much effort in setup databases in services :'(

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This question was answered by @maikofelix89:

Yeah its possible.Ive done it a number of times.There are two modes

1.server side(ssh session to your droplet) simply run the command

   dokku domains:set appname mydomain.com  *.mydomain.com

where appname is your dokku app name,mydomain is the name of your domain.it does not necessarily have to be .com . once you run that it should release the application and deploy it again

2.client(side) i’m assuming you deploy your application from your machine using “git dokku push master” command.if so then you should change the git remote of your machine use

   git remote -v   //to check your remotes

if one exists then you can remove it using

  git remote rm remotename   //remote name is the one shown on source and destination

finally to change the domain name run the following command

  git remote add dokku dokku@yourdomain:yourappname

i hope this helps someone :)

View the original comment