Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panel v1.11.3 - Cannot make caddy use certificates #155

Open
Kintull opened this issue Oct 6, 2023 · 2 comments
Open

panel v1.11.3 - Cannot make caddy use certificates #155

Kintull opened this issue Oct 6, 2023 · 2 comments

Comments

@Kintull
Copy link

Kintull commented Oct 6, 2023

Hi, thanks for the great work making this repo.

I used the start guide, generated the cert and the key using certbot.
I set variables SSL_CERT and SSL_CERT_KEY in panel.env. After I start panel, in logs I see

docker-compose logs -f panel
pterodactyl-panel-1    | [tls-config] Cannot find SSL certificate and/or key, not injecting tls rules.

I connected to the panel pod with /bin/sh checked that variables are set in the environment, executed the entry point tls-config helper and got this:

sh-5.1# ./entrypoint.d/20-tls-config.sh
[tls-config] Using external certificates. 

It means the code does see the varialbles. Any idea why it does not work for the panel starting procedure? Any tips on how to debug?

---- Update
the problem happens when executing as caddy user

[root@ecee86afbe49 /]# runuser --user caddy ./entrypoint.d/20-tls-config.sh
[tls-config] Cannot find SSL certificate and/or key, not injecting tls rules.
@Kintull
Copy link
Author

Kintull commented Oct 6, 2023

Found why this was happening - on the host machine after executing docker-compose run --rm --service-ports certbot certonly -d <domain>, created conf.d/letsencrypt/live and archive folders had 700 mode, after changing the mode to 755, caddy user could access the certificate files.

@ccarney16
Copy link
Owner

Documentation will likely have to be updated in the future. I am actually going to be phasing out certbot in favor of using a reverse proxy. But I will have to look further into certbot as I have forgotten about the user permissions for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants