Running a Dockerized Gramps Web instance on a Debian-based server (headless, Ubuntu environment), with an external PostgreSQL service used for both user and genealogy data.
The setup partly works:
Gramps Web UI works (login, user creation, API etc.)
users and trees tables in PostgreSQL update correctly
BUT genealogy data (person, family, event tables, etc.) stay empty — data only appears in the Gramps Web UI and never reaches Postgres.
All GRAMPSWEB_*_URI variables point to the same Postgres DB (grampsdb_pg)
/root/.gramps/grampsdb exists inside the container (appears to be a fallback SQLite database)
Removing it does not force Postgres usage — the directory is recreated
CLI import (gramps -O <tree> -i file.gramps) completes successfully but data is not stored in Postgres
We suspect the sharedpostgresql backend is missing or not activated in the current image.
The file db_sharedpostgresql.py is not found under /usr/local/lib/python3.11/dist-packages/gramps/plugins/db_backends.
Questions:
Is the PostgreSQL backend (sharedpostgresql) still included in the current Gramps Web image?
If not, what’s the recommended way to install/enable it?
Has anyone successfully used Gramps Web with an external PostgreSQL backend recently?
Any working Docker Compose examples for Postgres integration?
System summary:
Debian 12 host
Docker Compose
Gramps Web latest (Oct 2025)
PostgreSQL 16
Redis for limiter
Nginx Proxy Manager (SSL, reverse proxy)
Gramps 6.0.5
Gramps Web API 3.4.0
Gramps Web Frontend 25.10.1
Gramps QL 0.4.0
Sifts 1.0.0
locale: en
multi-tree: false
task queue: false
OCR: true
chat: false
First of all, you need to decide between the `sharedpostgresql` and `postgresql` backends for the Gramps database. The two are very different and also the setup is different. Unfortunately the documentation is not complete, but please see these issues for relevant discussions:
A general warning: using PostgreSQL with Gramps Web is currently considered to be an “experts only” option, simply because it requires additional steps and the documentation is not complete. (Help welcome.)
I can connect and use the user access database fine, but whether I create a new tree in the UI or import one through it, the family tree data always ends up as an SQLite database in /root/.gramps/grampsdb.
If I import a tree from the command line, the data is correctly created in PostgreSQL, but it’s not connected to the Gramps Web UI (the web interface still shows no trees).
Today I started completely fresh with a clean single-tree setup, but the result was the same: Gramps Web just won’t start using PostgreSQL as the family tree backend.
Any suggestions on what could be missing would be really appreciated.
PS. The reason I’m trying to get the PostgreSQL setup working is that I’m building a genealogy environment where Gramps Web shares the same PostgreSQL instance and Docker network with Paperless-ngx, Immich, and Nextcloud.
PPS. I’d be happy to help in documenting a working solution
Gramps Web will not create a new PostgeSQL tree automatically. You have to create the PostgreSQL Gramps database first using Gramps CLI or some other means.
Yes, I know. And that’s how I’m doing it. And Gramps Web uses it well for the Users (access) and other process related but not for the family tree tables (which are duly created when importing a tree_xyz.gramps file into it.) So it seems to force itself to use sqlite for family tree but not for the rest.
Hello again. I’ve tried creating databases with different setups for the single-tree model:
One database ‘grampsdb’ that includes Users, Index and the tree tables.
three databases, one each of those puroposes
In both scenarios, the outcome is the same: Users and Index work fine, but family tree data is stored in a SQLite db.
To check that my PostgreSQL setup is ok, I installed the ‘PostgreSQL’ plugin to my Gramps Desktop, then created a new tree into the very same postgres db container on my server, imported the family tree and everything works fine!
So, now I have Desktop working ok with the PostgreSQL, but can’t get the Gramps Web using it properly.
Since I’m totally new to this community and in the process of migrating the ~30.000 person + extensive media library from MyHeritage Family Tree Builder, I for sure don’t even know where to look and would greatly appreciate any guidance.