How can I specify port for my dokku droplet?

Posted September 14, 2014 5.5k views

Good day everyone! I have dokku in my droplet. After every deployment, port of my node.js-application changed to something like “45967” and other. Can I specify static port, which will not be changed after deployment? How I can do it?

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.

1 answer

You can not specify a port for Dokku to run on. The port is not persistent and can change on each deploy. In order to access a app running on Dokku at a stable URL, you’ll need to use a subdomain. Check the box labeled “Use virtualhost naming for apps” when you first browse to the IP address:

To convert an existing Dokku installation to use the subdomain naming scheme, edit the file /home/dokku/VHOST on your droplet to contain “” Now you app will become available at:

by Jeff Lindsay
We’re going to show you how simple it is to get started with step-by-step instructions. By the end, you’ll have a Heroku-style application running on a DigitalOcean Droplet, deployed via Git, and a Dokku instance ready for more.
Submit an Answer