Install Caddy V2 with FreeNAS or FreeBSD

@Mohammed90 You are not going to believe this!

I sent Christer Edwards this communique a couple of hours ago:…

Hi Christer,

I’ve been asked by the Caddy folk to see if I can help out with creating a Bastille template for Caddy that I believe they would like to have considered for inclusion in the templates repository.

I have zero experience with Bastille, some exposure to FreeBSD, but quite a lot of exposure to TrueNAS, a NAS appliance built on FreeBSD. I’ve outlined an approach I thought might work, but I’m having my doubts now after reviewing the templates section of the Bastille documentation. Please refer to this TrueNAS community thread for details Bastille template for Caddy.

I’m hoping, after having a look at the TrueNAS and Caddy threads that I’ve linked to, that you can give me some pointers on how I should commence my journey with Bastillle and template creation, and the process I should follow to get to the point of submitting a template to you for review.

Regards,

Basil

An hour later, Christer responded with this…

Hi Basil,

Thank you for reaching out to me and I’m happy to help! I had some free time while I was winding down today so I threw together a Caddy template for you. Actually, one of your snippets in the Caddy community thread had about everything needed.

We’ve designed the templates to be (hopefully) intuitive. The syntax you’d use on the command-line is generally what you’d use in the Bastillefile template.

Disclaimer: I haven’t used TrueNAS very much and it’s been a few years since I used iocage. Having said that, if you have Bastille installed on the host system (I have seen them side-by-side before) you should be able to use the template(s) easily.

https://gitlab.com/bastillebsd-templates/caddy

Instructions are in the README for bootstrapping and applying the template.

I’ve tested in my homelab and updated the CI/CD pipelines to do validation as well. The results should reflect in the GitLab repo soon.

I hope this helps. If you have any more questions feel free to ask.

Cheers,
Christer

Thanks to Christer’s :gift:, Caddy is now included in the Bastille templates repository BastilleBSD-Templates · GitLab

4 Likes