Dokku always deploy to the top level domain

Posted September 15, 2014 10.6k views

I’m new to Dokku and I need a little help

After installing an image with Dokku and adding the SSH keys and everything
I have 2 node.js apps and I want them to be at and

The issue I’m facing is that when I do a git push I find that the top level domain ex:“” always points to the latest app deployed
and also the subdomain is not working

So that means that any app I deploy always gets deployed to the top level domain and not a subdomain

Isn’t Dokku who handles this or there’s any configurations from my side ?

command used to deply:
After cloning a git repo

git remote add node1

git push node1 master

of course I’ve changed to my domain name and updated the records on DO’s DNS page

Even after the deployment is done Dokku says:

=====> Application deployed:

but when I try to open the URL I get a white page and when I visit the top level domain I get the app

So please help and thanks for your time

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
4 answers

It sounds like you have your DNS configured incorrectly. You need two A records, the first pointing to the domain (example) and the second is a wildcard subdomain (*

Checkout: How to Use the DigitalOcean Dokku Application

The top level domain problem I fixed by manually defining the domain for one of the apps.

At the end of the execution for git push node1 master you should have a message saying which domian was given to your app. e.g. or

My website’s top level domain is actually the app

My current settings are:

And it still didn’t work

Your help is greatly appreciated

  • Can you post here the output for git push node1 master ?

  • root@msaleh:~/www/productframework# git push pr master
    The authenticity of host ' (' can't be established.
    ECDSA key fingerprint is 7d:0e:49:79:63:6b:48:7e:b1:fe:4c:47:53:48:91:9f.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '' (ECDSA) to the list of known hosts.'s password:
    Counting objects: 173, done.
    Compressing objects: 100% (148/148), done.
    Writing objects: 100% (173/173), 582.26 KiB | 0 bytes/s, done.
    Total 173 (delta 14), reused 173 (delta 14)
    -----> Cleaning up ...
    -----> Building pr ...
    remote: Cloning into '/tmp/tmp.f7F5EsPcx7'...
    remote: warning: You appear to have cloned an empty repository.
    remote: done.
    remote: HEAD is now at 2457869... Procfile
           Node.js app detected
           PRO TIP: Specify a node version in package.json
    -----> Defaulting to latest stable node: 0.10.31
    -----> Downloading and installing node
    -----> Installing dependencies
           npm WARN deprecated static-favicon@1.0.2: use serve-favicon module
           debug@0.7.4 node_modules/debug
           express-ejs-layouts@1.1.0 node_modules/express-ejs-layouts
           static-favicon@1.0.2 node_modules/static-favicon
           cookie-parser@1.0.1 node_modules/cookie-parser
           ├── cookie-signature@1.0.3
           └── cookie@0.1.0
           morgan@1.0.1 node_modules/morgan
           └── bytes@0.3.0
           ejs@0.8.8 node_modules/ejs
           body-parser@1.0.2 node_modules/body-parser
           ├── qs@0.6.6
           ├── raw-body@1.1.7 (string_decoder@0.10.31, bytes@1.0.0)
           └── type-is@1.1.0 (mime@1.2.11)
           express@4.2.0 node_modules/express
           ├── parseurl@1.0.1
           ├── merge-descriptors@0.0.2
           ├── utils-merge@1.0.0
           ├── cookie-signature@1.0.3
           ├── cookie@0.1.2
           ├── escape-html@1.0.1
           ├── debug@0.8.1
           ├── qs@0.6.6
           ├── fresh@0.2.2
           ├── range-parser@1.0.0
           ├── methods@1.0.0
           ├── buffer-crc32@0.2.1
           ├── serve-static@1.1.0
           ├── path-to-regexp@0.1.2
           ├── type-is@1.1.0 (mime@1.2.11)
           ├── send@0.3.0 (debug@0.8.0, mime@1.2.11)
           └── accepts@1.0.1 (negotiator@0.4.7, mime@1.2.11)
    -----> Caching node_modules directory for future builds
    -----> Cleaning up node-gyp and npm artifacts
    -----> Building runtime environment
    -----> Discovering process types
           Procfile declares types -> web
    -----> Releasing pr ...
    -----> Deploying pr ...
    =====> Application deployed:
     * [new branch]      master -> master
  • also both VHOST and HOSTNAME files contains my domain name

Guys thank you a lot it worked :)
I had to change my DNS settings from * to just * and wait for 3 to 6 hours
Thanks a lot :)