-
*** SOLVED, SEE BELOW *** Hello, The plan is to do a fresh install of teslamate in Docker behind a Caddy V2 proxy, which will handle HTTPS through auto-retrieved valid SSL certificates and Basic Auth, and then restore the backup database, but unsure what the ideal docker-compose.yml contents/configuration will be. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Yes that is possible and you should be able to take a look here: I have at least a setup close to this, except that I've added some additional auth on top :) |
Beta Was this translation helpful? Give feedback.
-
Thanks @tobiasehlert I knew I saw this somewhere :-) After a lot of work and support from https://caddy.community/u/francislavoie on the Caddy forums I managed to get this installed from scratch and working, as follows: 1 - Secure setup using Caddy proxy (pulls SSL cert automatically from Let's Encrypt) - needs un-proxied DNS record, and a firewall forward rule for ports 80 and 443 but only into Caddy. Here are the config files: Portainer Config for "teslamate" Stack (i.e. docker-compose.yml) - note the ${} variables used, you'll need a .env file with all of them!
Note that Grafana was configured in the "teslamate" Portainer Stack / docker-compose.yml to use the teslamate FQDN and the /grafana path using:
Therefore the Caddy config needs to access "teslamate" as Caddy config that accomplishes this (use the "caddy hash-password" command to get the hash):
Hope this helps someone else as well. |
Beta Was this translation helpful? Give feedback.
-
I made some improvements to the Caddy config I am happy to share. This is so Caddy does NOT prompt for Basic Auth credentials when accessing the protected resource from a trusted IP range (the LAN). Note that Grafana will still ask for login to itself via the username and password you setup in the main .env file for the Teslamare Stack. Here is the same Caddy
|
Beta Was this translation helpful? Give feedback.
Thanks @tobiasehlert I knew I saw this somewhere :-)
After a lot of work and support from https://caddy.community/u/francislavoie on the Caddy forums I managed to get this installed from scratch and working, as follows:
1 - Secure setup using Caddy proxy (pulls SSL cert automatically from Let's Encrypt) - needs un-proxied DNS record, and a firewall forward rule for ports 80 and 443 but only into Caddy.
2 - Deployment in Portainer for "teslamate" Stack containing the services:
teslamate:
,grafana:
, postgresdatabase:
andmosquitto:
. Note thatmosquitto:
is OPTIONAL should you NOT need to export data to another system like Home Asssitant.3 - Caddy v2 running as another Docker container ins…