cat2devnull

Members
  • Posts

    128
  • Joined

  • Last visited

Posts posted by cat2devnull

  1. 39 minutes ago, akazu said:

    Does this mean that I also have to open ports on my router and take care of all the security?

    If you want access from outside then you need to open port 443 (HTTPS) and point it at your NGINX instance. NGINX will look after the security side of things. Take a look at some of the IBRACORP videos to get an understanding of how it all works together. You will need DDNS and a domain name but it's totally worth the effort.

    I suggest that you watch a bunch of videos from IBRACORP and SpaceInvaderOne and get your head around how all this technology works. A few hours of research will save you a lot of time in the long run.

     

    32 minutes ago, akazu said:

    Do you know where I can find instructions on how to download the liso certificate to my trust store on my computer?

    Generally this is done on a per computer and per browser basis, so will be dependent on what you run. Most browsers have an option when they encounter a self signed certificate to "trust" it in the future.

    • Thanks 1
  2. 36 minutes ago, akazu said:

    But there must be a way for me or people who only want to run everything locally.

    Running NGINX is for local or remote access.

    If you truely only ever intend to access your NextCloud instance from a machine or two on your LAN then the solution is to add the lsio cert to the trust store on your machine and your done.

    Otherwise install NGINX and let it manage the HTTPS certs. I made a post for Vaultwarden to explain how it works for both LAN and WAN connections but you can just replace Vaultwarden for NextCloud.

    This is the better way to set things up. Trust me, it won't be long before you find other uses for NGINX. I initially set it up for Vaultwarden but now it manages NextCloud, Plex and a bunch of other services.

    • Thanks 1
  3. 14 hours ago, akazu said:

    When I now open the Nextcloud via web browser, I get the message “The server certificate is not trusted” with execute anyway I can log in normally.

    The idea with NextCloud and other applications such as Bitwarden, is that you access the app via a reverse proxy such as NGINX. This can then manage certificates automatically from Let's Encrypt.

  4. 1 hour ago, Iceman1199 said:

    How did you remap your existing data to your new nextcloud setup?  My data exist on my array, but I guess when I setup nextcloud, it created a new database in my nextcloud share, and now Nextcloud is only looking at that database for files. 

     

    So you have to get NextCloud to rescan the existing data folder and add all the files to the database.

    php occ files:scan --all
  5. 11 hours ago, Jeerapong said:

    It work. I have downgraded to NC 18.0.3-ls70 the NextCloud back to normal status.

     

    Great to hear.

     

    11 hours ago, Jeerapong said:

    Please suggest what is the suitable version I need to update to?

     

    Just go the the latest supported versions, either 25 or 26.

    I would upgrade the docker to the latest 19.x release first and then upgrade NC to 19.x. You can find the correct docker tag by using the search function and searching for "19."

    Rinse and repeat until you are up to date. It will take a number of iterations since you can only go one major release at a time.

    After each upgrade check if NC reports any issues under Administration Settings -> Overview. You may need to run a few database commands by hand after some of the updates.

    Just remember in future to upgrade both docker and NC a bit more often so you don't get out of sync again. 😀

     

    11 hours ago, Jeerapong said:

    Can I install a fresh one and path to the old data location ?

     

    Not that you need this anymore but yes. You just reinstall, point the data folder at the appropriate directory and then run "php occ files:scan --all" and it will rescan the folder and add all the files to the database.

  6. Great so you're config and version files both seem to be in sync with version 18.0.3 so that's a good start.

    I think your upgrade then downgrade of the docker has introduced this PHP issue.

    You must be on a version (I think you said 7.4.33) that is not compatible with 18.0.3.

    According to the PHP release history, 7.4.33 was the last 7.4 release and came out in Nov 2022.

    It is probably too new for NC 18.0.3 which is from years earlier.

    You could try downgrading to 18.0.3-ls76 which is the linuxserver.io version for NC 18.0.3 but I don't know if that specifies an older PHP as well or if it will just pull the latest. But it's worth a shot.

    If not the next step would be trying to do a downgrade of PHP within the docker but I have no idea how to do that.

  7. 1 hour ago, Jeerapong said:

    Now, I have downgraded the NextCloud docker to 20.0.2, PHP version is 7.4.33 but the status web ui is "Update is process."

     

    Ok so we at least we have a GUI again, even if it won't let us do anything because it thinks we are mid upgrade.


    Go into the docker shell and run the command "occ status". You should see something like;

    root@1384826c6432:/# occ status
      - installed: true
      - version: 25.0.5.1
      - versionstring: 25.0.5
      - edition: 
      - maintenance: false
      - needsDbUpgrade: false
      - productname: Nextcloud
      - extendedSupport: false

     

    Then check what the version.php thinks;

    cat /config/www/nextcloud/version.php

     

    Also check what version the config file thinks;

    cat /config/www/nextcloud/config/config.php | grep version

     

    All of these should be in agreement. I suspect that they are not because of a previous failed install.

     

    I thought step 3 is where it turns on maintenance mode. So it would be good to know what mode "occ status" thinks it is in.

     

    You could try to repair the database;

    occ maintenance:repair

     

    As for the actual error;

     

    Could not resolve OCA\Settings\AppInfo\Application! Class OCA\Settings\AppInfo\Application! Class OCA\Settings\AppInfo\Application does not exist in /config/www/nextcloud/lib/private/AppFramework/Utility/simpleContainer.php:106

     

    I found a bit of stuff here, but I have never really done any PHP so I can't say if this is a problem because you are still running an incompatible version of PHP or if you have a half upgraded/corrupted copy of NextCloud.

     

    I've never had an upgrade fail. If you only use NextCloud for file storage then you might find it easier to restore from a backup or just rebuild the docker from scratch.

     

    If that's not an option then in theory assuming your database is intact and your config folder is correct (see my earlier comment about 'occ stats', version.php and config.php needing to be in sync) then you should be able to create a new NextCloud2 docker using an appropriately old version from linuxserver.io

    Start by downloading an old version without pointing it at your appdata folder and make sure you have one that is using an appropriate 18.x version of NC and a suitable PHP7.x

    Once you have that, then point that new docker at your old appdata folder and it should fire back up.

  8. 1 hour ago, Jeerapong said:

    Could you please suggest how to downgrade the NextCloud docker on unraid?

    I would like to upgrade from 18.0.4 to 18.0.14 but I am facing PHP version miss match. PHP version is 8.1.19. 

    You can see all the available tags on their page.
    Just edit the NextCloud docker on Unraid and change the repository line to read lscr.io/linuxserver/nextcloud:<tag> where <tag> is the version you want to roll back to.

     

    I'm not sure what was the last docker version to ship with PHP7 so maybe try 24.0.12

    The documentation says they moved to PHP8 on 10/10/22 but it's unclear if that was in all releases or only docker 25.x and 26.x

     

    NextCloud 18.x is really old. Without a really compelling reason to be on an unsupported platform from 2021, I would recommend upgrading to a version that is still getting security patches.
    Even after upgrading to 18.0.14 you won't be able to go back to the "latest" docker version because you still won't be running a version that can support PHP8.

  9. There are plenty of posts over the last couple of months about this.
    Basically you have been updating the NextCloud docker but not updating NextCloud itself.
    There are a few options, you could downgrade the docker, get NextCloud running again on PHP7 and then update via the GUI.
    The other option is to upgrade via the command line within the docker shell.
     

    sudo -u abc php /config/www/nextcloud/updater/updater.phar
    occ upgrade

     

    19 hours ago, Jeerapong said:

    Updates between multiple major versions are unsupported

     

    When upgrading you can only update one version at a time.

    So the question is what version are you actually on, and what version is it trying to upgrade to?

    This seems to be an issue that a few users have been hitting recently.
    It may be the case that if you upgrade to the latest docker, hit the PHP issue and then try to upgrade NextCloud it gets into a weird state where the upgrade process fails part way through and the versioning gets out of sync.
    Eg, it is actually on v22 but thinks its on v23 so attempts an upgrade to v24 (if that makes sense).

    You can check as per my earlier post here.

  10. Great stuff, starting to get somewhere.

     

    2 hours ago, gevsan said:

    occ integrity:check-core

    - INVALID_HASH:

    - version.php:

    This is just because we had to hand edited the file so we broke the hash. Not a big deal.

     

    2 hours ago, gevsan said:

    But after this I did try

    docker exec -it nextcloud updater.phar

    And this actually worked!

    Ok, sorry that's on me. I gave you the wrong command because I didn't read the upgrade docs carefully.

     

    updater.phar prepares the system for an upgrade and performs the steps listed;

    • Check for expected files
    • Check for write permissions
    • Enable maintenance mode
    • Create backup
    • Downloading
    • Extracting
    • Replace entry points
    • Delete old files
    • Move new files in place

    Once that is done, it is ready to perform the upgrade which uses the "occ upgrade" command.

    So you're making progress. Looks like you are on 24.0.12.

     

    FYI running "docker exec -it nextcloud updater.phar" from Unraid is the same as running "updater.phar" from the NextCloud docker directly.

     

    2 hours ago, gevsan said:

    Internal Server Error
    The server was unable to complete your request.

    2 steps forward 1 step back :)

     

    So first just make sure you are on php 8 as 24.0.12 can't run on php 7.

    Run "php -v" from within the docker.

     

    The log files of interest are;

    /config/log/php/error.log

    /config/log/nginx/access.log
    /config/log/nginx/error.log

     

    This is probably a permissions issue... But that's an educated guess.

    See if there are any errors in the logs.

     

    Sorry this is taking so much back and forth but I have never hit this type of corruption during an upgrade and I'm not an expert. I know just enough to be dangerous. :)
    If anyone else on this forum knows what their doing, feel free to jump in.

  11. Worth a shot.

    So what does "occ status" think now?

    And what version is it trying to update to?

     

    Also you could try performing "occ integrity:check-core" and "occ maintenance:repair" to see if it can fix the issue.

     

    You could also try performing the upgrade via the command line, you might get some more useful debugging. "occ upgrade"

     

    • Thanks 1
  12. 15 minutes ago, gevsan said:

    I don't realy know what this means or how I should do it :/

    Don't take the blog to literally. It was just meant to be a basic guide.

    The blog was written for a docker that doesn't come with a text editor and he is showing how to install nano. The linuxserver.io docker includes nano and vi already. Just use which ever text editor you are more comfortable with.

     

    The main thing is that you need to edit your version.php file to look like;

    <?php 
    $OC_Version = array(23,0,12,2);
    $OC_VersionString = '23.0.12';
    $OC_Edition = '';
    $OC_Channel = 'stable';
    $OC_VersionCanBeUpgradedFrom = array (
      'nextcloud' => 
      array (
        '22.0' => true,
        '23.0' => true,
      ),
      'owncloud' => 
      array (
        '10.11' => true,
      ),
    );
    $OC_Build = '2023-03-21T09:23:03+00:00 62cfd3b4c9ff4d8cdbbe6dcc8b63a1085bb94e3d';
    $vendor = 'nextcloud';

     

    Now restart the docker and see if you can get back into the GUI. It should all be happy now and offer an upgrade to 24.x

    • Thanks 1
  13. 6 hours ago, gevsan said:

    The problem is that I don't know how to proceed from this message.. :D 

    So I have not hit this myself but it looks like NextCloud is either trying to upgrade or downgrade in an unsupported way. It is normally only allowed to upgrade one major release at a time.

    Eg if it is currently on 22.x.x then it can go to 23.x.x but not to 24.x.x or higher.

     

    This usually happens when it gets confused because of a failed upgrade attempt in the passed so it thinks it is on a higher version than it actually is.

    Eg it thinks it's on 25.x and wants to upgrade to 26.x but it actually is on 24.x

     

    Check what version of NextCloud the GUI thinks it is on and what it wants to upgrade to.

    This can be seen on the administration overview page (like I posted yesterday).

     

    Then go into the docker shell and run the command "occ status". You should see something like;

    root@1384826c6432:/# occ status
      - installed: true
      - version: 25.0.5.1
      - versionstring: 25.0.5
      - edition: 
      - maintenance: false
      - needsDbUpgrade: false
      - productname: Nextcloud
      - extendedSupport: false

     

    Then check what the version.php thinks;

    root@1384826c6432:/# cat /config/www/nextcloud/version.php 
    <?php 
    $OC_Version = array(25,0,5,1);
    $OC_VersionString = '25.0.5';
    $OC_Edition = '';
    $OC_Channel = 'stable';
    $OC_VersionCanBeUpgradedFrom = array (
      'nextcloud' => 
      array (
        '24.0' => true,
        '25.0' => true,
      ),
      'owncloud' => 
      array (
        '10.11' => true,
      ),
    );
    $OC_Build = '2023-03-23T12:04:47+00:00 28add7e896b24fee2714b21a12151e4042ab677c';
    $vendor = 'nextcloud';

     

    Also check what version the config file thinks;
     

    root@1384826c6432:/# cat /config/www/nextcloud/config/config.php | grep version
      'version' => '25.0.5.1',

     

    All of these should be in agreement. I suspect that they are not because of a previous failed install.

    I would guess that you are actually on 23.x or 24.x but the installer thinks you are on 25.x and it trying to take you straight to 26.0

    You need to bring them all back so the system thinks it's on the correct version then it should be happy to upgrade and all going well, no further problems. Here is a blog that walks through the issue. Just keep in mind that since you are using the LinuxServer.io docker the path to the files above is slightly different than what is in the blog. Also it is possible depending on what version you are going from, you might need downgrade the docker by using a specific docker tag, but I wouldn't do that unless you hit a problem.

     

    NextCloud have some nice instructions on the normal upgrade process if you want to get your head around it.

    • Like 1
    • Thanks 1
  14. That looks fine.

    It's just warning you that it might timeout due to the size of the update.

    I have found that can happen but you just re-run the update and it continues where it left off.

    Just give it a try or you can perform the update from the command line which should work now that you have updated to docker.

    • Thanks 1
  15. 2 minutes ago, gevsan said:

    However even if i try to acces nextcloud from domain or local I allways get this message:

     

     

    This is what happens when you upgrade NextCloud (so it needs a newer PHP 8.x) but don't upgrade the docker (has old PHP 7.x).

    Which docker are you running and what version?

    It sounds like you are stuck on an old version.

    Make sure your tag is set to "latest".

    • Thanks 1
  16. 20 hours ago, gevsan said:

    How do I upgrade the GUI?

     

    This is taken from a post I did in Feb which was about the same issue of PHP and NextCould being out of sync...

     

    Unlike most docker software, upgrading the docker does not upgrade NextCloud itself. NextCloud needs to be upgraded from within its own web interface. (Click on "administration settings" in your profile icon in the top right corner of your Home Screen. That should take you to the Administration Overview link in the left hand toolbar. Scroll down and you should see an Update heading. See the attached image.) 

    I suspect that you have not upgraded NextCloud in such a long time that the docker environment and the software are now too far out of sync to be compatible.
    Probably the easiest fix would be to downgrade your docker. Then from the NextCloud web interface, you can upgrade to the latest and then upgrade the docker again.
    You can manually set the repository from within the docker settings.
    Try going back to the docker for 24.0.6 from a few months ago.
    If you are using the docker from linuxserver.io then you can see all the available tags on their page.
    Just edit the NextCloud docker un Unraid and change the repository line to read lscr.io/linuxserver/nextcloud:<tag> where <tag> is the version you want to roll back to. Once you are done, just set it back to "latest".

    Screenshot 2023-04-23 at 2.44.52 pm.png

    • Like 1
  17. 6 hours ago, Wong said:

    Recently just updated my Nextcloud docker to 26.0.0 Can anyone guide me on how to solve the security red warning here?

     

    Since Nextcloud 26, the default nginx config has changed.
    Open the NextCloud docker terminal and edit the file /config/nginx/site-confs/default.conf

    Change the line 

    add_header X-Robots-Tag “none” always;

    to

    add_header X-Robots-Tag “noindex, nofollow” always;

     

    Restart and you should be good. You check your Nextcloud headers before and after at: https://headers.4tools.net/

    • Upvote 2
  18. I know that this has been asked a few times but I couldn't find an answer.

    I have a home network with multiple VLANs. (home, IoT, guest, cameras, etc)

    They are pushed to my Unraid server over a trunk port from my switch.

    I have several dockers that need to exist across several VLANs to provide services into more than one.

    How can I add a second/third network interface to a docker?

  19. 2 hours ago, Tharnax said:

    Please disregard, after opening the config.php file in a different application I see where I omitted a comma in one of the statements.

    The advantage of using something like VS Code to edit config files. As soon as you stuff up the syntax it's really obvious. Now don't get me wrong, mad respect for the vi diehards but I'd rather not waste time on silly errors.

    • Like 1
  20. Hard to say if this is exactly your issue but make sure you have your internal DNS pointing to the nextcloud server directly or the nginx servers internal address, not your external address.
    Otherwise you are trying to bounce traffic via your router/firewalls external IP address which will be blocked.
    I put a post up on the valtwarden forum a while back about a similar issue they have where all traffic has to be HTTPS so it is best to bounce both internal and external traffic through the nginx proxy.
    This is not quite what your trying to do but the DNS principle is the same.
    Ext DNS: cloud.mydomain.com -> my_ddns_ext_ip
    Int DNS: cloud.mydomain.com -> either nginx or nextcloud server
    Hope this makes sense.
    https://github.com/dani-garcia/vaultwarden/discussions/1749#discussioncomment-4701804

  21. That's really strange. I'm running the latest Unraid 6.11.5 and the latest NextCloud docker (from linuxserver.io) and both are on v7 of PHP.
    Of course it is the version included in the docker image (not Unraid) that matters.
    Oh, hang on a sec... Wah! I'm on the latest NextCloud (25.0.3) but not on the latest docker. For some reason (lost to time and my poor memory) I changed the docker Repository from "lscr.io/linuxserver/nextcloud:latest" to "lscr.io/linuxserver/nextcloud:23.0.0"
    Well that explains why I'm not on v8 of PHP inside the docker, and I'm getting warnings in the NextCloud logs. LOL
    Anyway back to your issue. Unlike most docker software, upgrading the docker does not upgrade NextCloud itself. NextCloud needs to be upgraded from within its own web interface.

    I suspect that you have not upgraded NextCloud in such a long time that the docker environment and the software are now too far out of sync to be compatible.
    Probably the easiest fix would be to downgrade your docker. Then from the NextCloud we interface, you can upgrade to the latest 25.0.3 and then upgrade the docker again.
    You can manually set the repository from within the docker settings.
    Try going back to the docker for 24.0.6 from a few months ago or even 23.0.0 like me (argh).
    If you are using the docker from linuxserver.io then you can see all the available tags on their page.
    Just edit the docker and change the repository line to read lscr.io/linuxserver/nextcloud:<tag> where <tag> is the version you want to roll back to. Once you are done, just set it back to "latest".

    Edit: Updated for changes in repository format...

    • Like 2