It looks like my homeassistant file system is readonly except for opening up samba share folders to config files location - should I be mounting the files from the RPi to the samba shares and how would I map/redirect the file locations for the HassOS?
I would say it would be easier to install Caddy on both machines, and reverse_proxy from the publicly accessible one to the other which is hosting nextcloud, instead of worrying about filesystem stuff.
So Iād install Caddy on the RPi Nextcloud (Internal) and reverse proxy from the HA add-on of Caddy (External). What would a proxy like this look like to get Nextcloud accepting the http from the HA add-on?
Is this where your code such as this comes in? nextcloud.mydomain.com {
reverse_proxy https://nextcloud.roadrunner {
header_up Host {http.reverse_proxy.upstream.hostport}
header_up X-Forwarded-Host {host}
}
}
If I have a config like this Iām getting 400 bad request sent http to https error on nextcloud, is there an easy solution port is 443, should I be moving off of that port up to a different one so that the reverse proxy coming funneling through is only http expected?
I have the port changed to 880 & 8443 and have a valid cert pulling up for the page Caddy config is implementing. Iām getting the webpage timing out and have tried changing the reverse proxy setting to https://192.168.1.XX:8443.
Iāve added the computer that is doing the reverse proxy as a trusted proxy in the config.php and added āforwarded_for_headersā => array(āHTTP_X_FORWARDED_FORā), and set āoverwriteprotocolā => āhttpā, (Iāve actually tried this set to both https and http).
So youāre running two instances of Caddy now, right? What are the configs for both? What are in your logs on both (make sure to turn on the debug global option to see full logs)?
Iām confused as to where youāre at, at this point. Could you recap what you have set up now? It would help if you paint a picture of your networking setup and what youāre trying to do.
Sure, I have Caddy2 add-on for HA setup on a VM HassOS on a Mac and serving a reverse proxy to a separate RPi with NextCloud instance moved to port 880 and 8443. I can access my unsecure login from the local network by the https://ip_address:8443. when I access the network by the external domain name using browser I get a blank screen and using curl I get a 502 bad gateway message, Server: Caddy, content-Length: 0.
My goal is to have the external site be secure for accessing Nextcloud Talk feature and not have to open up port 443 on the router as you would if you were having Nextcloud do the letsencrypt route. I also think in network design, I would want my external domain to have the certs for ssl and my internal network to communicate over https but not be using ssl.
Iām not quite sure how a secondary caddy server on the Nextcloud RPi would help to accomplish the handshake between the 2 servers ā ahhhh, unless you just mean set up a separate Caddy for the Nextcloud all by itself and not have it worry about the Caddy on the HA server, of course that makes sense. Same technology just reduce the middle routes altogether.
I think that I want to use the config of the Caddyfile from the 1st comment, but insert ālocalhostā is it port 9000 or 8443 for NextCloud? all examples Iāve seen have port 9000 used and Iām not sure if that is correct for my instance.
Iām not sure where the Caddyfile is stored and how to reference it when you type caddy run?
Iāve figured out how to save the caddyfile and use it, now Iām wondering if I want the initial config that has the config for nextcloud adapted off of someone in the communities V1 to V2 file or if I want to simply have the reverse proxy setting?
I have Caddy running on the Nextcloud Server and it issued a cert for the reverse proxy, but the website is saying 400 bad request youāre speaking plain http to an SSL-enabled server port.
Once youāre in your own network, thereās no reason to proxy over HTTPS, unless you have reason to believe something could intercept requests between Caddy and your upstream, maliciously.
Itās Caddyās job to encrypt connections between itself and the clients (browsers). Once the request reaches Caddy, itās inside of your own network. It doesnāt need to be re-encrypted to communicate with Apache.
but the nextcloud instance is https with the domain setup and the SSL certfile and key established and the reverse proxy is http on the local domain - so Iām getting the error. Do I need to take off SSL setting off of the apache2 instance running my Nextcloud and if I do that does that take off the security that is required to run talk add-on?