Nextcloud and Letsencrypt (swag)

  • OMV4 on ProLiant N54L + 5 x 3.5'' WD/Seagate HDs

    OMV5 on Raspberry Pi4

  • I know this is late, but I've been working on the same thing....I've had a heck of a time trying to get everything just right...spent about 5 days on it. I originally tried to mount SMB shares to the docker ( those are the volumes I declared as external)

    Code
    sudo docker volume create --driver local --opt type=cifs --opt device=//<IP>/NextCloud/files --opt o=username=nextcloud,password=<SMB share password>,uid=33,gid=33,file_mode=0777,dir_mode=0777 nextcloudData # the GUID 33 is www-data user
    to
    sudo docker volume create --driver local --opt type=cifs --opt device=//<IP>/NextCloud/config --opt o=username=nextcloud,password=<SMB share password>,uid=33,gid=33,file_mode=0770,dir_mode=0770 nextcloudConfig


    Still working on the SWAG part, but here is my docker compose file:


  • You can access SMB shares from Nextcloud using the "external storage app" which can be installed from within Nextcloud

    macom do you use this app? Is it possible to dig down and select just a subfolder in a SMB share?


    Update: Reading the documentation. I see that I can. Now to figure how to write the file path, and if it will take a local ip.


    Update2: Ha-wee! It works.

    Simple and sure backup and restore: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Hardware: Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, & Heimdall - NanoPi M4 (v.1), backup - Odroid XU4, Pi-Hole (DietPi) - Testing/Playing: hc2, xu4, Pi 3B+, Odroid H2. Mac user trying to convert to Linux on a HP dx2400, Debian 10 XFCE.

    Edited 2 times, last by Agricola: Update ().

  • macom do you use this app? Is it possible to dig down and select just a subfolder in a SMB share?


    Update: Reading the documentation. I see that I can. Now to figure how to write the file path, and if it will take a local ip.


    Update2: Ha-wee! It works.

    Can you tell me how you did it ?
    I'm trying to get a shared OMV folder into Nextcloud, but I can't connect it with the external storage app.

    It seems I can't reach the IP of my server in the docker-container

  • Is it also possible to access Nextcloud via the local IP-Adress ?

    When I try to access via https://192.160.10.1:443 I only get the swag screen:


    Have you seen this in the docker-compose file?


    Code
    # ports: # uncomment this and the next line if you want to bypass the proxy
    # - 450:443

    If you uncoment these lines, you should be able to reach nextcloud by


    Edit:

    https://ip.of.your.nas:450

  • tschensie Your host IP is: 192.168.10.1 ?????

    I always thought that *.*.*.1 are dhcp servers


    Have you seen this in the docker-compose file?


    Code
    # ports: # uncomment this and the next line if you want to bypass the proxy
    # - 450:443

    If you uncoment these lines, you should be able to reach nextcloud by


    ip.of.your.nas:450

    Sorry to take advantage of the this but, I did it that way.

    Then added my host IP (other time I used hostname) to the "trusted domains" array of "nextcloud....config.php" with port and without and, nothing.


    Maybe, since I'm using wireguardVPN to the LAN, something is different in the setting I need to make, O.o

    If it adds any info, I'm using subdomain on SWAG.

  • Changed the post. You need to add https://

    just IP and port does not work for me

    Ok, that makes more sense now.


    Will try it in a few hours:


    1 - Uncomment the 2 lines on docker-compose.yml


    2 - docker-compose up -d nextcloud


    3 - Check the "config.php" to see if the "trusted domains" array is correct and edit it accordingly.


    4 - docker restart nextcloud


    5 - docker logs -f nextcloud


    Then try to access it via "https://myLANip:450" and fingers crossed, :)


    [EDIT#1]

    Ok, I've managed to reach NEXTCLOUD by https://myIP:450 while "VPN wireguarded" but I think it's making it jump to the "full web address" because of this lines on the "config.php"

    Code
    'trusted_domains' =>
    array (
    0 => 'https://LAN IP of HOST:450', <<<< ---- as talked above with @macom ---^^^^
    1 => 'nextcloud.my.url', <<<< ---- as instructed for access with "nextcloud.subdomain.conf" via Reverse Proxy SWAG
    ),
    'overwrite.cli.url' => 'https://nextcloud.my.url', <<<< --- I think that this
    'overwritehost' => 'nextcloud.my.url', <<<< --- and this is what forces it to change the IP to web address
    'overwriteprotocol' => 'https',

    As soon as I deactivate "wireguard connection", connecting to "https://myLANip:450" dies out with "Hmmm... it's not possible to access this page...." which is a good sign. It means that when on VPN, it accepts me as on LAN.


    Maybe If I try to login via LAN and after deactivate the VPN, something will present itself., :) [EDIT#2] <<<<<----- SEE BELOW


    Or maybe even better would be an enhancement setting that "If connected on the IP Range then go on LAN else go WAN" (my REALLY poor attempt on doing PROGRAMMING, :D )


    [EDIT#2] Ok, it seems it worked. After login into NC, went to the "Settings->System" area and deactivated the "VPN" and NC shouted " Lost connection to the server".

    After clicking anywhere else, it immediately resumed the page (I'm assuming it started using the WAN that I'm using) so, all is good.


    I think I can only fully test this when I'm at home and try to sync/send some files (maybe some heavy ones) and see how fast the upload is.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!