Add-on request: nextcloud

Hi, this is what I do. On the version I have on my repo you can mount a local or smb drive and use it as a primary data location on add-on initialisation

It also allows mapping HA ssl certificates and many other options such as automatic ice installation or updates

I got error “Error when assembling chunks, status code 504” when upload file 16GB, could you help me.
I edit /config/nginx/site-confs/default but still error.

Hi, this is likely due to timers according to : Error when assembling chunks, status code 504 - ℹ️ Support - Nextcloud community

You could modify the file as in this commit on my add-on : Increase max times ¡ alexbelgium/hassio-addons@279dec8 ¡ GitHub

1 Like

Will I reinstall your addon?
Thanks!

still error “Error when assembling chunks, status code 504” :frowning:

@alexbelgium Thanks for creating an addon with all the options.
I have used your version to add a local plugged in HDD.
This is what I see in the log:

/etc/cont-init.d/00-local_mounts.sh: executing
---------------------------------------------------
[23:21:08] INFO: Available Disks for mounting :
NAME         LABEL         SIZE FSTYPE RO
└─sda1       myCloudDrive  3.6T btrfs   0
---------------------------------------------------
Supported fs :  ext3 ext2 ext4 squashfs vfat msdos fuseblk btrfs
Inspired from : github.com/dianlight
---------------------------------------------------
Local Disks mounting...
... myCloudDrive is a device by label
[23:21:09] INFO: Mounting myCloudDrive of type btrfs
[23:21:09] INFO: Success! myCloudDrive mounted to /mnt/myCloudDrive

When I use ‘/mnt/myCloudDrive/nextcloud’ for the data dir, I will get no error and i am able to start Nextcloud.
When I look in settings - systems I see 2 drives:

When I upload a large file then it is stored on the first mount /ssl.
What do I need to fill in with initial installation to get the data dir on myCloudDrive?
I also tried /share/myCloudDrive/nextcloud/ which gives an error of not being able to read write to.

Could you or anyone please help me out?

So i used the samba share option with the Samba NAS addon.
I now get the following error.:

Your data directory is readable by other users.

Please change the permissions to 0770 so that the directory cannot be listed by other users.

The addon options seem to give the option to set permissions.

data_directory: path for the main data directory. Defaults to `/share/nextcloud`. Only used to set permissions and prefill the initial installation template.

On Reddit I read that in Open Media Vault it is apparanty possible to disable data directory permission: “check_data_directory_permissions’ => false”

@alexbelgium or Does anybody know how to use the data_directory option to set the correct permission or how to disable data directory permission check?

Hello! I had disabled this check in the addon code : this means the error message appears but it should still load. Or doesn’t it ? If it doesn’t, there is a bug in the code. Could you please post a full log on my GitHub repo ?

Hi, the data directory is fixed when performing the initial wizard to set up the addon. The addon option of data directory only sets the permissions. In your startup addon log, the current data directory is described in the configuration phase. Your most likely action would be to unusual the addon, reinstall it, perform the wizard with the new data directory and readd your files

Hi, I abandoned the project and deinstalled everything.

1 Like

Hey @alexbelgium awesome nextcloud addon.
I got it installed and working within my hassIP:port…

My config:

Full_Text_Search: false
OCR: false
OCRLANG: en
PGID: 1000
PUID: 1000
additional_apps: inotify-tools
certfile: lopezweb-origin.pem
elasticsearch_server: <ip:port>
enable_thumbnails: true
keyfile: my-privkey.pem
trusted_domains: https://mycloud.cloudflareddomain.com, ip_of_my_hass
use_own_certs: false  "(tried both true and false)"
default_phone_region: US

I use Cloudflare tunnel, any idea how to make trusted_proxies work so I can access from outside the network?
I tried addiong to the /homeassistant/addons_config/nextcloud-ocr/config.yaml
with:

 TZ: US/Eastern
 trusted_proxies: 172.30.33.0/24, my_network_ip_range/24

No success, any ideas appreciated it.

Deleted as requested below

2 Likes

Awesome, thanks for the prompt response.
Im getting an error:

Log:

[21:13:22] INFO: Currently set trusted domains :
/./config/addons_autoscripts/nextcloud-ocr.sh: line 9: LAUNCHER: unbound variable
Error : /etc/cont-init.d/01-custom_script.sh exiting 1

Referenced line:
$LAUNCHER config:system:get trusted_proxies || bashio::log.info "No trusted proxies set yet. The first one will be set when doing initial configuration"

Any ideas?

Trusted_proxies: yes I think it would be great to have it within the addon options as Im sure a lot people are using proxies to point to their nextcloud installation… if possible, of course.

update:
I disabled TLS verification within cloudflare and was able to get the splash screen “Access through untrusted domain” which is weird since its the same domain from the config.

is there a way to not force https? reason is cloudflare does the tunnel and serves the https…ie:
hass is ip:8123…I point cloudflare tunnal to that ip and specificy the domain I want hass.mydomain.com and vuala… access through https

An element was missing, I’ve updated the code above

I’m using a container made by linuxserver and they seem to have a very strong opinion alas against disabling https… Make SSL Optional · Issue #206 · linuxserver/docker-nextcloud · GitHub

Thanks for the update… after this, then add “trsuted_proxies” to config in: /homeassistant/addons_config/nextcloud-ocr/config.yaml ???

Well the idea was that the code executes an occ command (nextcloud command line) to add it in its config so it should be good as such, just adapt the TRUSTEDDOMAINS="172.30.33.0/24,myiprange/24" line

so those would be the trusted proxies… is just that it said trusted domains…
I figure the way to make it work without the script, issue now is that something still gets blocked and I get the “no trusted domain message when loggin” from the "clud.mydomain.com

Have you tried to add in the trusted_domains the versions with ports? If I remember correctly the script automatically adds http and https but not sure. I think the trusted domain needs to be exact for it to work

Nextcloud really has complicated security rules…