Using Dokku with existing Nginx config

Posted August 25, 2016 5.8k views
NginxDokkuUbuntu 16.04

I have a VPS (created from the Ubuntu 16.04 image) which I would like to use Dokku for some applications, and others that I would like to set up myself, all using Nginx. Is this possible?

I’m asking because I had configured Nginx to proxy to an internal app that I was running through Docker, and as soon as I installed Dokku, the app I had already set up became unreachable. I was hoping there was a way for the two systems to co-exist.

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.

Submit an Answer
1 answer

Just make new virtual host for your applications.
You can use /etc/sites-aiviable/ to define ones and then link that file to /etc/sites-enabled

server {
        include /etc/nginx/snippets/letsencrypt.conf;

        location / {
                return 301$request_uri;

server {
        listen 443 ssl;

        # SSL configuration
        ssl_certificate /etc/letsencrypt/live/;
        ssl_certificate_key /etc/letsencrypt/live/;
        ssl_trusted_certificate /etc/letsencrypt/live/;

        root /var/www/html3;

        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;

        # Redirect


        location / {
  • can you provide more info on what this means?
    “You can use /etc/sites-available/ to define ones and then link that file to /etc/sites-enabled”
    I’m in the same situation. My client has me launching his docker container, which conflicts with my dokku server. He also has his own domain name (which is easy to route with dokku).

    How do I specifically reroute one domain (or subdomain) to a docker container without interfering with dokku?