Troubleshooting Nextcloud

trusted domain - Troubleshooting Nextcloud

Troubleshooting

- trusted domain
    - go to: nextcloud/config and edit the config.php
    - find: "trusted_domains" and add the domain you want to trust

'trusted_domains' =>
  array (
    0 => 'box.danicus.net',
    1 => '192.168.1.1',    (put in yourown ip address)

- **Note:** it's the domain you GO TO to access NextCloud...not where you're trying to access FROM.

Mobel app

Error message    
    "no HTTP connection allowed"
Go to nextcloud config file, config.php and add 
`'overwriteprotocol' => 'https', `


Upload failed request entity too large - Troubleshooting Nextcloud

"Upload failed request entity too large"

If you have a proxy, go into the config file and change the "client_max_body_size" line. If that line isn't there,  add it under the http section.

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        client_max_body_size 1000M; #(right here)

        sendfile on;
        tcp_nopush on;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

I didn't have a line at all so I just put it in there. 

Docker Container keeps restarting - Troubleshooting Nextcloud

This case, it was already working. Ended up pulling a new image but didnt know it. 

First, check docker logs. Run the container and let it keep restarting so that it will give you an error log. 

docker logs <nextcloud_container_name>

Error said:
Initializing nextcloud 31.0.1.2 ...
Can't start Nextcloud because upgrading from 29.0.0.19 to 31.0.1.2 is not supported.
It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16.

That means files/data is for version 29 and i need to incrementally go up to V31.

Lets get the versions in between to install it correctly.

If the containers are running. stock them.

docker-compose down

Check Your Current Data

Your Nextcloud data (files and database) is tied to version 29.0.0.19. Ensure your volumes (./nextcloud and ./mariadb) are intact, as they contain your files and database. If you have backups, now’s a good time to confirm they’re ready—just in case.

Upgrade Step-by-Step

You’ll need to run intermediate versions of Nextcloud to perform the upgrades. Modify your docker-compose.yml to pull specific versions, starting with the next major version after 29.

Upgrade Step-by-Step

services:
  nextcloud:
    image: nextcloud:30
    # ... rest of your config ...
  mariadb:
    # ... no change needed here ...
docker-compose up -d
docker-compose logs -f

Upgrade to 31.0.x

docker-compose down
services:
  nextcloud:
    image: nextcloud:31
    # ... rest of your config ...
docker-compose up -d
docker-compose logs -f

 The upgrade from 30 to 31 should proceed. Once complete, your Nextcloud should be fully operational on 31.0.1.2.

Error message : Update needed

Error message;  (when loading nextcloud frontend)

Update needed
Please use the command line updater because updating via browser is disabled in your config.php.


After updating Nextcloud to new version, it gave me that error message. 

Basically, you need to update the database to work with the new version. Here is how to do that. 

. Access the Nextcloud Container

Look for the container running nextcloud:30 (or whichever version).

Run the Updater

If that worked, great! your dont with the update.

The first time I did this, it did not work. 
     You may need to take it off of maintenance mode in order to try it again.

Removing maintenance mode:

Inside the docker container, in the /var/www/html directory 

php occ maintenance:mode --off
now try the update again.