For the manual installation of OpenProject as an external application of Nextcloud, make sure that your Nextcloud as well as OpenProject instance is up and running.
Assuming you’re in the apps folder directory:
- Clone
git clone https://github.com/nextcloud/app_api.git
- build
cd app_api npm ci && npm run dev
- Enable the
app_api# Assuming you’re in nextcloud server root directory sudo -u www-data php occ a:e app_api
- Navigate to
Administration Settings > AppAPI - Click
Register Daemon - Select
Manual Installfor Daemon configuration template - Put
manual_installfor name and display name - Deployment method as
manual-install - Daemon host as
localhost - Click Register
Set up and build OpenProject locally following OpenProject Development Setup
After the setup, run OpenProject locally with the given command line.
NOTE: If you are running Nextcloud in a sub folder replace
NC_SUB_FOLDERwith the path name, otherwise remove it.
# the reason to set relative path with NC_SUB_FOLDER is it makes easy to change when there is redirection url in response
OPENPROJECT_RAILS__RELATIVE__URL__ROOT=/<NC_SUB_FOLDER>/index.php/apps/app_api/proxy/openproject-nextcloud-app \
foreman start -f Procfile.devAssuming you’re in the apps folder directory:
-
Clone
git clone https://github.com/JankariTech/openproject-nextcloud-app.git
-
Configure script before running external app
cd openproject-nextcloud-app cp ex_app_run_script.sh.example ex_app_run_script.shOnce you have copied the script to run the external application, configure the following environments
-
APP_IDis the application id of the external app -
APP_PORTis port for the external app -
APP_HOSTis the host for the external app -
APP_VERSIONis the version of external app -
APP_SECRETis a secret key used by Nextcloud to authenticate with external applications. Administrators can set any secret, but they must ensure that the same secret is used when registering and running the external application. -
AA_VERSIONindicates the version of theapp_apiapp. The external application needs this information becauseapp_apiis responsible for handling tasks like registration, authentication, and managing external apps. To get the version ofapp_api, list the apps using the CLI. To do that run this command in the root directory of server:sudo -u www-data php occ a:l
-
EX_APP_VERSIONis the version of the external application and must be same asAPP_VERSION -
EX_APP_IDis the version of the external application and must be same asAPP_ID -
NC_SUB_FOLDERis the subfolder in which nextcloud is running (make sure to use same in OPENPROJECT_RAILS__RELATIVE__URL__ROOT while running openproject) -
OP_BACKEND_URLis the url in whichOpenProjectis up and running -
NEXTCLOUD_URLthe url in whichNextcloudis up and runningNOTE: In the given environments,
APP_ID,APP_PORT,APP_HOST, andAPP_VERSIONare used to run the external application, whileAPP_SECRET,EX_APP_VERSION,EX_APP_ID, andAA_VERSIONare needed for the external app and Nextcloud to authenticate each other.
-
-
Install required Python packages to run external application
openproject-nextcloud-app# Make sure that you have python3 installed in your local system python3 -m pip install -r requirements.txt -
Run external application with the script
bash ex_app_run_script.sh
Assuming you’re in nextcloud server root directory
- Register and deploy external application
openproject-nextcloud-appIn the above bash command use the same value forsudo -u www-data php occ app_api:app:register openproject-nextcloud-app manual_install --json-info \ "{\"id\":\"<EX_APP_ID>\", \"name\":\"<EX_APP_ID>\", \"daemon_config_name\":\"manual_install\", \"version\":\"<EX_APP_VERSION>\", \"secret\":\"<APP_SECRET>\", \"scopes\":[\"ALL\"], \"port\":<APP_PORT>, \"routes\": [{\"url\":\".*\",\"verb\":\"GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS, TRACE\", \"access_level\":1, \"headers_to_exclude\":[]}]}" \ --force-scopes --wait-finish
EX_APP_ID,EX_APP_VERSION,APP_SECRET, andAPP_PORTas used while running external appopenproject-nextcloud-app
Now OpenProject can be reached on:
http://${APP_HOST}/${NC_SUB_FOLDER}/index.php/apps/app_api/proxy/openproject-nextcloud-app