Question

How can I specify port for my dokku droplet?

  • Posted 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?

Subscribe
Share

Submit an 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