Page 2 of 5

Re: How To Install Nexccloud behind a secure reverse proxy (ARM)

Posted: 15 Jan 2021, 01:34
by StephenM
Just a few last steps now....

Code: Select all

vi /mnt/md0/appdata/docker/volumes/nextcloud_nextcloud/_data/config/config.php
Put it in insert mode and navigate around until you find this section:

Code: Select all

'trusted_domains' =>
  array (
    0 => '192.168.1.100:8080',
    1 => 'nextcloud.mydomain.com',
    2 => 'UNRAID IP:PORT',
Edit it until it looks like the above.

Find or create this section and edit it to look like this:

Code: Select all

'trusted_proxies' =>
  array (
    0 => '192.168.1.0/24',
  ),
Add this section at the end:

Code: Select all

 'forwarded_for_headers' =>
  array (
    0 => 'X-Forwarded-For',
    1 => 'HTTP_X_FORWARDED_FOR',
  ),
To stop your Raid filling up with trash, add this line time:

Code: Select all

'trashbin_retention_obligation' => '30, 60',
Once you've done that, try logging to Nextcloud from the outside world.

https://nextcloud.mydomain.com

Finger's crossed you can log in with your admin user.

That's it, you're up and working.

Re: How To Install Nexccloud behind a secure reverse proxy (ARM)

Posted: 15 Jan 2021, 03:04
by StephenM
As an afterthought I was having some issues with the website not using https on occasion.

Change the proxy host setting under SSL to force secure.

Re: How To Install Nexccloud behind a secure reverse proxy (ARM)

Posted: 15 Jan 2021, 04:27
by StephenM
Having just upgraded TNAS.....

The ports 80 and 443 are in use by the OS to I did something first time round to overcome this but it seems not to have persisted beyond an upgrade.

A quick mod has fixed this in the docker-compose.yml :

Change to this:

Code: Select all

proxy:                                                                                                                                                             
    image: 'jc21/nginx-proxy-manager:latest'                                                                                                                         
    restart: always                                                                                                                                                  
    ports:                                                                                                                                                           
      # Public HTTP Port:                                                                                                                                            
      - '2080:80'                                                                                                                                                      
      # Public HTTPS Port:                                                                                                                                           
      - '2443:443'                                                                                                                                                    
      # Admin Web Port:                                                                                                                                              
      - '81:81'                                                                                                                                                      
    environment:
Leave the rest of the file as is.

Change your router port forwarding to forward 80 to 2080 on 192.168.1.200 and also 443 to 2443 on 192.168.1.200

Re: How To Install Nexccloud behind a secure reverse proxy (ARM)

Posted: 15 Jan 2021, 05:48
by StephenM
StephenM wrote: 15 Jan 2021, 03:04 As an afterthought I was having some issues with the website not using https on occasion.

Change the proxy host setting under SSL to force secure.
Actually - Doing this causes some strange problems with the desktop app and logging in.

You get egg timers for ever with this setting set.

Odd - don't see why that should be the case.

Re: How To Install Nexccloud behind a secure reverse proxy (ARM)

Posted: 15 Jan 2021, 06:57
by StephenM
Sorry - I wish I could go back and edit - it would make this much more readable.

Here are some more changes you need in your config.php file.

I had to change one line and add 3

Code: Select all

  'overwrite.cli.url' => 'https://nextcloud.mydomain.com',
  'overwriteprotocol' => 'https',
  'overwritehost' => 'nextcloud.mydominc.com',
This probably means that you can force SSL in the proxy rule, but I haven't tested that yet.

Re: How To Install Nexccloud behind a secure reverse proxy (ARM)

Posted: 15 Jan 2021, 07:04
by yerc1
{L_BUTTON_AT}StephenM
Fantastic! Thanks for sharing... I have uninstalled the out-of-support Nextcloud app after months of waiting for an update... I am just getting ready to install NextcloudPi on Docker when I saw your post.

Re: How To Install Nexccloud behind a secure reverse proxy (ARM)

Posted: 15 Jan 2021, 07:08
by yerc1
TM Support, how Stephen detailed the steps within a context, is what I meant in my other post (post #3 of the thread).

Re: How To Install Nexccloud behind a secure reverse proxy (ARM)

Posted: 15 Jan 2021, 19:22
by StephenM
Could a board admin give me the ability to edit my posts until midnight 16th January 2021 GMT please - This needs tidying up and I can't because the posts are not editable by me.

Re: How To Install Nexccloud behind a secure reverse proxy (ARM)

Posted: 15 Jan 2021, 22:35
by TMS
Sorry,I also don’t have permission. You can tell me what needs to be modified, and I can modify it for you (more details on the modification), or you can open another post.

Re: How To Install Nexccloud behind a secure reverse proxy (ARM)

Posted: 16 Jan 2021, 10:01
by yerc1
TMS wrote: 15 Jan 2021, 22:35 Sorry,I also don’t have permission. You can tell me what needs to be modified, and I can modify it for you (more details on the modification), or you can open another post.
According to the forum FAQ

Code: Select all

What are Administrators?
Administrators are members assigned with the highest level of control over the entire board. These members can control all facets of board operation, including setting permissions, banning users, creating usergroups or moderators, etc., 
Is there someone in your Team with an Administrator access to possibly give StephenM the ability to edit his post?