You can always install Dokku straight from the latest - potentially unstable - master release via the following bash command:
If you plan on developing dokku, the easiest way to install from your own repository is cloning the repository and calling the install script. Example:
Makefile allows source URLs to be overridden to include customizations from your own repositories. The
STACK_URL environment variables may be set to override the defaults (see the
Makefile for how these apply). Example:
Bootstrap a server from your own repository
The bootstrap script allows the Dokku repository URL to be overridden to bootstrap a host from your own clone of Dokku using the
DOKKU_REPO environment variable. Example:
Custom herokuish build
Dokku ships with a pre-built version of version of the herokuish component by default. If you want to build your own version you can specify that with an env variable.
Once Dokku is installed, if you are not using the web-installer, you'll want to configure a the virtualhost setup as well as the push user. If you do not, your installation will be considered incomplete and you will not be able to deploy applications.
You should also stop and disable the
dokku-installer service to remove public access to adding SSH keys.
Set up a domain and a wildcard domain pointing to that host. Make sure
/home/dokku/VHOST is set to this domain. By default it's set to whatever hostname the host has. This file is only created if the hostname can be resolved by dig (
dig +short $(hostname -f)). Otherwise you have to create the file manually and set it to your preferred domain. If this file still is not present when you push your app, Dokku will publish the app with a port number (i.e.
http://example.com:49154 - note the missing subdomain).
Follow the user management documentation in order to add users to Dokku, or to give other Unix accounts access to Dokku.
VMs with less than 1GB of memory
Having less than 1GB of system memory available for Dokku and its containers, for example Digital Ocean's small 512MB machines, might result in unexpected errors, such as ! [remote rejected] master -> master (pre-receive hook declined) during installation of NPM dependencies (https://github.com/npm/npm/issues/3867).
To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size.
To resize the swap file of a 512MB machine to 1GB, follow these steps while in SSH within your machine: