+ sudo -u peertube unzip -o peertube-${VERSION}.zip && \
+ sudo -u peertube rm peertube-${VERSION}.zip
+```
+
+Install node dependencies:
+
+```
+$ cd /var/www/peertube/versions/peertube-${VERSION} && \
+ sudo -H -u peertube yarn install --production --pure-lockfile
+```
+
+Copy new configuration defaults values and update your configuration file:
+
+```
+$ sudo -u peertube cp /var/www/peertube/versions/peertube-${VERSION}/config/default.yaml /var/www/peertube/config/default.yaml
+$ diff /var/www/peertube/versions/peertube-${VERSION}/config/production.yaml.example /var/www/peertube/config/production.yaml
+```
+
+Change the link to point to the latest version:
+
+```
+$ cd /var/www/peertube && \
+ sudo unlink ./peertube-latest && \
+ sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest
+```
+
+### nginx
+
+Check changes in nginx configuration:
+
+```
+$ cd /var/www/peertube/versions
+$ diff "$(ls --sort=t | head -2 | tail -1)/support/nginx/peertube" "$(ls --sort=t | head -1)/support/nginx/peertube"
+```
+
+### systemd
+
+Check changes in systemd configuration:
+
+```
+$ cd /var/www/peertube/versions
+$ diff "$(ls --sort=t | head -2 | tail -1)/support/systemd/peertube.service" "$(ls --sort=t | head -1)/support/systemd/peertube.service"
+```
+
+### Restart PeerTube
+
+If you changed your nginx configuration:
+
+```
+$ sudo systemctl reload nginx
+```
+
+If you changed your systemd configuration:
+
+```
+$ sudo systemctl daemon-reload
+```
+
+Restart PeerTube and check the logs:
+
+```
+$ sudo systemctl restart peertube && sudo journalctl -fu peertube
+```
+
+### Things went wrong?
+
+Change `peertube-latest` destination to the previous version and restore your SQL backup:
+
+```
+$ OLD_VERSION="v0.42.42" && SQL_BACKUP_PATH="backup/sql-peertube_prod-2018-01-19T10:18+01:00.bak" && \
+ cd /var/www/peertube && sudo -u peertube unlink ./peertube-latest && \
+ sudo -u peertube ln -s "versions/peertube-$OLD_VERSION" peertube-latest && \
+ sudo -u postgres pg_restore -c -C -d postgres "$SQL_BACKUP_PATH" && \