2015-04-18 02:58:34 -04:00
# Debian Package Installation Notes
2019-01-11 18:37:42 +08:00
As of 0.3.18, Dokku defaults to being installed via Debian package. While certain hosts may require extra work to get running, you may optionally wish to automate the installation of Dokku without the use of our `bootstrap.sh` Bash script. The following are the steps run by said script:
2015-04-18 02:58:34 -04:00
```shell
2015-09-14 22:03:47 -07:00
# install prerequisites
2019-02-02 13:49:24 -05:00
sudo apt-get update -qq >/dev/null
2021-01-17 16:09:58 -05:00
sudo apt-get -qq -y --no-install-recommends install apt-transport-https
2015-04-18 02:58:34 -04:00
2015-09-14 22:03:47 -07:00
# install docker
2015-11-09 22:52:58 -06:00
wget -nv -O - https://get.docker.com/ | sh
2015-04-18 02:58:34 -04:00
2015-09-14 22:03:47 -07:00
# install dokku
2019-01-10 12:18:01 -05:00
wget -nv -O - https://packagecloud.io/dokku/dokku/gpgkey | apt-key add -
2020-02-28 05:57:55 -05:00
OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
2020-05-06 00:36:22 -04:00
echo "xenial bionic focal" | grep -q "$OS_ID" || OS_ID="bionic"
2018-01-13 18:36:05 -05:00
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ ${OS_ID} main" | sudo tee /etc/apt/sources.list.d/dokku.list
2019-02-02 13:49:24 -05:00
sudo apt-get update -qq >/dev/null
2021-01-17 16:09:58 -05:00
sudo apt-get -qq -y install dokku
2015-10-23 12:54:58 -05:00
sudo dokku plugin:install-dependencies --core
2015-04-18 02:58:34 -04:00
```
2015-05-03 22:21:32 +02:00
## Unattended installation
2019-01-11 18:37:42 +08:00
In case you want to perform an unattended installation of Dokku, this is made possible through [debconf ](https://en.wikipedia.org/wiki/Debconf_%28software_package%29 ), which allows you to configure a package before installing it.
2015-05-03 22:21:32 +02:00
You can set any of the below options through the `debconf-set-selections` command, for example to enable vhost-based deployments:
```bash
2016-01-12 13:00:06 +00:00
echo "dokku dokku/vhost_enable boolean true" | sudo debconf-set-selections
2015-05-03 22:21:32 +02:00
```
After setting the desired options, proceed with the installation as described above.
### debconf options
| Name | Type | Default | Description |
| ------------------ | ------- | --------------------- | ------------------------------------------------------------------------ |
| dokku/web_config | boolean | true | Use web-based config for below options |
2019-01-11 18:37:42 +08:00
| dokku/vhost_enable | boolean | false | Use vhost-based deployments (e.g. `[yourapp].dokku.me` ) |
2015-05-03 22:21:32 +02:00
| dokku/hostname | string | dokku.me | Hostname, used as vhost domain and for showing app URL after deploy |
2017-10-15 13:54:13 +03:00
| dokku/skip_key_file| boolean | false | Don't check for the existence of the dokku/key_file. Warning: Setting this to true, will require you to manually add an SSH key later on. |
2016-09-03 15:51:05 -04:00
| dokku/key_file | string | /root/.ssh/id_rsa.pub | Path on disk to an SSH key to add to the Dokku user (Will be ignored on `dpkg-reconfigure` ) |
2018-09-30 15:33:42 -04:00
| dokku/nginx_enable | boolean | true | Enable nginx-vhosts plugin |