2014-10-04 04:24:22 -04:00
# Upgrading
2017-04-13 23:09:46 -06:00
If your version of Dokku is pre 0.3.0 (check with `dokku version` ), we recommend [a fresh install ](/docs/getting-started/installation.md ) on a new server.
2014-10-04 04:24:22 -04:00
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
2016-08-26 14:11:56 -04:00
### 0.5 Migration Guide
2017-04-13 23:09:46 -06:00
- [0.5 Migration Guide ](/docs/appendices/0.5.0-migration-guide.md )
2016-08-26 14:11:56 -04:00
### 0.6 Migration Guide
2017-04-13 23:09:46 -06:00
- [0.6 Migration Guide ](/docs/appendices/0.6.0-migration-guide.md )
2016-08-26 14:11:56 -04:00
### 0.7 Migration Guide
2017-04-13 23:09:46 -06:00
- [0.7 Migration Guide ](/docs/appendices/0.7.0-migration-guide.md )
2016-03-28 21:09:37 -05:00
2017-08-09 17:07:06 -04:00
### 0.8 Migration Guide
- [0.8 Migration Guide ](/docs/appendices/0.8.0-migration-guide.md )
### 0.9 Migration Guide
- [0.9 Migration Guide ](/docs/appendices/0.9.0-migration-guide.md )
### 0.10 Migration Guide
- [0.10 Migration Guide ](/docs/appendices/0.10.0-migration-guide.md )
2016-04-20 15:32:52 -05:00
## Upgrade Instructions
2016-03-28 21:09:37 -05:00
2016-09-03 04:39:12 -04:00
If Dokku was installed via `apt-get install dokku` or `bootstrap.sh` (most common), upgrade with:
2014-10-04 04:24:22 -04:00
2014-12-19 15:09:38 -05:00
```shell
2017-08-19 19:03:20 -04:00
# update your local apt cache
2016-04-20 15:32:52 -05:00
sudo apt-get update
2017-08-19 19:03:20 -04:00
# stop each running app
2018-01-19 00:37:26 +08:00
# for 0.11.4 and newer versions, use
dokku ps:stopall
# 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
2018-01-19 00:37:26 +08:00
# for versions versions older than 0.8.1, use
2017-08-19 19:03:20 -04:00
dokku --quiet apps | xargs -L1 dokku ps:stop
# update dokku and it's dependencies
2016-11-27 19:55:02 -07:00
sudo apt-get install -qq -y dokku herokuish sshcommand plugn
2017-08-19 19:03:20 -04:00
# rebuild all of your applications
2016-09-06 20:26:53 -04:00
dokku ps:rebuildall # rebuilds all applications
2014-10-04 04:24:22 -04:00
```
2016-09-06 20:26:53 -04:00
> If you have any applications deployed via the `tags` or `tar` commands, do not run the `ps:rebuildall` command,
> and instead trigger `ps:rebuild` manually for each `git`-deployed application:
>
> ```
> dokku ps:rebuild APP
> ```
>
2017-04-13 23:09:46 -06:00
> Please see the [images documentation](/docs/deployment/methods/images.md) and [tar documentation](/docs/deployment/methods/tar.md)
2016-09-06 20:26:53 -04:00
> for instructions on rebuilding applications deployed by those plugins.
2016-04-20 15:32:52 -05:00
### Upgrade 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
2017-05-01 22:28:30 -06:00
dokku --quiet apps | xargs -L1 dokku ps:stop # stops each running app
2015-04-18 02:48:44 -04:00
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
2016-09-06 20:26:53 -04:00
dokku ps:rebuildall # rebuilds all applications
2015-04-18 02:48:44 -04:00
```
2014-10-04 04:24:22 -04:00
2016-04-20 15:32:52 -05: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
2015-04-18 02:48:44 -04:00
git pull origin master
2015-07-09 13:22:12 -07:00
IMAGE_NAME=gliderlabs/herokuish BUILD_TAG=latest VERSION=master make -e build-in-docker
2015-04-18 02:48:44 -04:00
```