You can check the source code here
I downloaded the code and checked how it worked. I was even thinking of replacing PostgreSQL with SQLite, to simplify that requirement (I think PostrgreSQL is overwhelming for a small site like that), but having the simple option of enjoying a version ready in a few clicks worked better for me at that time.
I wrote a little bit about why I won't self-host my smol.pub for now