this post was submitted on 04 Apr 2025
1 points (66.7% liked)

nextcloud

866 readers
1 users here now

Nextcloud is a suite of client-server software for creating and using file hosting services.

https://nextcloud.com/

https://github.com/nextcloud

IRC: #nextcloud on libera.chat
Matrix: #nextcloud:matrix.org

Other Nextcloud communities on Lemmy

founded 4 years ago
MODERATORS
 

cross-posted from: https://lemmy.ca/post/41737442

I run Caddy as my reverse proxy. I find it generally easier to configure than NGINX. I've never tried Traefik. I'm having a hell of a time getting Collabora office working with my NextCloud instance (both via docker) though. Has anyone else successfully done this? I'm not sure if its because I haven't translated the config correctly from the NGINX example, or that it just doesn't work.

I would love to see somebody's config if they have it working.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 4 weeks ago (7 children)

I have! But I don't have time to post it now. I'll try to send an update in the morning.

[–] SteveDinn 1 points 3 weeks ago (6 children)

You didn't forget about me, did you? :(

[–] [email protected] 2 points 3 weeks ago (4 children)

Yes Yes I did, sorry! Collabora CODE server configuration in Caddy.

office.DOMAIN {
        @collabora {
                path /browser
                path /browser/*
                path /hosting/discovery
                path /hosting/capabilities
                path /loleaflet/*
                path /lool/*
                path /cool/*
        }
        @local-ip {
                remote_ip private_ranges
        }
        reverse_proxy @collabora https://nextcloud-office:9980/ {
                transport http {
                        tls_insecure_skip_verify
                }
        }
        reverse_proxy @local-ip nextcloud-office:9980 {
                transport http {
                        tls_insecure_skip_verify
                }
        }
}

Nextcloud section, may look different from yours I use the FPM image but it should be similar, enough. There are also some limitations on the urls based on local vs public access but that is an attempt at hardening rather than necessary configurations.

nextcloud.DOMAIN {
        root * /var/www/html

        file_server

        php_fastcgi nextcloud:9000

        header {
                Strict-Transport-Security max-age=31536000;
        }

        @phpFiles {
                path_regexp phpfile ^/(remote|public|cron|core/ajax/update|status|ocs/v1|ocs/v2)\.php
        }

        rewrite @phpFiles {http.regexp.phpfile.0}

        redir /.well-known/carddav /remote.php/dav 301
        redir /.well-known/caldav /remote.php/dav 301

        @local-ip {
                not remote_ip private_ranges
                path /settings/admin
                path /settings/admin/*
                path /settings/users
                path /settings/users/*
                path /settings/apps
                path /settings/apps/*
        }
        #respond @local-ip 404

        @forbidden {
                path /.htaccess
                path /data/*
                path /config/*
                path /db_structure
                path /.xml
                path /README
                path /3rdparty/*
                path /lib/*
                path /templates/*
                path /occ
                path /console.php
        }
        respond @forbidden 404
}

Then in nextcloud you just point it to the CODE server domain above & you even have tls securing the communication layer.

[–] SteveDinn 2 points 3 weeks ago

Thankyou! Nextcloud itself wàs never a problem, but the Collabora stuff would just not work properly with any config I tried. I'm going to make another attempt with these settings as soon as I get the chance.

load more comments (3 replies)
load more comments (4 replies)
load more comments (4 replies)