Kirby User Account Persistence

Is it possible to configure the kirby user accounts directory? Or to use a database instead of the flat file persistence in site/accounts?

We have deployed kirby into our infra under docker and kubernetes. Each deployment pulls new code from github and creates a new container from it. Users created in one container do not persist into the next, so we lose accounts with each deploy.

If I can configure the user accounts directory I can point it at a persistent EC2 volume, which can be attached to the container on deploy. Is this possible?

Or even better, is there an easy way to persist users into a database (instead of the flat files)? Obviously I don’t want to have to rebuild the way kirby handles users, so if this is a drop in change this would be ideal.

kirby has very good mysql / sqlite integration, you could integrate that as well instead of using the flat file user part (except panel i imagine…)

I’ve looked into this, but as I mentioned I don’t want to have to rewrite the way that kirby handles users. Goal of using kirby was do let it do the work. I’m looking for a ‘drop in’ solution for moving users away from flat file storage in site/accounts before trying to override the code much.

Without modifying the core, you can’t change user persistence.

You could, however, try with a custom folder setup:, don’t know if that works with an external EC2 volume, though.

Another possible option: use flat files, but copy them to database, then recreate user accounts from db on deploy.

Thanks. I tried this as well and I was only able to get the site folder to reconfigure. Is it possible to get the subdirectory (site/account) to point somewhere else?

If not, seems like the best solution is just not to use containers, which is totally fine.

Starting with Kirby 2.4.0, you should also be able to configure each subfolder of the site folder separately.