Hey! On the weekend I was sorting out my e-book collection and thought it might be interesting to set up a library server on my own laptop but on a balena device. It’s one of those projects where since Calibre can be installed from the Debian repositories, it seems something that should be easy to just use. On the contrary, I ended up sorting out a bunch of little issues, as well as adjusting the setup for more hands-off, more automated provisioning. These included:
- containerize the application, with non-privileged containers, and persistent volume for the library
- running the server with (hopefully) better default settings
- automate adding a user to the server (script Calibre’s interactive user management with expect), as well as helper scripts to manage users in this environment
- adjust the container environment so that the Bonjour announcement works well for local network
You can find the code here:
If you enable the Public Device URL for the given device, you can connect to the library remotely (including uploading and reading books):
On the local network, Calibre Companion should also be able to auto-discover the server, and connect to it (with the username/password set):
Hope you find this useful, and let us know your experience if you tried it out!