Upgrade OpenProject

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

It is strongly recommended to create a backup before starting the update process. If you have important data, create and try to restore a backup to ensure that everything works properly.

Follow these steps to only upgrade the application code without modifying any other stack components:

  • Launch a new OpenProject instance or server.

  • Copy the database backup to the new server.

  • Stop all servers and start only PostgreSQL.

      $ sudo installdir/ stop
      $ sudo installdir/ start postgresql
  • Remove the previous database and create the new one. You can configure the database user password with a secure password.

      $ psql -U postgres
      Password: ****
      postgres=# drop database bitnami_openproject;
      postgres=# create database bitnami_openproject;
      postgres=# grant all privileges on bitnami_openproject.* to 'bn_openproject'@'localhost' identified by 'DATABASE_PASSWORD';
  • Restore the new database:

      $ psql -U postgres bitnami_openproject < backup.sql
    • Edit the OpenProject configuration file at installdir/apps/openproject/htdocs/config/database.yml to update the database user password to the one that set previously.

          adapter: postgresql
          encoding: unicode
          database: bitnami_openproject
          pool: 20
          username: bn_openproject
          password: "DATABASE_PASSWORD"
          host: localhost
  • Migrate the database to the latest version:

      $ cd installdir/apps/openproject/htdocs
      $ ruby bin/rake db:migrate RAILS_ENV=production
  • Copy the installdir/apps/openproject/htdocs/files folder from the old installation to the new one.

  • Finally, clean the cache and the sessions:

    $ ruby bin/rake tmp:clear
    • Restart the servers and you can access the new OpenProject installation.

      $ sudo installdir/ restart


  • If you see the following error, go to your database and remove the specified table and run the migrate command again (note that versions prior to 10.x use MySQL).

        PostgreSQL::Error: Table 'changeset_parents' already exists: CREATE TABLE `changeset_parents` (`changeset_id` int(11) NOT NULL, `parent_id` int(11) NOT NULL) ENGINE=InnoDB
        $ psql -U postgres
        postgres=# use bitnami_openproject;
        postgres=# drop table changeset_parents;
  • If you upgrade from a 1.x version and you see something similar to this error creating an issue:

        MysqlStatement::Error Value for field `value` cannot be NULL INSERT INTO custom_value ...

    Go to your custom values in the Admin panel, try to edit and save them again. This should fix the issue.

Last modification April 8, 2020