Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Start copying docs from dev operations

Oliver Günther8f255960e696
diff --git a/help/installation-and-operations/README.md b/help/installation-and-operations/README.md
new file mode 100644
index 00000000000..3a861e113bf
--- /dev/null
+++ b/help/installation-and-operations/README.md
@@ -0,0 +1,27 @@
+# Installation and Operation Guides
+
+This section concerns the installation, upgrading, backup, and other operation guides for the OpenProject Community and Enterprise editions.
+
+
+
+## Installing OpenProject
+
+OpenProject provides three different means of installation on Linux and Unix distributions.
+
+1. [The packaged installation](packaged/installation)
+2. [The docker-based installation](docker/installation)
+3. [The manual installation](docker/installation)
+
+
+
+For production environments and when using a [supported distribution](system-requirements), we recommend using the [packaged installation](packaged/installation). This will install OpenProject as a system dependency using your distribution's package manager, and provide updates in the same fashion that all other system packages do.
+
+
+
+## Upgrading, Backup and Maintenance
+
+For upgrading, backup and migration guides, please select the installation method you have chosen for installing OpenProject on your server:
+
+- [The packaged installation](packaged)
+- [The docker-based installation](docker)
+- [The manual installation](docker)
\ No newline at end of file
diff --git a/help/installation-and-operations/docker/backup.md b/help/installation-and-operations/docker/backup.md
new file mode 100644
index 00000000000..a47bb0518c3
--- /dev/null
+++ b/help/installation-and-operations/docker/backup.md
@@ -0,0 +1,23 @@
+# Backup your OpenProject installation (Docker)
+
+Note: this guide only applies if you've installed OpenProject with our Docker image.
+
+If you've followed the steps described in the installation guide for Docker,
+then you just need to make a backup of the exported volumes, at your
+convenience. As a reminder, here is the recommended way to launch OpenProject
+with Docker:
+
+ sudo mkdir -p /var/lib/openproject/{pgdata,logs,static}
+
+ docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret \
+ -v /var/lib/openproject/pgdata:/var/lib/postgresql/9.6/main \
+ -v /var/lib/openproject/logs:/var/log/supervisor \
+ -v /var/lib/openproject/static:/var/db/openproject \
+ openproject/community:8
+
+If you're using the same local directories than the above command, then you
+just need to backup your local `/var/lib/openproject` folder (for instance to
+S3 or FTP).
+
+If at any point you want to restore from a backup, just put your backup in
+`/var/lib/openproject` on your local host, and re-launch the docker container.
diff --git a/help/installation-and-operations/docker/postgresql-migration.md b/help/installation-and-operations/docker/postgresql-migration.md
new file mode 100644
index 00000000000..b4017f18648
--- /dev/null
+++ b/help/installation-and-operations/docker/postgresql-migration.md
@@ -0,0 +1,114 @@
+# Migrating your Docker OpenProject database to PostgreSQL
+
+This guide will migrate your docker-based MySQL installation to a PostgreSQL installation using [pgloader](https://github.com/dimitri/pgloader).
+
+## Backing up
+
+Before beginning the migration, please ensure you have created a backup of your current installation. Please follow our [backup and restore documentation](https://www.openproject.org/operations/backup/backup-guide-docker-installation/) for Docker-based installations.
+
+
+
+## Built-in migration script
+
+The Dockerfile comes with a built-in PostgreSQL migration script that will auto-run and inform you what to do.
+
+
+
+### Set up a PostgreSQL database
+
+Depending on your usage, you may want to set up an external PostgreSQL database to provide the container with connection details just like you did for MySQL.
+
+In any case, you may also use the internally configured PostgreSQL instance of the docker container by using the DATABASE_URL ` postgres://openproject:[email protected]/openproject`
+
+
+
+**Installing a PostgreSQL database outside docker**
+
+If you want to set up a PostgreSQL installation database outside the container and not use the built-in database, please set up a PostgreSQL database now. These are generic apt-based installation steps, please adapt them appropriately for your distribution.
+
+OpenProject requires at least PostgreSQL 9.5 installed. Please check <https://www.postgresql.org/download/> if your distributed package is too old.
+
+```bash
+[root@host] apt-get install postgresql postgresql-contrib libpq-dev
+```
+
+Once installed, switch to the PostgreSQL system user.
+
+```bash
+[root@host] su - postgres
+```
+
+Then, as the PostgreSQL user, create the system user for OpenProject. This will prompt you for a password. We are going to assume in the following guide that password were 'openproject'. Of course, please choose a strong password and replace the values in the following guide with it!
+
+```bash
+[postgres@host] createuser -W openproject
+```
+
+Next, create the database owned by the new user
+
+```bash
+[postgres@host] createdb -O openproject openproject
+```
+
+Lastly, exit the system user
+
+```bash
+[postgres@host] exit
+# You will be root again now.
+```
+
+
+
+### Setting environment variables
+
+To run the migration part of the image, you will have to provide two environment files:
+
+
+
+### The MYSQL_DATABASE_URL
+
+Note down or copy the current MySQL `DATABASE_URL`
+
+```bash
+# Will look something something of the kind
+# mysql2://user:password@localhost:3306/dbname
+
+# Pass into the container but replace mysql2 with mysql!
+MYSQL_DATABSAE_URL="mysql://user:password@localhost:3306/dbname"
+```
+
+
+
+**Please note:** Ensure that the URL starts with `mysql://` , not with ` mysql2://` !
+
+
+### The PostgreSQL DATABASE_URL
+
+Pass in `DATABASE_URL` pointing to your new PostgreSQL database. This is either the default `postgres://openproject:[email protected]/openproject` or if you set up a PostgreSQL installation above, use credentials for your installation you set up above.
+
+```bash
+POSTGRES_DATABASE_URL="postgresql://<USER>:<PASSWORD>@<HOST>/<Database name>"
+```
+
+
+### Adapting the hostname
+
+**Note:** Depending on your docker installation and networking, you may need to replace the hostname `localhost` in the database URLs
+with `host.docker.internal` to access the docker host. On Mac for example, localhost will refer to the docker client.
+
+
+### Running the migration
+
+To run the migration script within the container, now simply run the following command, replacing the content of the environment variables with your actual values.
+
+
+```bash
+docker run -it \
+ -e MYSQL_DATABASE_URL="mysql://user:password@localhost:3306/dbname" \
+ -e DATABASE_URL="postgresql://openproject:<PASSWORD>@localhost:5432/openproject" \
+ openproject/community:latest
+```
+
+
+
+This will perform all necessary steps to perform the migration. Afterwards, simply remove the `MYSQL_DATABASE_URL`environment variable again and start your container as usual.
diff --git a/help/installation-and-operations/docker/upgrading.md b/help/installation-and-operations/docker/upgrading.md
new file mode 100644
index 00000000000..cf6bde939b6
--- /dev/null
+++ b/help/installation-and-operations/docker/upgrading.md
@@ -0,0 +1,28 @@
+# Upgrade your OpenProject installation (Docker)
+
+Upgrading a Docker container is easy. First, pull the latest version of the image:
+
+ docker pull openproject/community:latest
+
+Then stop and remove your existing container:
+
+ docker stop openproject
+ docker rm openproject
+
+Finally, re-launch the container in the same way you launched it previously.
+This time, it will use the new image:
+
+ docker run -d ... openproject/community:latest
+
+
+# Upgrade Notes
+
+## OpenProject 9.x
+
+### MySQL is being deprecated
+
+OpenProject 9.0 is deprecating MySQL support. You can expect full MySQL support for the course of 9.0 releases, but we
+are likely going to be dropping MySQL completely in one of the following releases.
+
+For more information regarding motivation behind this and migration steps, please see https://www.openproject.org/deprecating-mysql-support/
+In this post, you will find documentation for a mostly-automated migration script to PostgreSQL to help you get up and running with PostgreSQL.
diff --git a/help/installation-and-operations/manual/backup.md b/help/installation-and-operations/manual/backup.md
new file mode 100644
index 00000000000..1bcc9e7ef1f
--- /dev/null
+++ b/help/installation-and-operations/manual/backup.md
@@ -0,0 +1,116 @@
+# Backup Guide
+
+We advice to backup your OpenProject installation regularly — especially before upgrading to a newer version.
+
+## Backup the Database
+
+###OpenProject Version 3.0.15 and newer
+
+Execute the following command in a shell in the directory where OpenProject is installed:
+
+```bash
+RAILS_ENV=production bundle exec rake backup:database:create
+```
+
+The command will create dump of your database which can be found at `OPENPROJECT_DIRECTORY/backup/openproject-production-db-<DATE>.sql` (for MySQL) or `OPENPROJECT_DIRECTORY/backup/openproject-production-db-<DATE>.backup` (for PostgreSQL).
+
+Optionally, you can specify the path of the backup file. Therefore you have to replace the `/path/to/file.backup` with the path of your choice
+
+```bash
+RAILS_ENV=production bundle exec rake backup:database:create[/path/to/backup/file.backup]
+```
+*Note:* You can restore any database backup with the following command. Be aware that you have to replace the `/path/to/backup/file.backup` path with your actual backup path.
+
+```bash
+RAILS_ENV=production bundle exec rake backup:database:restore[/path/to/backup/file.backup]
+```
+
+If your database dump is from an old version of OpenProject, also run the following command after the restore:
+
+```bash
+RAILS_ENV=production bundle exec rake db:migrate
+```
+
+to migrate your data to the database structure of your installed OpenProject version.
+
+### OpenProject prior Version 3.0.15
+
+Determine which Database you are using. You can find the relevant information in the `OPENPROJECT_DIRECTORY/config/database.yml` file. It looks similar to this:
+
+```yaml
+production:
+ adapter: postgresql
+ database: openproject-production
+ host: localhost
+ username: my_postgres_user
+ password: my_secret_password
+ encoding: utf8
+ min_messages: warning
+```
+
+Locate the database entry for your production database. If your adapter is postgresql, then you have a PostgreSQL database. If it is mysql2, you use a MySQL database. Now follow the steps for your database adapter.
+
+#### PostgreSQL
+You can backup your PostgreSQL database with the `pg_dump` command and restore backups with the `pg_restore` command. (There might be other (and more convenient) tools, like pgAdmin, depending on your specific setup.)
+
+An example backup command with `pg_dump` looks like this:
+
+```bash
+pg_dump --clean --format=custom --no-owner --file=/path/to/your/backup/file.backup --username=POSTGRESQL_USER --host=HOST DATABASE_NAME
+```
+
+Please, replace the path to your backup file, the username, host, and database name with your actual data. You can find all relevant information in the database.yml file.
+
+Consult the man page of `pg_dump` for more advanced parameters, if necessary.
+
+The database dump can be restored similarly with `pg_restore`:
+
+```bash
+pg_restore --clean --no-owner --single-transaction
+--dbname=DATABASE_NAME --host=HOST --username=POSTGRESQL_USER
+/path/to/your/backup/file.backup
+```
+
+Consult the man page of `pg_restore` for more advanced parameters, if necessary.
+
+#### MySQL
+You can backup your MySQL database for example with the mysqldump command and restore backups with the mysql command line client. (There might be other (and more convenient) tools, like phpMyAdmin, adminer, or other tools, depending on your specific setup.)
+
+An example backup command with `mysqldump` looks like this:
+
+```bash
+mysqldump --single-transaction --add-drop-table --add-locks --result-file=/path/to/your/backup/file.sql --host=HOST --user=MYSQL_USER --password DATABASE_NAME
+```
+
+Please, replace the path to your backup file, the MySQL username, host and database name with your actual data. You can find all relevant information in the `database.yml` file.
+
+Consult the man page of `mysqldump` for more advanced parameters, if necessary.
+
+The database dump can be restored similarly with `mysql` (on a \*nix compatible shell):
+
+```bash
+mysql --host=HOST --user=MYSQL_USER --password DATABASE_NAME < /path/to/your/backup/file.sql
+```
+Consult the man page of mysql for more advanced parameters, if necessary.
+
+## Backup your Configuration Files
+Please make sure to create a backup copy of at least the following configuration files (all listed as a relative path from the OpenProject installation directory):
+
+`Gemfile.local` (if present)
+`Gemfile.plugins` (if present)
+`config/database.yml` (if present)
+`config/configuration.yml` (if present)
+`config/settings.yml` (if present)
+
+Some OpenProject options can be given as environment variables. If you have configured environment variables for OpenProject, consider to backup them too.
+
+## Backup Files Uploaded by Users (attachments)
+Files uploaded by users (e.g. when adding an attachment to a WorkPackage) are stored on the hard disk. The directory where those files are stored can be configured in the `config/configuration.yml` via the `attachments_storage_path` setting (or an
+appropriate environment variable).
+
+If you have not changed the `attachment_storage_path` setting, all files will be uploaded to the files directory (relative to your OpenProject installation).
+
+Make sure to backup this directory.
+
+## Backup Repositories
+You can manage Repositories with OpenProject — so one or more of your projects may have a repository. Please make sure to backup these too. The path to a project’s repository can be found in the repository settings of the respective project (it can be individually defined for every project). Each of the defined locations has to be backed up.
diff --git a/help/installation-and-operations/manual/postgresql-migration.md b/help/installation-and-operations/manual/postgresql-migration.md
new file mode 100644
index 00000000000..f83ea013ed0
--- /dev/null
+++ b/help/installation-and-operations/manual/postgresql-migration.md
@@ -0,0 +1,188 @@
+# Migrating your manual-installation OpenProject database to PostgreSQL
+
+This guide will migrate your MySQL installation on a manual installation to a PostgreSQL installation using [pgloader](https://github.com/dimitri/pgloader).
+
+## Backing up
+
+Before beginning the migration, please ensure you have created a backup of your current installation. Please follow our [backup and restore documentation](https://www.openproject.org/operations/backup/backup-guide-manual-installation/) for Docker-based installations.
+
+
+
+## Set up a PostgreSQL database
+
+Please first set up a PostgreSQL database. These are generic apt-based installation steps, please adapt them appropriately for your distribution.
+
+OpenProject requires at least PostgreSQL 9.5 installed. Please check <https://www.postgresql.org/download/> if your distributed package is too old.
+
+```bash
+[root@host] apt-get install postgresql postgresql-contrib libpq-dev
+```
+
+Once installed, switch to the PostgreSQL system user.
+
+```bash
+[root@host] su - postgres
+```
+
+Then, as the PostgreSQL user, create the system user for OpenProject. This will prompt you for a password. We are going to assume in the following guide that password were 'openproject'. Of course, please choose a strong password and replace the values in the following guide with it!
+
+```bash
+[postgres@host] createuser -W openproject
+```
+
+Next, create the database owned by the new user
+
+```bash
+[postgres@host] createdb -O openproject openproject
+```
+
+Lastly, exit the system user
+
+```bash
+[postgres@host] exit
+# You will be root again now.
+```
+
+
+
+## The MYSQL_DATABASE_URL
+
+Note down or copy the current MySQL `DATABASE_URL`. The following command exports it to the curent shell as `MYSQL_DATABASE_URL`:
+
+```bash
+# Will look something something of the kind
+# mysql2://user:password@localhost:3306/dbname
+
+# Pass into the container but replace mysql2 with mysql!
+export MYSQL_DATABASE_URL="mysql://user:password@localhost:3306/dbname"
+```
+
+
+
+**Please note:** Ensure that the URL starts with `mysql://` , not with ` mysql2://` !
+
+
+
+## The PostgreSQL DATABASE_URL
+
+Pass in `DATABASE_URL` pointing to your new PostgreSQL database. Fill the template below with the password you entered above.
+
+```bash
+export POSTGRES_DATABASE_URL="postgresql://openproject:<PASSWORD>@localhost/openproject"
+```
+
+## Running the migration via Docker
+
+OpenProject provides a simple conversion script that you can run as a single command via Docker.
+
+To run the migration script within the container, simply run the following command, replacing the content of the environment variables with your actual values.
+
+
+### Adapting the hostname
+
+**Note:** Depending on your docker installation and networking, you may need to replace the hostname `localhost` in the database URLs
+with `host.docker.internal` to access the docker host. On Mac for example, localhost will refer to the docker client.
+
+
+```bash
+docker run -it \
+ -e MYSQL_DATABASE_URL=$MYSQL_DATABASE_URL \
+ -e DATABASE_URL=$POSTGRES_DATABASE_URL \
+ openproject/community:latest
+```
+
+
+This will perform all necessary steps to perform the migration. Afterwards, simply remove the `MYSQL_DATABASE_URL`environment variable again and start your container as usual.
+
+
+
+## Running the migration without Docker
+
+### Installation of pgloader
+
+
+
+#### Apt Systems
+
+For systems with APT package managers (Debian, Ubuntu), you should already have `pgloader` available and can install as root with with:
+
+```
+[root@host] apt-get install pgloader
+```
+
+
+
+[For other installations, please see the project page itself for steps on installing with Docker or from source](https://github.com/dimitri/pgloader#install).
+
+
+
+After installation, check that pgloader is in your path and accessible:
+
+
+
+```
+[root@host] pgloader --version
+
+# Should output something of the kind
+pgloader version "3.5.2"
+compiled with SBCL 1.4.5.debian
+```
+
+
+
+### Performing the migration
+
+You are now ready to use `pgloader`. You simply point it the old and new database URL while specifying the option
+`--with "preserve index names"` which ensures that index names are kept identical.
+
+```bash
+pgloader --verbose --with "preserve index names" $MYSQL_DATABASE_URL $POSTGRES_DATABASE_URL
+```
+
+This might take a while depending on current installation size.
+
+### Index attachments for fulltext search
+
+One of the benefits of using PostgreSQL over MySql is the support for fulltext search on attachments. The fulltext search feature relies on the existence of two additional columns for attachments that need to be added now ff the migration to PostgreSql is done for an OpenProject >= **8.0**. If the OpenProject version is below **8.0** the next two commands can be skipped.
+
+In order to add the necessary columns to the database, run
+
+```bash
+openproject run rails db:migrate:redo VERSION=20180122135443
+```
+
+After the columns have been added, the index has to be created for already uploaded attachments
+
+```bash
+openproject run rails attachments:extract_fulltext_where_missing
+```
+
+If a large set of attachments already exists, executing the command might take a while.
+
+
+
+### Indexes on relations table
+
+You will also need to rebuild the index on the relations table. Simply run the following command
+to re-run the migration.
+
+```bash
+openproject run rails db:migrate:redo VERSION=20180105130053
+```
+
+
+
+## Optional: Uninstall MySQL
+
+If you installed MySQL only for the installation of OpenProject, evaluate whether you want to remove MySQL server.
+
+You can check the output of `dpkg - l | grep mysql` to check for packages removable. Only keep `libmysqlclient-dev` for Ruby dependencies on the mysql adapter.
+
+
+
+The following is an exemplary removal of an installed version MySQL 5.7.
+
+```
+[root@host] apt-get remove mysql-server
+```
+
diff --git a/help/installation-and-operations/manual/upgrading.md b/help/installation-and-operations/manual/upgrading.md
new file mode 100644
index 00000000000..834ca6c7617
--- /dev/null
+++ b/help/installation-and-operations/manual/upgrading.md
@@ -0,0 +1,334 @@
+# OpenProject 8.x to OpenProject 9.x Debian/Ubuntu Upgrade Guide (Manual installation)
+
+OpenProject 9.x is being released at https://github.com/opf/openproject under the branch `stable/9`.
+Follow the following steps to perform the upgrade:
+
+First, perform a backup for your current environment
+
+```bash
+[openproject@debian]# cd /home/openproject/openproject
+[openproject@debian]# RAILS_ENV="production" bundle exec rake backup:database:create
+# Backup will be created under backup/
+```
+
+Depending on from what version you're upgrading, you may need to add the correct remote
+Then, check out the stable version of OpenProject 9.x.
+
+```bash
+[openproject@debian]# cd /home/openproject/openproject
+[openproject@debian]# git remote -v | grep openproject-ce
+```
+
+If this returns anything, update the remote to the correct URL.
+
+```bash
+[openproject@debian]# git remote set-url origin https://github.com/opf/openproject.git
+```
+
+Then, refresh that origin and checkout the stable/9 branch.
+
+```bash
+[openproject@debian]# git fetch && git checkout stable/9
+```
+
+After upgrading the installation files, you need to migrate the installation to OpenProject 9.0 with the following steps:
+
+```bash
+[openproject@debian]# cd /home/openproject/openproject
+[openproject@debian]# rm -rf frontend/node_modules && npm install
+[openproject@debian]# RAILS_ENV="production" bundle exec rake db:migrate
+[openproject@debian]# RAILS_ENV="production" bundle exec rake db:seed
+[openproject@debian]# RAILS_ENV="production" bundle exec rake assets:precompile
+[openproject@debian]# touch tmp/restart.txt
+```
+
+After performing these steps, the server should be running OpenProject 9.0.x.
+
+
+## Upgrade notes
+
+These following points are some known issues around the update to 9.0.
+It does not contain the entire list of changes.
+
+To see all changes, [please browse the release notes](https://www.openproject.org/release-notes/openproject-9-0-0/).
+
+### MySQL is being deprecated
+
+OpenProject 9.0. is deprecating MySQL support. You can expect full MySQL support for the course of 9.0 releases, but we
+are likely going to be dropping MySQL completely in one of the following releases.
+
+For more information regarding motivation behind this and migration steps, please see https://www.openproject.org/deprecating-mysql-support/
+In this post, you will find documentation for a mostly-automated migration script to PostgreSQL to help you get up and running with PostgreSQL.
+
+# OpenProject 7.x to OpenProject 8.x Debian/Ubuntu Upgrade Guide (Manual installation)
+
+OpenProject 8.x is being released at https://github.com/opf/openproject-ce using the branch `stable/8`.
+Follow the following steps to perform the upgrade:
+
+These following points are some known issues around the update to 8.0. It does not contain the entire list of changes. To see all changes, [please browse the release notes](https://www.openproject.org/release-notes/openproject-8-0/).
+
+### Migration from Textile to Markdown
+
+OpenProject 8.0. has removed Textile, all previous content is migrated to GFM Markdown using [pandoc](https://pandoc.org). This will happen automatically during the migration run. A recent pandoc version will be downloaded by OpenProject.
+
+For more information, please visit this separate guide: https://github.com/opf/openproject/tree/dev/docs/user/textile-to-markdown-migration
+
+### Frontend changes, Angular is now in production
+
+OpenProject 8.0. uses Angular for the majority of the frontend application. The `npm install` step should automatically take care of the installation, however in some cases there were leftover `node_modules` entries that resulted in an incomplete frontend application. To ensure the correct versions are installed, we thus recommend you remove `frontend/node_modules` entirely before running `npm install` again.
+
+### SQL mode changes for MySQL 8.0.
+
+MySQL 8.0. removes the deprecated SQL mode `no_auto_create_user` that we enforced up until 7.4. You will need to remove this mode from your `config/database.yml` should you have used it. For more information, see https://community.openproject.com/wp/28524
+
+# OpenProject 6.x to OpenProject 7.x Debian/Ubuntu Upgrade Guide (Manual installation)
+
+Please look at the steps in the section about the upgrade to OpenProject 6.0. OpenProject 7.x is being released under the branch `stable/7`. The other steps are identical.
+
+### Frontend changes, bower is no longer required
+
+With OpenProject 7.0., we no longer depend on `bower` for some on the frontend assets. Please ensure you remove `<OpenProject root>/frontend/bower_components` and `<OpenProject root>/frontend/bower.json`.
+
+### When running with MySQL: Required changes in sql_mode
+
+If you're upgrading to OpenProject 7.x with a MySQL installation, you will need to update your database.yml to reflect some necessary changes to MySQL `sql_mode` made as part of the migration to Rails 5. Please see the `config/database.yml.example` file for more information.
+
+# OpenProject 5.0.x to OpenProject 6.0 Debian/Ubuntu Upgrade Guide
+
+Upgrading your OpenProject 5.0.x installation to 6.0 is very easy. Please upgrade your OpenProject installation first to the latest stable 6.0 path.
+If you checked out the OpenProject installation through Git, you can use the `stable/6` branch which points to the latest stable release.
+
+```bash
+[openproject@debian]# cd /home/openproject/openproject
+[openproject@debian]# git fetch && git checkout stable/6
+```
+
+After upgrading the installation files, you need to migrate the installation to OpenProject 6.0 with the following steps:
+
+```bash
+[openproject@debian]# cd /home/openproject/openproject
+[openproject@debian]# npm install
+[openproject@debian]# RAILS_ENV="production" bundle exec rake db:migrate
+[openproject@debian]# RAILS_ENV="production" bundle exec rake db:seed
+[openproject@debian]# RAILS_ENV="production" bundle exec rake assets:precompile
+[openproject@debian]# touch tmp/restart.txt
+```
+
+After performing these steps, the server should be running OpenProject 6.0.x.
+
+
+# OpenProject 4.2 to OpenProject 5.0 Debian/Ubuntu Upgrade Guide
+
+One of the main new features of OpenProject 5.0 is that it provides management of repositories directly within the user interface (with so-called *managed* repositories).
+
+Starting with OpenProject 5.0, you can explicitly select the SCM vendor you want to associate to your project, and let OpenProject generate the repository on the filesystem on the fly.
+
+If you haven't configured serving repositories through Apache before, you'll find the [repository integration guide](./repository-integration.md) to guide you through the necessary steps to configure this integration.
+
+For the other steps necessary to upgrade to OpenProject 5.0 please look
+at the sections below and exchange `v4.1.0` with `v5.0.0`.
+
+## Changed Rails Path
+
+OpenProject 5.0 employs Rails 4.2.x, which contains a number of changes regarding paths. Foremost, files previously located in the `scripts` directory now reside in `bin` (e.g., `delayed_job`).
+
+### Secret Token
+
+With an update to Rails 4.1+, you now must generate a secret key base for the production environment with `./bin/rake secret` and make that available through the environment variable `SECRET_KEY_BASE`.
+
+You will likely set the environment variable in `/etc/environment` or use your server's environment mechanism (i.e., `SetEnv` in Apache).
+
+## Upgrading to Managed Repositories
+
+You can create repositories explicitly on the filesystem using managed repositories.
+Enable managed repositories for each SCM vendor individually using the templates
+defined in configuration.yml. For more information, please refer to the [repository integration guide](./repository-integration.md).
+
+This functionality was previously provided as a cron job `reposman.rb`.
+This script has been integrated into OpenProject.
+Please remove any existing cronjobs that still use this script.
+
+### Convert Repositories Created by Reposman
+
+If you want to convert existing repositories previously created (by reposman.rb or manually)
+into managed repositories, use the following command:
+
+ $ ./bin/rake scm:migrate:managed[URL prefix (, URL prefix, ...)]
+
+the URL prefix denotes a common prefix of repositories whose status should be upgraded to `:managed`.
+Example:
+
+If you have executed reposman.rb with the following parameters:
+
+ $ reposman.rb [...] --svn-dir "/opt/svn" --url "file:///opt/svn"
+
+Then you can pass the task a URL prefix `file:///opt/svn` and the rake task will migrate all repositories
+matching this prefix to `:managed`.
+You may pass more than one URL prefix to the task.
+
+### Listing Potential Conflicting Identifiers
+
+As managed repositories on the filesystem are uniquely associated using the project identifier, any existing directories in the managed repositories root *may* cause a conflict in the future when trying to create a repository with the same name.
+
+To help you identify these conflicts, you can run the following rake task, which will list entries in the managed repositories path with no associated project:
+
+ $ ./bin/rake scm:find_unassociated
+
+# OpenProject 4.1 to OpenProject 4.2 Debian/Ubuntu Upgrade Guide
+
+Please look at the steps in the section about the upgrade to OpenProject 4.1. Just exchange `v4.1.0` to `v4.2.0` when checking out the git repository.
+
+# OpenProject 4.0 to OpenProject 4.1 Debian/Ubuntu Upgrade Guide
+
+This guide describes the upgrade process from OpenProject 4.0 to 4.1 on Debian 7.7 and Ubuntu 14.04 LTS step by step.
+
+Note: We strongly recommend to update your OpenProject installation to the latest available 4.0 version (currently 4.0.9), before attempting an update to 4.1.
+
+
+## Preparation
+
+* Backup your current Openproject installation. Typically you should backup the attachment
+ folder of your installation, the subversion repositories (if applicable) and your database.
+ For more information please have a look at our [backup guide](backup-guide.md)
+
+* Before Upgrading, check that all the installed OpenProject plugins support the new
+ OpenProject version. Remove incompatible plugins before attempting an upgrade. Stop
+ the OpenProject Server. You may even add a maintenance page, if you feel comfortable
+ with that.
+
+* If you run the worker process with a cronjob, disable the cronjob temporarily.
+* Stop the (delayed\_job) worker process. In case you run the worker process through
+ `RAILS_ENV=production bundle exec script/delayed_job start`, execute the following:
+ `RAILS_ENV=production bundle exec script/delayed_job stop`.
+
+## Update your system
+
+```bash
+[root@debian]# apt-get update
+[root@debian]# apt-get upgrade
+```
+
+## Get the new OpenProject Source Code
+Change into the directory where OpenProject is installed and switch to the operating-system-user the OpenProject operates as. We assume that OpenProject is installed in `/home/openproject/openproject` by the `openproject` user.
+
+```bash
+[root@debian]# su - openproject -c "bash -l"
+[openproject@debian]# cd ~/openproject/openproject
+```
+
+Remove manual changes and modifications (If you have modified OpenProject source files and want to preserve those changes, back up your changes, and re-apply them later):
+
+```bash
+[openproject@debian]# git reset --hard
+[openproject@debian]# git fetch
+[openproject@debian]# git checkout v4.1.0
+```
+
+## Upgrade Ruby
+OpenProject 4.1 requires Ruby to be installed in version 2.1.x. Assuming you have installed Ruby via RVM, do the following to upgrade your Ruby installation:
+
+```bash
+[openproject@debian]# rvm get stable
+[openproject@debian]# export -f rvm_debug
+[openproject@debian]# rvm install 2.1.5
+[openproject@debian]# rvm use --default 2.1.5
+[openproject@debian]# gem install bundler
+[openproject@debian]# bundle install
+```
+
+### Update application server configuration
+This sections only applies to you, if you serve OpenProject via Apache and Passenger. If you serve OpenProject in a different way, be sure to check that it still works.
+
+During the upgrade of the Ruby version, we have potentially installed a new Ruby and Passenger version. The versions of Ruby and Passenger appear in the Apache configuration like this:
+
+```apache
+LoadModule passenger_module /home/openproject/.rvm/gems/ruby-2.1.4/gems/passenger-4.0.53/buildout/apache2/mod_passenger.so
+<IfModule mod_passenger.c>
+ PassengerRoot /home/openproject/.rvm/gems/ruby-2.1.4/gems/passenger-4.0.53
+ PassengerDefaultRuby /home/openproject/.rvm/gems/ruby-2.1.4/wrappers/ruby
+</IfModule>
+```
+Please run the following commands to upgrade passenger and re-install the Apache module:
+
+```bash
+[openproject@debian]# gem update passenger
+[openproject@debian]# gem cleanup passenger
+[openproject@debian]# passenger-install-apache2-module
+```
+
+The output of passenger-install-apache2-module2 tells you how to configure Apache. It is basically the same as what is already installed, except for the updated version numbers.
+
+Don’t forget to restart apache after the configuration change:
+
+```bash
+[root@debian]# service apache2 reload
+```
+
+## Node.js installation
+Node.js is necessary to precompile the assets (JavaScript and CSS). We will install the latest 0.12.x version of Node.js via nodeenv:
+
+```bash
+[openproject@debian]# exit
+[root@debian]# apt-get install python python-pip
+[root@debian]# pip install nodeenv
+[root@debian]# su - openproject -c "bash -l"
+[openproject@debian]# cd /home/openproject
+[openproject@debian]# nodeenv nodeenv
+[openproject@debian]# source ./nodeenv/bin/activate
+```
+
+As a reference, the following Node.js and NPM versions have been installed on our system:
+
+```bash
+[openproject@debian]# node --version
+ v0.12.2
+[openproject@debian]# npm --version
+ 1.4.28
+```
+
+## The Upgrade
+
+Now that the sources and dependencies are in place, you can migrate the Database and do the upgrade.
+
+Before actually migrating the database, please remove all temporary files from the previous installation (caches, sessions) by running the following command.
+
+```bash
+[openproject@debian]# cd /home/openproject/openproject
+[openproject@debian]# RAILS_ENV="production" bundle exec rake tmp:clear
+```
+
+If you do not clear the temporary files, you may encounter an error of the form `NoMethodError: undefined method `map' for #<String ..>` in the `config/initializers/30-patches.rb` files.
+The actual upgrade commands are as follows:
+
+```bash
+[openproject@debian]# cd /home/openproject/openproject
+[openproject@debian]# npm install
+[openproject@debian]# RAILS_ENV="production" bundle exec rake db:migrate
+[openproject@debian]# RAILS_ENV="production" bundle exec rake db:seed
+[openproject@debian]# RAILS_ENV="production" bundle exec rake assets:precompile
+[openproject@debian]# touch tmp/restart.txt
+```
+
+To make sure that all work package attachments are indexed, so that their content can be used in work package filters
+run:
+
+```bash
+[openproject@debian]# RAILS_ENV="production" rake attachments:extract_fulltext_where_missing
+```
+
+
+
+*Side note:* If you are using `RAILS_ENV="development"` the task `bundle exec rake assets:webpack` needs to be run. This step is not necessary for `production` because it is part of the `asset:precompile` tasks.
+
+**NOTE** `db:seed` can also be invoked with a 'LOCALE' environment variable defined, specifying the language in which to seed. Note however, that specifying different locales for calls to `db:seed` might lead to a mixture of languages in your data. It is therefore advisable to use the same language for all calls to `db:seed`.
+
+## The Aftermath
+* Re-enable the `delayed_job` cron job that was disabled in the first step.
+* If you have put up a maintenance page, remove it.
+* Start the OpenProject server again
+* Watch for further OpenProject updates in our news, or on twitter.
+
+## Questions, Comments, and Feedback
+If you have any further questions, comments, feedback, or an idea to enhance this guide, please tell us at the appropriate forum.
+
+Also, please take a look at the Frequently [Asked Questions](https://www.openproject.org/help/faq/).
diff --git a/help/installation-and-operations/packaged/backup.md b/help/installation-and-operations/packaged/backup.md
new file mode 100644
index 00000000000..b1e0261b3af
--- /dev/null
+++ b/help/installation-and-operations/packaged/backup.md
@@ -0,0 +1,99 @@
+# Backup your OpenProject installation
+
+**Note:** this guide only applies if you've installed OpenProject using our DEB/RPM packages.
+
+We advise to backup your OpenProject installation regularly — especially before upgrading to a newer version.
+
+## What should be backed up
+
+In general the following parts of your OpenProject installation should be backed up:
+
+- Data stored in the database
+- Configuration files
+- Uploaded files (attachments)
+- Repositories (typically subversion) if applicable
+
+## How to backup
+
+The DEB/RPM packages provide a backup tool which can be used to take a snaphsot
+of the current OpenProject installation. This tool will create a backup of
+all parts mentioned above. The backup tool is used by executing the following
+command:
+
+```
+sudo openproject run backup
+```
+
+The command will create backup files in the following location on your system
+
+```
+/var/db/openproject/backup
+```
+
+The content of that directory should look very similar to the following (depending on your used database, you will see either a `mysql-dump-<date>.sql.gz` or a `postgresql-dump-<pgdump>` file).
+
+```bash
+root@test-packager-backup:/opt/openproject# ls -l /var/db/openproject/backup/
+total 24
+-rw-r----- 1 openproject openproject 117 Apr 8 09:55 attachments-20150408095521.tar.gz
+-rw-r----- 1 openproject openproject 667 Apr 8 09:55 conf-20150408095521.tar.gz
+-rw-r----- 1 openproject openproject 8298 Apr 8 09:55 mysql-dump-20150408095521.sql.gz
+-rw-r----- 1 openproject openproject 116 Apr 8 09:55 svn-repositories-20150408095521.tar.gz
+```
+
+
+
+## How to restore
+
+The backup created with the tool consists of four parts
+which are all compressed using `gzip`. Except the database dump these parts
+can be restored by decompressing the `*.tar.gz` files and copy the content to the
+proper location. The command to untar and unzip the `*.tar.gz` files looks like
+this (using sample file names from above):
+
+```bash
+tar vxfz attachments-20150408095521.tar.gz
+```
+
+
+
+### Database
+
+The `<dbuser>`, `<dbhost>` and `<dbname>` variables have to be replaced with
+the values that are container in the `DATABASE_URL` setting of your
+installation. This setting can be seen by running:
+
+```
+openproject config:get DATABASE_URL
+#=> e.g.: mysql2://dbusername:dbpassword@dbhost:dbport/dbname
+```
+
+
+
+#### PostgreSQL
+
+To restore the PostgreSQL dump please use the `pg_restore` command utilities.
+
+
+
+```bash
+pg_restore -h <dbhost> -u <dbuser> -W <dbname>
+```
+
+
+
+First the dump has to be extracted (unzipped) and then restored. The command
+used should look very similar to this:
+
+#### MySQL
+
+
+
+To restore the MySQL dump it is recommended to use the `mysql` command line client.
+
+First the dump has to be extracted (unzipped) and then restored. The command
+used should look very similar to this:
+
+```bash
+zcat mysql-dump-20150408095521.sql.gz | mysql -u <dbuser> -h <dbhost> -p <dbname>
+```
diff --git a/help/installation-and-operations/packaged/migration.md b/help/installation-and-operations/packaged/migration.md
new file mode 100644
index 00000000000..19d198a64d9
--- /dev/null
+++ b/help/installation-and-operations/packaged/migration.md
@@ -0,0 +1,123 @@
+# Migrating your packaged OpenProject installation to another environment
+
+**Note:** this guide only applies if you've installed OpenProject using our DEB/RPM packages.
+
+Migrating your OpenProject packaged installation to another host or environment is trivial and may be combined with, e.g., minor or major package upgrades due to our migration system.
+
+## Backing up
+
+To create a dump of all your data in the old installation, please follow our [backup and restore documentation](https://www.openproject.org/operations/backup/backup-guide-packaged-installation/) for our packaged installation.
+
+This guide should leave you with a set of archives that you should manually move to your new environment:
+
+- **Database**: mysql-dump-\<timestamp>.sql.gz or postgresql-dump\<timestamp>.pgdump
+- **Attachments**: attachments-\<timestamp>.tar.gz
+- **Custom env configuration**: conf-\<timestamp>.tar.gz
+- **Repositories**: svn- and git-\<timestamp>.tar.gz
+
+
+
+## Migration
+
+The following steps outline the migration process to the OpenProject package (possibly, a newer version).
+
+## Install new package
+
+Follow the first step (**Installation**) of our packaged installation guides at https://www.openproject.org/download-and-installation/.
+
+After this step, you should have an installed version of `openproject`.
+
+### Moving Configuration
+
+On your old host, the configuration of the package resides in `/etc/openproject`.
+
+This folder is split into two relevant files:
+
+**The installer.dat file**
+The `/etc/openproject/installer.dat` is the result of your input in the installation wizard (`openproject configure`). It contains all configuration options that the wizard generates, such as database URL, storage paths, hostname et cetera.
+
+If most of your environment is the same (e..g, new server under the same domain), you will want to copy the entire configuration folder `/etc/openproject`. This will cause `openproject configure` to take all values from your previous installation.
+
+You can simply look through the installer.dat and change those values you need.
+
+**The conf.d folder**
+
+Additional environment, either generated from the wizard or entered by you through `openproject config:set` is written to `/etc/openproject/conf.d/{server,database,other}`. Also look through those and check which contain relevant values for your new installation.
+
+### Database
+
+On your new host or cluster, ensure you have created a database user and database, ideally using the same names as the old environment (You may want to choose a different random password, however).
+
+In the following, the values `<dbuser>`, `<dbhost>` and `<dbname>` variables have to be replaced with your database user and database above.
+To read the values from the old installation, you can execute the following command:
+
+```bash
+openproject config:get DATABASE_URL
+#=> e.g.: mysql2://dbusername:dbpassword@dbhost:dbport/dbname
+```
+
+First the dump has to be extracted (unzipped) and then restored. The command used should look very similar to this:
+
+**PostgreSQL**
+
+```
+# Restore the PostgreSQL dump
+pg_restore -h <dbhost> -u <dbuser> -W <dbname> postgresql-dump-20180408095521.pgdump
+```
+
+
+
+**MySQL**
+
+```bash
+# Extract the mysql dump
+zcat mysql-dump-20180408095521.sql.gz | mysql -u <dbuser> -h <dbhost> -p
+<dbname>
+```
+
+
+
+### Attachments
+
+Your storage path can be shown on the old installation can be shown using the following command:
+
+```
+openproject config:get ATTACHMENTS_STORAGE_PATH
+#=> e.g., /var/db/openproject/files
+```
+
+Simply extract your attachments dump into that folder with `tar -vxfz <dump>.tar.gz`, creating it beforehand if needed.
+
+
+
+### Repositories
+
+For repositories, the same approach applies as for the attachments:
+
+Your SVN and Git storage paths can be shown on the old installation can be shown using the following command:
+
+```
+# Subversion
+openproject config:get SVN_REPOSITORIES
+#=> e.g., /var/db/openproject/svn
+
+# Git
+openproject config:get GIT_REPOSITORIES
+#=> e.g., /var/db/openproject/git
+```
+
+Simply extract your respective repository dumps into ech folder, creating it beforehand if needed. The dumps will only be created if you use that feature in your old installation.
+
+
+
+## Running openproject configure
+
+After you restored all data and updated your installer.dat, all you need to do is run through the configuration process of the packaged installation:
+
+```bash
+openproject configure
+```
+
+It will take all values from your previous installation. *It may ask you additional wizard questions* for new features that did not exist on the old installations, or the ones you removed/left empty in the `installer.dat` file.
+
+This step will also perform database migrations, install and configure all necessary dependencies and start the server.
diff --git a/help/installation-and-operations/packaged/postgresql-migration.md b/help/installation-and-operations/packaged/postgresql-migration.md
new file mode 100644
index 00000000000..98498350869
--- /dev/null
+++ b/help/installation-and-operations/packaged/postgresql-migration.md
@@ -0,0 +1,175 @@
+# Migrating your packaged OpenProject database to PostgreSQL
+
+**Note:** this guide only applies if you've installed OpenProject using our DEB/RPM packages.
+
+This guide will migrate your packaged MySQL installation to a PostgreSQL installation using [pgloader](https://github.com/dimitri/pgloader).
+
+## Backing up
+
+Before beginning the migration, please ensure you have created a backup of your current installation. Please follow our [backup and restore documentation](https://www.openproject.org/operations/backup/backup-guide-packaged-installation/) for our packaged installation.
+
+This guide should leave you with a set of archives that you can use to restore, should the migration end up in an unstable state:
+
+- **Database**: mysql-dump-&lt;timestamp&gt;.sql.gz
+- **Attachments**: attachments-&lt;timestamp&gt;.tar.gz
+- **Custom env configuration**: conf-&lt;timestamp&gt;.tar.gz
+- **Repositories**: svn- and git-&lt;timestamp&gt;.tar.gz
+
+
+## Installation of pgloader
+
+We ship a custom version of pgloader (named `pgloader-ccl`), which embeds some memory optimizations useful when you are migrating from a large MySQL database. This also allows us to provide a unified migration experience for all installation types. This package is available for all the currently supported distributions at https://packager.io/gh/opf/pgloader-ccl.
+
+### Ubuntu 18.04
+
+```
+wget -qO- https://dl.packager.io/srv/opf/pgloader-ccl/key | sudo apt-key add -
+sudo wget -O /etc/apt/sources.list.d/pgloader-ccl.list \
+ https://dl.packager.io/srv/opf/pgloader-ccl/master/installer/ubuntu/18.04.repo
+sudo apt-get update
+sudo apt-get install pgloader-ccl
+```
+
+### Ubuntu 16.04
+
+```
+wget -qO- https://dl.packager.io/srv/opf/pgloader-ccl/key | sudo apt-key add -
+sudo wget -O /etc/apt/sources.list.d/pgloader-ccl.list \
+ https://dl.packager.io/srv/opf/pgloader-ccl/master/installer/ubuntu/16.04.repo
+sudo apt-get update
+sudo apt-get install pgloader-ccl
+```
+
+### Debian 9
+
+```
+wget -qO- https://dl.packager.io/srv/opf/pgloader-ccl/key | sudo apt-key add -
+sudo wget -O /etc/apt/sources.list.d/pgloader-ccl.list \
+ https://dl.packager.io/srv/opf/pgloader-ccl/master/installer/debian/9.repo
+sudo apt-get update
+sudo apt-get install pgloader-ccl
+```
+
+### CentOS / RHEL 7
+
+```
+sudo wget -O /etc/yum.repos.d/pgloader-ccl.repo \
+ https://dl.packager.io/srv/opf/pgloader-ccl/master/installer/el/7.repo
+sudo yum install pgloader-ccl
+```
+
+### SuSE Enterprise Linux 12
+
+```
+sudo wget -O /etc/zypp/repos.d/pgloader-ccl.repo \
+ https://dl.packager.io/srv/opf/pgloader-ccl/master/installer/sles/12.repo
+sudo zypper install pgloader-ccl
+```
+
+## Optional: Install and create PostgreSQL database
+
+If you have not yet installed and set up a PostgreSQL installation database, please set up a PostgreSQL database now.
+
+OpenProject requires at least PostgreSQL 9.5 installed. Please check <https://www.postgresql.org/download/> if your distributed package is too old.
+
+```bash
+[root@host] apt-get install postgresql postgresql-contrib libpq-dev
+```
+
+Once installed, switch to the PostgreSQL system user.
+
+```bash
+[root@host] su - postgres
+```
+
+Then, as the PostgreSQL user, create the system user for OpenProject. This will prompt you for a password. We are going to assume in the following guide that password were 'openproject'. Of course, please choose a strong password and replace the values in the following guide with it!
+
+```bash
+[postgres@host] createuser -P -d openproject
+```
+
+Next, create the database owned by the new user
+
+```bash
+[postgres@host] createdb -O openproject openproject
+```
+
+Lastly, exit the system user
+
+```bash
+[postgres@host] exit
+# You will be root again now.
+```
+
+## Set the MYSQL_DATABASE_URL to migrate from
+
+The following command saves the current MySQL `DATABASE_URL` as `MYSQL_DATABASE_URL` in the OpenProject configuration:
+
+```bash
+openproject config:set MYSQL_DATABASE_URL="$(openproject config:get DATABASE_URL)"
+openproject config:get MYSQL_DATABASE_URL
+
+# Will output something of the kind
+# mysql2://user:password@localhost:3306/dbname
+```
+
+This will be used later by the migration script.
+
+## Configuring OpenProject to use the PostgreSQL database
+
+Form the `DATABASE_URL` string to match your selected password and add it to the openproject configuration:
+
+```bash
+openproject config:set DATABASE_URL="postgresql://openproject:<PASSWORD>@localhost/openproject"
+```
+
+
+**Please note:** Replace `<PASSWORD>` with the password you provided above. If you used any special characters, [check whether they need to be percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) for the database URL.
+
+You can use this command to escape any characters in the password:
+
+```bash
+openproject run ruby -r cgi -e "puts CGI.escape('your-password-here');"
+```
+
+
+## Migrating the database
+
+You are now ready to migrate from MySQL to PostgreSQL. The OpenProject packages embed a migration script that can be launched as follows:
+
+```
+sudo openproject run ./docker/mysql-to-postgres/bin/migrate-mysql-to-postgres
+```
+
+This might take a while depending on current installation size.
+
+## Optional: Uninstall MySQL
+
+If the packaged installation auto-installed MySQL before and you no longer need it (i.e. only OpenProject used a MySQL database on your server), you can remove the MySQL packages.
+
+You can check the output of `dpkg -l | grep mysql` to check for packages to be removed. Only keep `libmysqlclient-dev` for Ruby dependencies on the mysql adapter.
+
+The following is an exemplary removal of an installed version MySQL 5.7.
+
+```
+[root@host] apt-get remove mysql-server
+[root@host] openproject config:unset MYSQL_DATABASE_URL
+```
+
+**Note:** OpenProject still depends on `mysql-common` and other dev libraries of MySQL to build the `mysql2` gem for talking to MySQL databases. Depending on what packages you try to uninstall, `openproject` will be listed as a dependent package to be uninstalled if trying to uninstall `mysql-common`. Be careful here with the confirmation of removal, because it might just remove openproject itself due to the apt dependency management.
+
+
+## Running openproject reconfigure
+
+After you migrated your data, all you need to do is run through the configuration process of the packaged installation to remove the MySQL configuration
+
+```bash
+openproject reconfigure
+```
+
+
+In the database installation screen, make sure to select `skip`.
+Keep all other values the same by simply confirming them by pressing `enter` .
+
+
+After the configuration process has run through, your OpenProject installation will be running on PostgreSQL!
diff --git a/help/installation-and-operations/packaged/upgrade-guide-legacy.md b/help/installation-and-operations/packaged/upgrade-guide-legacy.md
new file mode 100644
index 00000000000..5690a3fc4dd
--- /dev/null
+++ b/help/installation-and-operations/packaged/upgrade-guide-legacy.md
@@ -0,0 +1,170 @@
+# Upgrade your pre-5.0 OpenProject installation (DEB/RPM Packages)
+
+Starting with OpenProject 4.1 stable releases will have their own branch on github. According to this the OpenProject release 6.0 is tracked via the stable/6 branch. We provide a stable branch `stable/<VERSION>` to contain all minor upgrades to OpenProject <VERSION>.x.
+
+For OpenProject 4.2, two packages existed: The OpenProject Core and Community Edition.
+Starting with OpenProject 5.0, both editions have been integrated into the single OpenProject package, which now contains a standard set of the most-used plugins previously contained in the Community Edition.
+
+This guide contains two guides:
+
+* The upgrade guide for OpenProject Core 4.2. to OpenProject 6.0
+* The migration guide to OpenProject 6.0 from OpenProject Community Edition 4.2.
+
+Please jump directly to the part of this guide depending on your OpenProject version (Core Edition or Community Edition) and operating system.
+
+## Upgrading from OpenProject Core Edition 4.2
+
+### Preliminary step: Remove the sources.list that defines the OpenProject Core Edition 4.2
+
+To avoid trying to update the deprecated 4.2 package, remove the following entry:
+
+ sudo rm -i /etc/apt/sources.list.d/openproject.list
+
+
+### Debian 7.6 Wheezy 64bits server
+
+ echo "deb https://deb.packager.io/gh/opf/openproject wheezy stable/6" | sudo tee /etc/apt/sources.list.d/openproject.list
+ sudo apt-get update
+ sudo apt-get install openproject
+ sudo openproject configure
+
+### Ubuntu 14.04 Trusty 64bits server
+
+ echo "deb https://deb.packager.io/gh/opf/openproject trusty stable/6" | sudo tee /etc/apt/sources.list.d/openproject.list
+ sudo apt-get update
+ sudo apt-get install openproject
+ sudo openproject configure
+
+### Fedora 20 64bits server
+
+ echo "[openproject]
+ name=Repository for opf/openproject application.
+ baseurl=https://rpm.packager.io/gh/opf/openproject/fedora20/stable/6
+ enabled=1" | sudo tee /etc/yum.repos.d/openproject.repo
+ sudo yum install openproject
+ sudo openproject configure
+
+### CentOS / RHEL 6 64 bits server
+
+ echo "[openproject]
+ name=Repository for opf/openproject application.
+ baseurl=https://rpm.packager.io/gh/opf/openproject/centos6/stable/6
+ enabled=1" | sudo tee /etc/yum.repos.d/openproject.repo
+ sudo yum install openproject
+ sudo openproject configure
+
+### SUSE Linux Enterprise Server 12
+
+ sudo zypper addrepo "https://rpm.packager.io/gh/opf/openproject/sles12/stable/6" "openproject"
+ sudo zypper install openproject
+ sudo openproject configure
+
+## Migrating from OpenProject Community Edition 4.2
+
+The `openproject-ce` package no longer exists, but you can migrate to the new OpenProject package, which contains all functionality that was previously contained in the Community Edition.
+
+The following steps were tested on Ubuntu and Debian machines with OpenProject Community Edition 4.2 installed. There may be variations for other distributions, please let us know If you can provide additional information to the migration path.
+
+### Step 1: Backup existing installation
+
+Before performing the migration, please backup your existing installation. While we will continue to use it and database migrations should run smoothly, please keep a backup at hand.
+
+To backup attachments, database and repository, use the following command:
+
+ sudo openproject-ce run backup
+
+### Step 2: Shut down openproject-ce instance
+
+To avoid any further changes to the application, stop the web and worker processes:
+
+ sudo openproject-ce scale web=0 worker=0
+
+### Step 3: Confirm database connection details
+
+If you used autoinstall, the database name and database user name should equal `openproject_ce`. You can confirm this by running:
+
+ sudo openproject-ce config:get DATABASE_URL
+
+Which should output something of the form
+
+ mysql2://<username>:<password>@127.0.0.1:3306/<dbname>
+
+If the URI contains `openproject_ce` as the username and database name as the example above, we can simply continue.
+Otherwise, note user-, database name and password just to be sure.
+
+### Step 4: Remove the openproject-ce package
+
+Remove the `openproject-ce` package from your system. For Debian/Ubuntu, run:
+
+ sudo apt-get remove openproject-ce
+
+### Step 5: Remove the sources.list that defines the Community Edition package
+
+To avoid installing the deprecated 4.2 package, remove the following entry:
+
+ sudo rm -i /etc/apt/sources.list.d/pkgr-openproject-community.list
+
+
+### Step 6: Move the existing application and configuration files
+
+As the OpenProject 6.0 package is identitical to the core in regards to paths, you'll need to reference the configuration and application (e.g., attachments, SVN repositories) files to the path that is expected from the new package.
+
+ # Move openproject-ce configuration
+ sudo mv /etc/openproject-ce /etc/openproject
+
+For repositories, there are references in the database to the old `/var/db/openproject-ce/svn/<repository>` locations, so we suggest to symlink them instead:
+
+ # Symlink existing attachments and
+ sudo ln -s /var/db/openproject-ce /var/db/openproject
+
+### Step 7: Disable the Community Edition Apache2 configuration
+
+As a final step, disable the `openproject-ce` configuration.
+
+ sudo a2dissite openproject-ce
+
+Optionally, remove the disabled site. The following path applies to Debian/Ubuntu.
+
+ sudo rm -i /etc/apache2/sites-available/openproject-ce.conf
+
+Note:
+
+* For RedHat, the path should be changed to `/etc/httpd/conf.d/openproject-ce.conf`.
+* For SLES, the path should be changed to `/etc/apache2/vhosts.d/openproject-ce.conf`.
+
+### Step 8: Install the OpenProject 6.0 package and select database
+
+The rest of the installation is mostly identical to the installation guide of the OpenProject 5.0 package:
+https://www.openproject.org/open-source/packaged-installation/packaged-installation-guide/
+
+Add the package source to your package manager, update the sources, and install the `openproject` package. (See the installation guide linked above for the detailed steps for the various distributions).
+
+**Important:** Instead of running `openproject configure`, run `openproject reconfigure`, which will lead you through the complete wizard.
+
+In the first step *mysql/autoinstall*, select the **reuse** option (Use an existing database).
+
+![](https://dl.dropboxusercontent.com/u/270758/op/mysql-reuse.png)
+
+Press OK for the following steps, which will simply take the existing values from your old configuration
+
+ * MySQL IP or hostname
+ * MySQL port
+
+In the dialog `mysql/username`, enter `openproject_ce` if the Database URI from Step 4 contained it. If you chose a different user name in the original CE installation, it should already be set to this value.
+
+![](https://dl.dropboxusercontent.com/u/270758/op/mysql-username.png)
+
+In the dialog `mysql/password`, **leave the password empty**. It will use the value from your original installation. You can optionally enter the password you retrieved from the database URI from Step 4, but that should be identical.
+
+![](https://dl.dropboxusercontent.com/u/270758/op/mysql-password.png)
+
+And again, in the `mysql/db_name` step, enter `openproject_ce` if the Database URI from Step 4 contained it. If you chose a different database name in the original CE installation, it should already be set to this value.
+
+The other installation steps (mysql/db_source_host, mysql/ssl) may again be skipped by pressing OK, as they should still contain the old values from the Community Edition.
+
+There will be other new steps in the installation wizard for which we will provide additional information in the packager installation guide.
+
+Once the wizard has completed, the OpenProject instance should be updated to 6.0.x while re-using your existing database.
+
+**Note:** This last step is a workaround for the package upgrading process. We are working on making this step optional.
+The workaround is necessary since since the package appname changed from `openproject-ce` to `openproject`, and the installer wizard automatically sets the database to the app name when selecting an automatic installation of MySQL. Instead, the updater should respect an existing database (user-) name in its configuration.
diff --git a/help/installation-and-operations/packaged/upgrading.md b/help/installation-and-operations/packaged/upgrading.md
new file mode 100644
index 00000000000..e534f04d27a
--- /dev/null
+++ b/help/installation-and-operations/packaged/upgrading.md
@@ -0,0 +1,123 @@
+# Upgrading your OpenProject installation
+
+Note: this guide only applies if you've installed OpenProject using our DEB/RPM
+packages.
+
+Upgrading OpenProject is as easy as installing a newer OpenProject package and
+running the `openproject configure` command.
+
+## Backup
+
+We try to ensure your upgrade path is as smooth as possible. This means that the below update + configure step should be the only change needed to get up to date with our packaged installation.
+
+In the event of an error during the migrations, you will still want to have a recent backup you can restore to before reaching out to us. This is especially important for MySQL installations, since it does not support transactional migrations with changes to the table schema and you will have to rollback these changes manually. For PostgreSQL, if the Rails migrations fail, all previous changes will be rolled back for you to try again, or to install the older packages.
+
+To perform a backup, run the following command
+
+```bash
+sudo openproject run backup
+```
+
+This will store the current database dump, attachments and config to `/var/db/openproject/backup`. For more information on the backup and restore mechanisms, [check our detailed backup guide](https://www.openproject.org/operations/backup/backup-guide-packaged-installation/).
+
+## Debian / Ubuntu
+
+ sudo apt-get update
+ sudo apt-get install --only-upgrade openproject
+ sudo openproject configure
+
+## CentOS / RHEL
+
+ sudo yum update
+ sudo yum install openproject
+ sudo openproject configure
+
+## SuSE
+
+ sudo zypper update openproject
+ sudo openproject configure
+
+
+## Re-configuring the application
+
+Using `openproject configure`, the wizard will display new steps that weren't available yet or had not been configured in previous installations.
+If you want to perform changes to your configuration or are unsure what steps are available, you can safely run `openproject reconfigure` to walk through the entire configuration process again.
+
+Note that this still takes previous values into consideration. Values that should not change from your previous configurations can be skipped by pressing `<Return>`. This also applies for steps with passwords, which are shown as empty even though they may have a value. Skipping those steps equals to re-use the existing value.
+
+
+# Upgrading between major releases (DEB/RPM packages)
+
+Since OpenProject 9.0.0 is a major upgrade, you will need to perform some basic manual steps to upgrade your package.
+
+First, please check that the package repository is correct.
+Compare your local package repository with the one printed on your matching distribution on [our Download and Installation page](https://www.openproject.org/download-and-installation/)
+
+## Upgrade notes for OpenProject 9.0
+
+These following points are some known issues around the update to 9.0.
+
+It does not contain the entire list of changes.
+To see all changes, [please browse the release notes](https://www.openproject.org/release-notes/openproject-9-0-0/).
+
+### Package repository moved into opf/openproject
+
+The OpenProject community installation is now using the same repository as the OpenProject development core.
+
+Please update your package source according to [our Download and Installation page](https://www.openproject.org/download-and-installation/).
+You will need to replace `opf/openproject-ce` with `opf/openproject` together with a change from `stable/8` to `stable/9` in order to perform the update.
+
+### MySQL is being deprecated
+
+OpenProject 9.0. is deprecating MySQL support. You can expect full MySQL support for the course of 9.0 releases, but we
+are likely going to be dropping MySQL completely in one of the following releases.
+
+For more information regarding motivation behind this and migration steps, please see https://www.openproject.org/deprecating-mysql-support/
+In this post, you will find documentation for a mostly-automated migration script to PostgreSQL to help you get up and running with PostgreSQL.
+
+## Upgrade steps
+
+If you have currently installed the stable 8.x release of OpenProject by using the `stable/8` package source,
+you will need to adjust that package source.
+
+### APT-based systems (Debian, Ubuntu)
+
+ - Update the reference to `opf/openproject-ce` in `/etc/apt/sources.list.d/openproject.list` to `opf/openproject`.
+ - Update the reference to `stable/8` in `/etc/apt/sources.list.d/openproject.list` to `stable/9`.
+ - Perform the Upgrade steps as mentioned above in *Upgrading your OpenProject installation*
+
+### YUM-based systems (CentOS, RHEL)
+
+ - Update the reference to `opf/openproject-ce` in `/etc/yum.repos.d/openproject.repo` to `opf/openproject`.
+ - Update the reference to `stable/8` in `/etc/yum.repos.d/openproject.repo` to `stable/9`.
+ - Perform the Upgrade steps as mentioned above in *Upgrading your OpenProject installation*
+
+### SUSE Linux Enterprise Server 12
+
+ - Update the reference to `opf/openproject-ce` in `/etc/zypp/repos.d/openproject.repo` to `opf/openproject`.
+ - Update the reference to `stable/8` in `/etc/zypp/repos.d/openproject.repo` to `stable/9`.
+ - Perform the Upgrade steps as mentioned above in *Upgrading your OpenProject installation*
+
+
+## Previous Upgrade notes
+
+### Upgrade notes for OpenProject 7.0. to 8.x
+
+These following points are some known issues around the update to 8.0. It does not contain the entire list of changes. To see all changes, [please browse the release notes](https://www.openproject.org/release-notes/openproject-8-0/).
+
+#### Upgrades in NPM may result in package inconsistencies
+
+As has been reported from the community, [there appear to be issues with NPM leftover packages](https://community.openproject.com/projects/openproject/work_packages/28571) upgrading to OpenProject 8.0.0. This is due to the packages applying a delta between your installed version and the to-be-installed 8.0. package. In some cases such as SLES12 and Centos 7, the `frontend/node_modules` folder is not fully correctly replaced. This appears to hint at an issue with yum, the package manager behind both.
+
+To ensure the package's node_modules folder matches your local version, we recommend you simply remove `/opt/openproject/frontend/node_modules` entirely **before** installing the package
+
+```
+rm -rf /opt/openproject/frontend/node_modules
+# Continue with the installation steps described below
+```
+
+#### Migration from Textile to Markdown
+
+OpenProject 8.0. has removed Textile, all previous content is migrated to GFM Markdown using [pandoc](https://pandoc.org). This will happen automatically during the migration run. A recent pandoc version will be downloaded by OpenProject.
+
+For more information, please visit this separate guide: https://github.com/opf/openproject/tree/dev/docs/user/textile-to-markdown-migration
diff --git a/help/installation-and-operations/system-requirements.md b/help/installation-and-operations/system-requirements.md
new file mode 100644
index 00000000000..17fae387bf3
--- /dev/null
+++ b/help/installation-and-operations/system-requirements.md
@@ -0,0 +1,45 @@
+# System requirements
+
+__Note__: The configurations described below are what we use and test against.
+This means that other configurations might also work but we do not
+provide any official support for them.
+
+## Server
+
+### Hardware
+
+* __Memory:__ 4096 MB
+* __Free disc space:__ 2 GB
+
+### Operating system
+
+| Distribution (64 bits only) | Identifier | init system |
+| :------------------------------ | :----------- | :---------- |
+| CentOS/RHEL 7.x | centos-7 | systemd |
+| Debian 9 Stretch | debian-9 | systemd |
+| Suse Linux Enterprise Server 12 | sles-12 | sysvinit |
+| Ubuntu 16.04 Xenial Xerus | ubuntu-16.04 | upstart |
+| Ubuntu 18.04 Bionic Beaver | ubuntu-18.04 | systemd |
+
+
+### Dependencies
+
+* __Runtime:__ [Ruby](https://www.ruby-lang.org/en/) Version = 2.6.x
+* __Webserver:__ [Apache](http://httpd.apache.org/)
+ or [nginx](http://nginx.org/en/docs/)
+* __Application server:__ [Phusion Passenger](https://www.phusionpassenger.com/)
+ or [Unicorn](http://unicorn.bogomips.org/)
+* __Database__: [PostgreSQL](http://www.postgresql.org/) Version >= 9.5
+
+Please be aware that the dependencies listed above also have a lot of
+dependencies themselves.
+
+## Client
+
+OpenProject supports the latest versions of the major browsers. In our
+strive to make OpenProject easy and fun to use we had to drop support
+for some older browsers (e.g. IE 11).
+
+* [Mozilla Firefox](https://www.mozilla.org/en-US/firefox/products/) (At least ESR version 60)
+* [Microsoft Edge](https://www.microsoft.com/de-de/windows/microsoft-edge)
+* [Google Chrome](https://www.google.com/chrome/browser/desktop/)
diff --git a/help/installation-and-operations/upgrading-postgresql.md b/help/installation-and-operations/upgrading-postgresql.md
new file mode 100644
index 00000000000..bde269b5913
--- /dev/null
+++ b/help/installation-and-operations/upgrading-postgresql.md
@@ -0,0 +1,68 @@
+## OpenProject PostgreSQL migration guide to 9.6
+
+This guide will lead you to the steps of upgrading your system PostgreSQL version to 9.6.
+OpenProject 7.4.0 requires PostgreSQL 9.5+, so we're recommending to install to 9.6 directly.
+
+If you're upgrading to 7.4.0 without a 9.5+ database, your upgrade process will be terminated with a 'Database incompatibility warning'. You should not
+
+Since Ubuntu 14.04 (still supported by OpenProject) is still running on PostgreSQL 9.3., we're showing the
+upgrade process for this distribution. Debian oldstable also uses PostgreSQL 9.4. as well.
+
+### Preparations for the upgrade
+
+Stop the current OpenProject workers
+
+```bash
+service openproject stop
+```
+
+### Install the newer PostgreSQL version
+
+For Ubuntu 14.04:
+
+```bash
+sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
+wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
+sudo apt-get update
+sudo apt-get install postgresql-9.6
+```
+
+
+For other versions of Ubuntu, see this answer on AskUbuntu:
+https://askubuntu.com/questions/831292
+
+Or check the download for repositories from PostgreSQL:
+https://www.postgresql.org/download/
+
+
+### Upgrade of PostgreSQL
+
+
+ Stop the old cluster:
+
+ ```bash
+ pg_dropcluster 9.6 main --stop
+ ```
+
+ Upgrade the cluster to 9.6
+
+ ```bash
+ pg_upgradecluster -v 9.6 9.3 main
+ ```
+
+ Remove the old cluster
+
+ ```bash
+ pg_dropcluster 9.3 main
+ ```
+
+ Lastly, remove the ubuntu-provided version of 9.3:
+
+ ```bash
+ apt-get remove postgres postgresql-9.3
+ ```
+
+ ### Upgrade OpenProject
+
+You can now continue with the regular upgrading guide as detailed on these pages:
+[https://www.openproject.org/operations/upgrading/](https://www.openproject.org/operations/upgrading/)