Nextcloud + missing caddy default configuration

hello,
i am using some script to install nextcloud + caddy in jail. The problem is its configured that caddy is using lets encrypt … i dont need that as i want to use nginx reverse proxy on my other host to add tls/https on top of nextcloud …

is there some generic caddy configuration file for nextcloud?
i use this configuration and believe something minor has to be change so nextcloud will listen on port 80.

the script i am using >

thanks!

{
        # debug
        #acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
        email email@pm.me
        default_sni clode.duckdns.o
}

clode.duckdns.o {
        root * /usr/local/www/nextcloud
        file_server
        log {
                output file /var/log/clode.duckdns.org.log
        }

        php_fastcgi 127.0.0.1:9000 {
                env front_controller_active true
        }

        tls {
                dns duckdns 90ad2f4b-f57b-4f4b-8094-1b04eba21b82
        }

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

        # client support (e.g. os x calendar / contacts)
        redir /.well-known/carddav /remote.php/dav 301
        redir /.well-known/caldav /remote.php/dav 301
        redir /.well-known/webfinger /index.php/.well-known/webfinger 301
        redir /.well-known/nodeinfo /index.php/.well-known/nodeinfo 301

....

}

Hi @heapxor, welcome to the Caddy community.

Having a quick glance over your Caddyfile, I believe it should be sufficient simply to change your site label to specify to Caddy that this is a HTTP site, e.g.:

clode.duckdns.ohttp://clode.duckdns.o

And then strip the tls directive from the configuration (as Caddy will not be managing a certificate for this site).

1 Like

@whitestrake
thanks! i instead replaced it with apache ;-( as i was not able to make it run and was not aware that such a easy change is required.

thanks

1 Like

No worries!

Thanks for getting back to us with an update either way! Hopefully the next person with your question will benefit from this answer.

This topic was automatically closed after 30 days. New replies are no longer allowed.