Added Nextcloud to BigBearCasaOS

About

Nextcloud puts your data at your fingertips and under your control. Store your documents, calendar, contacts, and photos on a server at home, at one of our providers, or in a data center you trust.

App Store

Instructions

Nextcloud requires you to add a trust domain, and I made a script to easily add your LAN IP to the config.php.

bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/casaos-add-lan-ip-to-nextcloud-config/run.sh)"

Instructions for ZimaOS

  1. Open the files app.

  2. Go to /DATA/AppData/big-bear-nextcloud/html/config/config.php

  3. Replace

'trusted_domains' => 
  array (
    0 => 'localhost',
  ),
  1. with
'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '[YOUR_ZIMA_OS_IP]',
  ),
  1. Restart the Nextcloud app.

Pls show me the way how can I update the new version. It is better if web updater button is available. But now just download button appears. Here is the update available notification screen shot.


Thanks for your effort.

You should get automatic updates from BigBearCasaOS.

1 Like

root@5d564091436a:/var/www/html# sudo -u www-data php occ app:update

Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
The current PHP memory limit is below the recommended value of 512MB.
How can I eliminate this error?

You can set environment variables:

environment:
  - PHP_MEMORY_LIMIT=1024M
  - PHP_UPLOAD_LIMIT=1024M

You can set it in the app settings in CasaOS.

1 Like

Loved the vid, it got me really started with my own homeserver.
There just seems to be a problem with the cron docker? ( or i might of messed something up in the configs).
I keep getting:


one of these errors regarding what i put in the field for overwrite.cli.url in the config.
localhost:7580 → libcurl err 7
X.Y-Z.ts.net (it’s domain in my tailscale net) → libcurl error 6
comment the line out → libcurl error 3

any help figuring this out would be greatly appreciated.

PS.
The auto update feature that @Smart_Sync was asking after just works if you wait a day or 2 and then press the check then install button on the casaos homepage.

Awesome! Glad to hear!

Localhost is not going to work in a docker container since it’s isolated. ts.net is not going to work in the Docker container because the Docker container is not using the Tailscale network.

Could I get more information on your environment variables and what you have changed?

Now that you said that i feel dumb. :sweat_smile:.

I found the problem.
I had turned on the internal CODA server via de admin panel. This was the part that was throwing the errors.
So i “fixed” it by disabling CODA.
But i saw someone else on here with a same-ish question for a video idea.
I guess i’m gonna wait till that vid comes out.

thank you for the explanation!

I’m seeing this log thousands of times in the db-nextcloud logs
db-nextcloud | 2024-04-20 15:25:17.563 UTC [2904] FATAL: database "casaos" does not exist

The only thing I can see in the compose file that this might be referring to is pg_isready -U casaos in the healthcheck section. From what I understand, db-nextcloud is pinging for a database called ‘casaos’ over and over without a resolution. I am correct in this thought process? Is this error causing any issues in my instance?

1 Like

Thanks for letting me know. I did push an update for it:

Great video! you’re really helping get my home server set up! When i try to run the script i get this error

sudo bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/casaos-add-lan-ip-to-nextcloud-config/run.sh)"
Segmentation fault

Apparently the ‘segmentation fault’ didn’t have any affect on the installation and I was able to open Nextcloud just fine.

However, I need my main data folder to reside on an external disk and I have no idea how to set that up. Is there a way to configure this during setup because trying to do it after setup seems like a major pain.

Thank you! That’s awesome to hear glad I could help get you started.

Could you try to run this:

sudo bash -c "$(wget -LO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/casaos-add-lan-ip-to-nextcloud-config/run.sh)"

Might give us more info.

You can check out this tutorial:

I have had issue when using the local hostname of the machine to access the nextcloud app, this was because the hostname was not in the trusted domains. Had to manually add entry for casaos.local in the trusted domains.

Is it possible for the script to access the machine hostname and also add that to the trusted domains?

Salam, I have followed the Bigbear tutorial on how to install Nextcloud and MariaDB, But I can’t get into Nextcloud either from my local network OR from the Cloudflare tunnel.

Any help will be appreciated , thanks in advance!

What do your app settings in CasaOS look like?

Additionally, have you set the following environment variables in your Nextcloud Docker container?

- TRUSTED_PROXIES=yourdomain.com
- OVERWRITECLIURL=https://yourdomain.com
- OVERWRITEPROTOCOL=https
- NEXTCLOUD_TRUSTED_DOMAINS=yourdomain.com
- OVERWRITEHOST=yourdomain.com

Replace yourdomain.com with your actual domain from the screenshot.

For the container port, you can set it to 80 and have the proxy handle SSL termination. This ensures that all incoming traffic is secured via HTTPS and forwarded to your Nextcloud instance over HTTP.

1 Like

Excuse me, Now I have another problem far from the first one, wich declared in the screenshot when I tried to install an app (In my case not typically an app :slight_smile: ).

Edite: The button for Privileges in caseos for nextcloud is disabeled , I don’t know is this cause the problem also I don’t know what the job of this.

Can you set this in your environment variables:

TEMP_DIRECTORY=/var/www/html/tmp
1 Like

Check Ownership and Permissions on /tmp

  1. Check Ownership and Permissions of /tmp: You can list the details of the /tmp directory inside the Nextcloud container to verify its current ownership and permissions:
sudo docker exec nextcloud ls -ld /tmp
  1. Set Correct Ownership and Permissions: If the ownership or permissions are not correct, you can set them using the following commands:
sudo docker exec nextcloud chown -R www-data:www-data /tmp
sudo docker exec nextcloud chmod -R 755 /tmp

Verifying the Changes

After setting the permissions, you can verify them again:

sudo docker exec nextcloud ls -ld /tmp

This should show that the /tmp directory is owned by www-data and has the correct permissions.

1 Like