Content
You are here:
Nextcloud integration
Added by Franck COLLE over 2 years ago
Hello,
I am trying to integrate my nextcloud server into openproject but when configuring the server in openproject I get the following message :
1 error prohibited this Storage from being saved
There were problems with the following fields:
- Host is not fully set up. The Nextcloud instance does not receive the "Authorization" header, which is necessary for a Bearer token based authorization of API requests. Please double check your HTTP server configuration.
Could you help me because I am out of ideas ?
Thanks,
Franck
Replies (6)
Hi Franck COLLE,
I am the one of those developers who implemented that red validation message. Are you the server administrator of your Nextcloud instance? If not, you need to talk to your server administrator to fix your HTTP server setup.
So here is a more technical description of what is going on:
The integration (Nextcloud side) needs to authorize the current OpenProject user to perform actions in Nextcloud, such as getting a list of file names etc.. Therefore OpenProject identifies the current user with a OAuth-Token whenever sending API requests. The API requests, which are HTTP requests, contain an Authorization header which contains the token. In incomplete installations of Nextcloud the Authorization part of the header gets stripped (removed) by the HTTP server (which most likely is an Apache 2). Thus, the Nextcloud code does not receive the token from the Authorization header and cannot authorize the request.
To fix that, in case of Apache 2 (and I am not an Nextcloud server administration expert) you need to ensure that you have mod_rewrite and mod_env enabled in your Apache configuration. I believe that the Nextcloud docs for setting up pretty URLs cover the necessary steps.
I hope, this helps,
Wieland
Hi Wieland,
Thanks for information, now it's works.
Franck
Hi at all,
I have the same problem like Franck. When i try to connect to Nextcloud i get the same error.
On my Apache I have enabled rewrite and env. I tried also the Nextcloud docs for settung up pretty URLs. But nothing works.
I also have a Nginx Proxy Manager in between. Could this be the prolbem?
Hi Herr Mann
could you be so kind to share your configuration files, be sure to remove some information, i am not sure if i ever heard about NginX proxy manager, is it something different to NginX webserver?
please could you also share the result of the following commands?
https://www.openproject.org/docs/system-admin-guide/integrations/nextcloud/#troubleshooting
Same problem here. We have OpenProjects behind an nginx reverse proxy. Result of the curl troubleshooting is:
{"user_id":"","authorization_header":null}
Any and all help is greatly appreciated.
Hey Marie Schmidt and Herr Mann it should not matter if OpenProject sits behind a reverse proxy for the original poster's specific problem. It concerns direct requests from the OpenProject back-end to Nextcloud, so a HTTPS request from OpenProject's Ruby process to Nextcloud's back-end.
However, if Nextcloud sits behind a reverse proxy that is very relevant. It needs to forward the HTTP
Authorization
header to Nextcloud's PHP process. So please ensure that your proxy does not strip those off. For NGINX that might mean that you need to set the following.(please correct me if that is wrong)