SQLite3 implementation of CertMagic

Hi folks,

I’m learning more about Caddy and I saw an opportunity to build a SQLite Storage Backend.

I’d love some feedback or suggestions.


  • I still need to implement Lock and Unlock(yay, distributed locks).
  • I want to implement a docker build
  • I want to make the path configuration standard. (Default to ~/certmagic.db)

Hey, thanks for sharing Chrismar!

What is your use case for sqlite as a storage backend?

I don’t have a use case. I have used SQLite before and thought it would be a good challenge to learn how to build modules.

1 Like

Ooh exciting!! SQLite is the :honeybee:s knees :partying_face:

There are two things to consider:

  • Without WAL, SQLite supports single-writer-multi-reader. I believe locking might be able to leverage this.

  • Locks on NFS is broken, so that might impact any locking mechanism. It’s documented in SQLite’s FAQ:


That said, I wonder how Litestream or LiteFS can affect this implementation :thinking:

1 Like

I had a look at the FAQ and you’re right about single writer. I dare say it could work in WAL mode as the FAQ doesn’t say otherwise.

I’ll look into LiteFS as it seems like they already did the heavy lifting of making distributed stuff work.

Thanks for the feedback!


This topic was automatically closed after 30 days. New replies are no longer allowed.