2014-10-04 04:24:22 -04:00
# Upgrading
2022-09-05 17:07:57 -04:00
If your version of Dokku is pre 0.3.0 (check with `dokku version` ), we recommend [a fresh install ](/docs/getting-started/installation/index.md ) on a new server.
2014-10-04 04:24:22 -04:00
2018-01-13 19:26:49 -05:00
## Security Updates
2019-02-03 16:04:00 +08:00
For any security related updates, please follow our [Twitter account ](https://twitter.com/dokku ). As Dokku does not run any daemons, the security risk introduced by our software is minimal.
2018-01-13 19:26:49 -05:00
Your operating system may occasionally provide security updates. We recommend setting unattended upgrades for your operating system. Here are some helpful links:
- [Arch Linux System Maintenance ](https://wiki.archlinux.org/index.php/System_maintenance )
- [Debian Unattended Upgrades ](https://wiki.debian.org/UnattendedUpgrades )
- [Ubuntu Unattended Upgrades ](https://help.ubuntu.com/community/AutomaticSecurityUpdates )
2018-01-21 15:42:34 -05:00
Docker releases updates periodically to their engine. We recommend reading their release notes and upgrading accordingly. Please see the [Docker documentation ](https://docs.docker.com/ ) for more details.
2016-03-21 01:41:03 -04:00
## Migration Guides
2016-03-02 23:10:05 -05:00
2016-04-20 15:32:52 -05:00
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
2016-03-02 23:10:05 -05:00
2022-11-28 02:24:27 -05:00
- [Upgrading to 0.31 ](/docs/appendices/0.31.0-migration-guide.md )
2022-12-29 01:59:54 -05:00
- [Upgrading to 0.30 ](/docs/appendices/0.30.0-migration-guide.md )
2022-08-22 21:49:54 -04:00
- [Upgrading to 0.29 ](/docs/appendices/0.29.0-migration-guide.md )
2022-08-22 21:47:54 -04:00
- [Upgrading to 0.28 ](/docs/appendices/0.28.0-migration-guide.md )
2022-01-28 22:38:24 -05:00
- [Upgrading to 0.27 ](/docs/appendices/0.27.0-migration-guide.md )
2021-10-09 17:44:35 -04:00
- [Upgrading to 0.26 ](/docs/appendices/0.26.0-migration-guide.md )
- [Upgrading to 0.25 ](/docs/appendices/0.25.0-migration-guide.md )
2021-03-01 12:01:26 -05:00
- [Upgrading to 0.24 ](/docs/appendices/0.24.0-migration-guide.md )
2021-01-23 12:32:31 -05:00
- [Upgrading to 0.23 ](/docs/appendices/0.23.0-migration-guide.md )
2020-09-09 20:06:53 -04:00
- [Upgrading to 0.22 ](/docs/appendices/0.22.0-migration-guide.md )
2020-07-14 15:08:33 -04:00
- [Upgrading to 0.21 ](/docs/appendices/0.21.0-migration-guide.md )
2020-07-14 18:59:57 +01:00
- [Upgrading to 0.20 ](/docs/appendices/0.20.0-migration-guide.md )
- [Upgrading to 0.10 ](/docs/appendices/0.10.0-migration-guide.md )
- [Upgrading to 0.9 ](/docs/appendices/0.9.0-migration-guide.md )
- [Upgrading to 0.8 ](/docs/appendices/0.8.0-migration-guide.md )
- [Upgrading to 0.7 ](/docs/appendices/0.7.0-migration-guide.md )
- [Upgrading to 0.6 ](/docs/appendices/0.6.0-migration-guide.md )
- [Upgrading to 0.5 ](/docs/appendices/0.5.0-migration-guide.md )
2016-03-28 21:09:37 -05:00
2020-07-14 18:59:57 +01:00
## Before upgrading
2017-08-09 17:07:06 -04:00
2020-07-14 19:48:10 -04:00
If you'll be updating docker or the herokuish package simultaneously, it's recommended
that you stop all applications before upgrading and rebuild afterwards. This is not
required if the upgrade only impacts the `dokku` package.
Why do we recommend stopping all apps?
- `docker` : Containers may be randomly reset during the upgrade process, resulting in
requests being sent to the wrong containers. Acknowledging and scheduling downtime
thus becomes much more important.
2020-07-28 15:12:51 -04:00
- `herokuish` : While not required, it may be useful to take advantage of the latest
base image. Herokuish changes do not cause issues unless the base OS changes, which
may happen in minor or major releases.
2014-10-04 04:24:22 -04:00
2014-12-19 15:09:38 -05:00
```shell
2020-11-21 17:31:25 -05:00
# for 0.22.0 and newer versions, use
2020-12-17 17:15:15 +01:00
dokku ps:stop --all
2020-11-21 17:31:25 -05:00
# for versions between 0.11.4 and 0.21.4, use
2018-01-19 00:37:26 +08:00
dokku ps:stopall
2020-07-14 18:59:57 +01:00
2018-01-19 00:37:26 +08:00
# for versions between 0.8.1 and 0.11.3, use
2017-08-19 19:03:20 -04:00
dokku --quiet apps:list | xargs -L1 dokku ps:stop
2020-07-14 18:59:57 +01:00
2023-05-27 14:40:05 +01:00
# for versions older than 0.8.1, use
2017-08-19 19:03:20 -04:00
dokku --quiet apps | xargs -L1 dokku ps:stop
2020-07-14 18:59:57 +01:00
```
2017-08-19 19:03:20 -04:00
2020-07-14 18:59:57 +01:00
## After upgrading
After upgrading, you should rebuild the applications to take advantage of any
new buildpacks that were released:
2017-08-19 19:03:20 -04:00
2020-07-14 18:59:57 +01:00
```shell
2020-11-21 17:31:25 -05:00
dokku ps:rebuild --all
2014-10-04 04:24:22 -04:00
```
2020-07-14 18:59:57 +01:00
## Upgrading using `dokku-update`
We provide a helpful binary called `dokku-update` . This is a recommended package that:
- Can be installed separately, so upgrading Dokku will not affect the running of this package.
- Automates many of the upgrade instructions for you.
- Provides a clean way for us to further enhance the upgrade process in the future.
2021-09-13 20:42:41 -04:00
This binary is available on Debian and RPM-based systems from our package repositories under the name `dokku-update` . When installing from source,
this is available from a separate Github repository at [dokku/dokku-update ](https://github.com/dokku/dokku-update ).
2020-07-14 18:59:57 +01:00
## Upgrading using `apt`
2021-01-17 16:09:58 -05:00
If Dokku was installed in a Debian or Ubuntu system, via `apt-get install dokku` or `bootstrap.sh` , you can upgrade with `apt-get` :
2020-07-14 18:59:57 +01:00
```shell
# update your local apt cache
2021-01-09 16:49:18 -05:00
sudo apt-get update -qq
2020-07-14 18:59:57 +01:00
# update dokku and its dependencies
2021-01-09 16:49:18 -05:00
sudo apt-get -qq -y --no-install-recommends install dokku herokuish sshcommand plugn gliderlabs-sigil dokku-update dokku-event-listener
2020-07-14 18:59:57 +01:00
# or just upgrade every package:
2021-01-17 16:09:58 -05:00
sudo apt-get upgrade
2020-07-14 18:59:57 +01:00
```
## Upgrading from source
2014-10-04 04:24:22 -04:00
2016-09-03 04:39:12 -04:00
If you installed Dokku from source (less common), upgrade with:
2014-10-04 04:24:22 -04:00
2015-04-18 02:48:44 -04:00
```shell
cd ~/dokku
git pull --tags origin master
2014-10-04 04:24:22 -04:00
2015-04-18 02:48:44 -04:00
# continue to install from source
sudo DOKKU_BRANCH=master make install
2014-10-04 04:24:22 -04:00
2015-04-18 02:48:44 -04:00
# upgrade to debian package-based installation
sudo make install
```
2014-10-04 04:24:22 -04:00
2019-02-03 16:04:00 +08:00
To upgrade Herokuish from source, upgrade with:
2014-10-04 04:24:22 -04:00
2015-04-18 02:48:44 -04:00
```shell
cd /tmp
2015-04-20 16:32:18 -07:00
git clone https://github.com/gliderlabs/herokuish.git
cd herokuish
2021-11-24 18:40:53 +07:00
CIRCLECI=true IMAGE_NAME=gliderlabs/herokuish BUILD_TAG=latest make build/docker
2015-04-18 02:48:44 -04:00
```