Kamal2 letsencrypt - unable to find any configuration information

I have setup and deployed my first docker app with kamal2. Server is running, but when accessing the site, I am getting

Secure Connection Failed PR_END_OF_FILE_ERROR

I suspect this is due to no ssl key having been provided since I didn’t do anything to set this up.

Watching the very good dhh demo on https://kamal-deploy.org/, there is reference to having ssl: true, which I have done, but no reference at to how to configure/setup use of letsencrypt.

I can find information for kamal1 and traefic, but it seems this is not used in kamal2. But I cannot find any information on letsencrypt setup, or where such configuration resides. If anyone can shed some light on this I would be grateful

OK, so now I have got a secure connection working. Whilst I cannot see any reference to Letsencrypt in the setup process, the web page security info definitely says it is a secure connection verified by Letsencrypt.

What I think I have figured out is that the ssl and letsencryt is handled by kamal-proxy which exposes the public url, and the app itself sits behind the proxy on a separate app with its own subdomain that is only on the internal - local network set up by kamal and not exposed publicly.

In the past, when I have set up my own Letsencrypt certificate, I have had to go through an initial manual process to prove I own the domain. But somehow kamal does this automatically. I guess I need to look at the source code to see how this is done.

So kamal really is more ‘Rails magic’. I had no previous experience of using docker when starting with kamal, but apart from the proxy misunderstanding and having to figure out what the docker registry is about, everything else just worked and I have an app working on digitalocean with absolutely zero setup (no user create, no rvm, no nginx, no database etc etc )

(If my understanding is not correct, please respond with any clarification)

Thank you DHH and the rest of the team for this superb work.

ps. I have been using linux with full disk encryption as my primary workstation for many years so have always set up my own pc environment (my preference has always been xfce desktop). I have yet to try Omakub but I like what I see in DHHs video. I was never really very enthusiastic about vim, and tended to prefer nano, using VSCODE for my IDE. But after watching the Omakub demo I am now working to switch to lazyvim. I think with a bit more perseverence I am going to get there - it is already beginning to feel a bit more natural.

I just love the Rails ecosystem

1 Like