Skip to content

Exposing Publicly

Dokku Pro provides an http server and therefore cannot listen directly for https requests. Users wishing to expose it behind https can utilize functionality in Dokku 0.25.0 to treat Dokku Pro as if it was a natively hosted Dokku app.

The following example exposes a dokku-pro server running on port 5000 as a Dokku app called admin.

# create the app
dokku apps:create admin

# set the builder to the null builder, which does nothing
dokku builder:set admin selected null

# set the scheduler to the null scheduler, which does nothing
dokku scheduler:set admin selected null

# set the static-web-listener network property to the ip:port combination for your app.
dokku network:set admin static-web-listener 127.0.0.1:5000

# set the port map as desired for the port specified in your static-web-listener
dokku proxy:ports-set admin http:80:5000

# set the domains desired
dokku domains:set admin admin.dokku.me

# build the site config
dokku proxy:build-config admin

Enabling SSL

Note

This requires the letsencrypt plugin.

To enable SSL for Dokku Pro, first expose it as a Dokku App, and then run the following command:

# enable letsencrypt (if installed)
dokku letsencrypt:enable admin