Skip to content

TLS certificates don't persist #1349

Closed

Description

@curious-broccoli

"Problem" with hosting own instance

As stated in the wiki caddy requests a new certificate because the caddy data isn't persisted through restarts. Is this behavior intended? Because it shouldn't be much work to make the data persist. I think the issue is that the target location of the bind mount at

- ./certs/caddy:/etc/caddycerts
points to the wrong location and an environment variable should be set so that it works, as stated in the caddy container's instructions.

On my fork I also upgraded to Caddy 2 but the change to make it persist was to simply fix the bind mount location (curious-broccoli@d8114bf) and it seems to work.

Activity

  1. Didayolo commented on Mar 12, 2024

    @Didayolo
    Member

    Thank you for reporting this. I think we had issues with this in the past, especially when we were restarting the server multiple times we encountered issue obtaining a Let's Encrypt certificate.

    I thought this was resolved. At least, I think we changed the server configuration to avoid this problem on our setups.

    We'll have a look at it. Thank you for the proposed fix.

  2. added
    Discussion
    on Mar 12, 2024
  3. linked a pull request that will close this issueFix the Caddy bind mount location #1360on Mar 12, 2024
  4. ihsaan-ullah commented on Apr 12, 2024

    @ihsaan-ullah
    Collaborator

    @curious-broccoli why have you replaced ./certs/caddy:/etc/caddycerts by ./certs:/data

    In the caddy documentation they are using /etc/caddycerts

  5. curious-broccoli commented on Apr 12, 2024

    @curious-broccoli
    ContributorAuthor

    Uh, the commit I linked is for the official caddy 2 image that I use on the fork.

    The /etc/caddycerts is fine to use, but that example requires setting the environment variable to work.

    CADDYPATH=/etc/caddycerts
    

    as stated in the part of the docs you linked. So I think you just gotta set that.
    Sorry for any confusion.

  6. Didayolo commented on Apr 16, 2024

    @Didayolo
    Member

    @ihsaan-ullah In conclusion, do we merge or close #1360 ?

  7. linked a pull request that will close this issueCaddy #1424on Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions