damien
Lets encrypt renewal & runtime config
Hi,
I have set up a VPS, installed certbot and managed to run Phoenix 1.5.7 using HTTPS.
The paths to the key and cert files from lets encrypt are read by phoenix from ENV variables in the prod.secret.exs file.
The files will be renewed automatically by certbot every 3 months using a cron job.
I can’t find answers to the following questions:
-
How to deal with the renewal of the keys on the Phoenix side? Do I have to restart the Phoenix server or will Phoenix read the updated files in due time?
-
Would the situation be the same with the new elixir runtime config files?
I would appreciate any insights on these issues which are new to me.
Thanks in advance for your help.
Most Liked
sasajuric
If those files are updated, I think you don’t need to restart anything and the new certs will be eventually picked up. FWIW site_encrypt forces this manually by invoking :ssl.clear_pem_cache.
crova
While I don’t know the exact answers to your questions, maybe you can find some insights from this library.
And if you would accept bringing a dependency to your app, you could use the library to manage your certificates and eventually ditch certbot.
sam701
I use traefik running in front of my app. It cares about the certificate renewal and also routing.
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #elixirconf-us
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









