Report this

What is the reason for this report?

How can I specify port for my dokku droplet?

Posted on September 14, 2014

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?



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!

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.

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 “youdomain.com” Now you app will become available at: http://yourapp.youdomain.com

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.