diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..94da0eb --- /dev/null +++ b/404.html @@ -0,0 +1,1406 @@ + + + +
+ + + + + + + + + + + + + +Using the default Docker image, all necessary configuration can be made from the browser. However, depending on the deployment, it can be necessary to customize the server configuration.
+This page lists all methods to change the configuration and all existing configuration options.
+For the settings, you can either use a configuration file or environment variables.
+When you use the Docker Compose based setup, you can include a configuration file by adding the following list item under the volumes:
key in the grampsweb:
block:
- /path/to/config.cfg:/app/config/config.cfg
+
/path/to/config.cfg
is the path to the config file in your server's file system (the right-hand side refers to the path in the container and must not be changed).
+When using environment variables,
+GRAMPSWEB_
to obtain the name of the environment variableGRAMPSWEB_THUMBNAIL_CACHE_CONFIG__CACHE_DEFAULT_TIMEOUT
will set the value of the THUMBNAIL_CACHE_CONFIG['CACHE_DEFAULT_TIMEOUT']
config optionThe following configuration options exist.
+Key | +Description | +
---|---|
TREE |
+The name of the family tree database to use. Show available trees with gramps -l . If a tree with this name does not exist, a new empty one will be created. |
+
SECRET_KEY |
+The secret key for flask. The secret must not be shared publicly. Changing it will invalidate all access tokens | +
Info
+You can generate a secure secret key e.g. with the command
+python3 -c "import secrets;print(secrets.token_urlsafe(32))"
+
Key | +Description | +
---|---|
MEDIA_BASE_DIR |
+Path to use as base directory for media files, overriding the media base directory set in Gramps. When using S3, must have the form s3://<bucket_name> |
+
SEARCH_INDEX_DIR |
+Path for the full-text search index. Defaults to indexdir relative to the path where the script is run |
+
STATIC_PATH |
+Path to serve static files from (e.g. a static web frontend) | +
BASE_URL |
+Base URL where the API can be reached (e.g. https://mygramps.mydomain.com/ ). This is necessary e.g. to build correct passwort reset links |
+
CORS_ORIGINS |
+Origins where CORS requests are allowed from. By default, all are disallowed. Use "*" to allow requests from any domain. |
+
EMAIL_HOST |
+SMTP server host (e.g. for sending password reset e-mails) | +
EMAIL_PORT |
+SMTP server port. defaults to 465 | +
EMAIL_HOST_USER |
+SMTP server username | +
EMAIL_HOST_PASSWORD |
+SMTP server password | +
EMAIL_USE_TLS |
+Boolean, whether to use TLS for sending e-mails. Defaults to True . When using STARTTLS, set this to False and use a port different from 25. |
+
DEFAULT_FROM_EMAIL |
+"From" address for automated e-mails | +
THUMBNAIL_CACHE_CONFIG |
+Dictionary with settings for the thumbnail cache. See Flask-Caching for possible settings. | +
CELERY_CONFIG |
+Settings for the Celery background task queue. See Celery for possible settings. | +
REPORT_DIR |
+Temporary directory where the output of running Gramps reports will be stored | +
EXPORT_DIR |
+Temporary directory where the output of exporting the Gramps database will be stored | +
Info
+When using environment variables for configuration, boolean options like EMAIL_USE_TLS
must be either the string true
or false
(case senitive!).
This is required if you've configured your Gramps database to work with the PostgreSQL addon.
+Key | +Description | +
---|---|
POSTGRES_USER |
+The user name for the database connection | +
POSTGRES_PASSWORD |
+The password for the database user | +
The following settings are relevant when hosting multiple trees.
+Key | +Description | +
---|---|
MEDIA_PREFIX_TREE |
+Boolean, whether or not to use a separate subfolder for the media files of each tree. Defaults to False , but strongly recommend to use True in a multi-tree setup |
+
NEW_DB_BACKEND |
+The database backend to use for newly created family trees. Must be one of sqlite , postgresql , or sharedpostgresql . Defaults to sqlite . |
+
A minimal configuration file for production could look like this: +
TREE="My Family Tree"
+BASE_URL="https://mytree.example.com"
+SECRET_KEY="..." # your secret key
+USER_DB_URI="sqlite:////path/to/users.sqlite"
+EMAIL_HOST="mail.example.com"
+EMAIL_PORT=465
+EMAIL_USE_TLS=True
+EMAIL_HOST_USER="gramps@example.com"
+EMAIL_HOST_PASSWORD="..." # your SMTP password
+DEFAULT_FROM_EMAIL="gramps@example.com"
+
The most convenient option to host Gramps Web on your own server (or virtual server) is with Docker Compose.
+We will assume that Docker and Docker Compose are already installed in your system. You can use Windows, Mac OS, or Linux as a host system. The supported architectures include not only x86-64 (desktop systems), but also ARM systems such as a Raspberry Pi, which can serve as a low-cost, but powerful (enough) web server.
+Note
+You do not need to install Gramps on the server as it is contained in the docker image.
+Create a new file on the server named docker-compose.yml
and insert the following contents: docker-compose.yml.
This will generate six named volumes to make sure that all relevant data will persist when restarting the container.
+Warning
+The above will make the API available on port 80 of the host machine without SSL/TLS protection. You can use this for local testing, but do not expose this directly to the internet, it is completely insecure!
+The web API must be served to the public internet over HTTPS. There are several options, e.g.
+See Docker with Let's Encrypt for how to set up the former.
+If you plan to use Gramps Web only on your local network, you can skip this step.
+Run
+docker-compose up -d
+
On first run, the app will display a first-run wizard that will allow you to
+.gramps
) formatThere are several options for uploading media files.
+/home/server_user/gramps_media/:/app/media
instead of gramps_media:/app/media
, and upload your media files there.Instead of setting up Gramps Web yourself, you can also use the Gramps Web DigitalOcean 1-Click App.
+As part of the setup procedure, you will have to sign up for an account with DigitalOcean and select a paid plan for the "droplet" (virtual machine) to use.
+Arguably, this is currently the simplest way to deploy your own, self-hosted Gramps Web instance, secured with SSL, without using your own hardware.
+Info
+Note that you will be paying DigitalOcean for the hosting services. The Gramps open source project does not provide paid support.
+Create an account at DigitalOcean if you don't have one yet.
+You will need a domain name (or subdomain). If you own a domain, point it to the IP address of your droplet. Otherwise, you could use a free service such as DuckDNS.
+SSH into your droplet. You should be presented with the message "Welcome to the Gramps Web DigitalOcean 1-click app setup!". If this is not the case, wait a few minutes and try again (the installation is not yet finished).
+The setup script will ask you for the domain name (e.g. mygrampswebinstance.duckdns.org
) and an e-mail address (needed for the Let's Encrypt certificate).
When this is done, wait for the setup to be completed in the background
+Your Gramps Web instance should now be accessible at the root of your domain, with a valid SSL certificate, and it should be showing the first-run assistant.
+ + + + + + +When served to the public internet, Gramps Web must use HTTPS encryption.
+A particularly convenient option is to use a dockerized Nginx reverse proxy with automated Let's Encrypt certificate generation. This is achieved with this docker-compose.yml. +(The nginx_proxy.conf needs to be stored in the same directory to allow uploading large media files to Gramps Web.)
+Please see the acme-companion docs for how to set up your domain.
+ + + + + + +By default, Gramps uses a file-based SQLite database to store the family tree. This works perfectly fine for Gramps Web and is recommended for most users. However, starting with Gramps Web API version 0.3.0, also a PostgreSQL server with a single family tree per database is supported, powered by the Gramps PostgreSQL Addon.
+You can follow the instructions in the Gramps Wiki to set up the PostgreSQL server.
+Alternatively, you can also use Docker Compose to run the PostgreSQL server in a container on the same docker host as Gramps Web.
+Using a dockerized PostgreSQL with Gramps is only complicated by the fact the the default PostgreSQL images do not have any locales installed, which are however needed by Gramps for localized collation of objects. Thus, it is necessary to use a custom Dockerfile.
+Create a Dockerfile
with the following contens in a directory postgres
next to your docker-compose.yml
:
FROM postgres:14
+
+RUN apt-get update && apt-get install -y locales-all \
+ && rm -rf /var/lib/apt/lists/*
+
Next, add the following section to your docker-compose.yml
:
postgres_gramps:
+ build: ./postgres
+ restart: unless-stopped
+ environment:
+ POSTGRES_PASSWORD: your_postgres_password
+ POSTGRES_USER: postgres
+ volumes:
+ - postgres_data:/var/lib/postgresql/data
+
postgres_data:
as key under the volumes:
section of this YAML file.
+Again, if you have set up the PostgreSQL server yourself, you can follow the instructions in the Gramps Wiki to import a family tree into the database.
+Alternatively, if you have followed the Docker Compose instructions above, you can use the following command to import a Gramps XML file located on your docker host:
+docker-compose run --entrypoint "" grampsweb \
+ gramps -C postgres \
+ -i /root/.gramps/grampsdb/my_tree.gramps \
+ --config=database.backend:postgresql \
+ --config=database.host:postgres_gramps \
+ --config=database.port:5432 \
+ --username=postgres --password=your_postgres_password
+
To configure Web API for use with the PostgreSQL database, add the following under the environment:
key of the grampsweb
service in docker-compose.yml
:
# the PostgreSQL addon assumes the tree name to be
+ # equal to the database name and here the default
+ # database name of the PostgreSQL image is used
+ TREE: postgres
+ # The credentials must agree with the ones used for
+ # the PostgreSQL container
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: your_postgres_password
+
In case of issues, please monitor the log output of Gramps Web and the PostgreSQL server. In the case of docker, this is achieved with
+docker-compose logs grampsweb
+docker-compose logs postgres_grampsweb
+
If you suspect there is an issue with Gramps Web (or the documentation), please file an issue on Github.
+ + + + + + +If you are using one of the installation methods based on Docker Compose, updating Gramps Web to the latest version is simple. In the folder where your docker-compose.yml
is located, run the following commands
docker-compose pull
+docker-compose up -d
+
For minor version jumps of Gramps Web API, this is all that is needed. Do follow the release notes of Gramps Web API though, as there could be breaking changes that require additional attention or configuration changes.
+Note that the default grampsweb:latest
docker image always combines the latest version of the API with the latest version of the frontend. If you want to upgrade the two components separately - which is possible - a more involved setup than described here is necessary.
Gramps Web is not meant to be exposed to the internet for public access, but only by authenticated users. User accounts can be created by the site owner via the command line or web interface, or by self-registration and subsequent approval by the site owner.
+The following user roles are currently defined.
+Role | +Role ID | +Permissions | +
---|---|---|
Guest | +0 | +View non-private objects | +
Member | +1 | +Guest + view private objects | +
Contributor* | +2 | +Member + add objects | +
Editor | +3 | +Contributor + edit and delete objects | +
Owner | +4 | +Editor + manage users | +
Admin | +5 | +Owner + edit other trees in multi-tree setup | +
* Note that the "Contributor" role is currently only partially supported; e.g., family objects cannot be added since they imply a modification of the underlying Gramps person objects of family members. It is recommended to use the other roles whenever possible.
+There are two ways to manage users:
+The owner account required to first access the web app can be added in the onboarding wizard that is automatically launched when accessing Gramps Web with an empty user database.
+When using Docker Compose, the basic command is
+docker-compose run grampsweb python3 -m gramps_webapi user COMMAND [ARGS]
+
The COMMAND
can be add
or delete
. Use --help
for [ARGS]
to show the syntax and possible configuration options.
Whether you have set up your own instance of Gramps Web or signed up for a pre-installed one, the next step is to populate and manage your family tree database.
+The focus of this section is on administrative tasks performed by tree owners. Usually, there is one tree owner for each family tree database (although as tree owner, you can also create other tree owner accounts).
+This section only deals with actions that can be performed from the web interface. For command line tools or server configuration, see the previous section Setup.
+ + + + + + +Thanks for considering to contribute to Gramps Web! Depending on your skills and interests, there are many ways how you can help.
+Gramps & Gramps Web support several dozen different languages. Helping to translate the app does not require any programming skills. We use the powerful Weblate online tool for translations. Please see here for instructions on how to get started.
+If you are already using Gramps Web, help new users finding the answers to their questions by contributing to discussions in the Gramps Web category of the official Gramps Discourse forum.
+The documentation site you're looking at is hosted on Github. Contributions to improve it are highly welcome. Just submit a pull request to that repository.
+If you are a Python programmer, contribute to the development of the Gramps Web API, which is the backend powering Gramps Web. See Backend development for instructions on how to get started.
+If you are a web programmer, contribute to the development of Gramps Web's responsive frontend. See Frontend development for instructions on how to get started.
+If you have experience with developing with Python and GTK, contribute to the improvement of The Gramps Web Sync Addon. You can use the development repository for suggesting and submitting improvements.
+ + + + + + + + +In order to avoid high CPU/RAM usage, it is possible to set the number of workers
+using the environment variable GUNICORN_NUM_WORKERS
.
Here, we will take a number of workers = 2. Adjust it according to your needs. +It may be a good idea to check the CPU/Threads available before choosing the value:
+++lscpu | grep CPU
+
The easiest way is to declare the variable in the docker-compose.yml
file,
+under the "environment".
version: "3.7"
+services:
+ grampsweb:
+ environment:
+ GUNICORN_NUM_WORKERS: 2
+
Other ways are possible, for example by storing the variable in a file, +and calling it in the startup command:
+++docker compose --env-file ./env up
+
In this case, the env
file would contain a single line: GUNICORN_NUM_WORKERS=2
The full API specification for the Gramps Web API can be found at https://gramps-project.github.io/gramps-web-api/.
+ + + + + + + + +The backend of Gramps Web is called Gramps Web API. In fact it is more than just an app backend: it provides a RESTful API to read and modify a Gramps database.
+Gramps Web API is a Python application and is powered by the gramps
library itself (which also powers the Gramps Desktop application).
In this section of the docs, you can learn how to contribute to Gramps Web API development.
+ + + + + + + + +For backend and frontend development, it can be useful to send manual queries to the Gramps Web API. Using HTTPie and jq, this can be done conveniently including JWT authentication.
+HTTPie is installed with pip
:
python3 -m pip install httpie
+
You will need HTTPie version 3.0.0 or newer.
+jq can be installed in Ubuntu via
+sudo apt install jq
+
To fetch an access token, query the token endpoint. Assuming your development instance is running on localhost:5555
, you can use the command
http POST http://localhost:5555/api/token/ username=owner password=owner
+
You will see the JSON tokens as output.
+Using jq, you can also store the access token in an environment variable:
+export ACCESS_TOKEN=$(http POST http://localhost:5555/api/token/ \
+ username=owner password=owner | jq -r '.access_token')
+
You can now use this token in all API calls that require authentication, e.g.
+http -A bearer -a $ACCESS_TOKEN GET http://localhost:5555/api/metadata/
+
Note that, by default, access tokens will expire after 15 minutes.
+ + + + + + +This page lists the steps required to start developing Gramps Web API. It will be assumed that you are using Ubuntu Linux.
+The Web API requires Python 3.7 or newer.
+The Web API requires the Gramps Python library to be importable. Starting from Gramps 5.2.0, it will be installable via pip
. Right now, development is still based on Gramps 5.1.x, so the most convenient option is to install the Gramps apt
package on Ubuntu
sudo apt install gramps
+
Info
+Note that using the gramps
Python package from Gramps installed with apt
requires using the system Python interpreter, so you cannot work in a virtual environment.
Clone the Web API to your PC (assuming you have set up an SSH key with Github) using
+git clone git@github.com:gramps-project/gramps-web-api.git
+cd gramps-web-api
+
To start development, please install the dependencies by running +
pip3 install -r requirements-dev.txt
+
Run +
pip3 install -e . --user
+
To set up the pre-commit hooks for the repository, run +
pre-commit install
+
black
.
+To run the unit tests, run +
pytest
+
Example content:
+TREE="My Family Tree"
+SECRET_KEY="not_secure_enough"
+USER_DB_URI="sqlite:///users.sqlite"
+
Warning
+Do not use this configuration in production.
+See Configuration for a full list of config options.
+Warning
+Do not use your production database for development, but use a copy of it or the Gramps example database.
+You can add a user with owner permissions by running +
python3 -m gramps_webapi --config path/to/config user add owner owner --role 4
+
owner
.
+Run +
python3 -m gramps_webapi --config path/to/config run
+
http://127.0.0.1:5000
by default, which displays an empty page. Access your Gramps data using the API described by gramps-project.github.io/gramps-web-api. For example, to show people go to http://127.0.0.1:5000/api/people
+To choose a different port, add the --port
option.
The frontend is built out of web components. They are defined in the Javascript files in the src
directory.
Typically, each file defines one component, starting with +
class GrampsjsSomeElement extends LitElement
+
customElements.define('grampsjs-some-element', GrampsjsSomeElement)`
+
grampsjs-some-element
that can be used elsewhere.
+The main entrypoint, included in index.html
, is the gramps-js
element defined in GrampsJs.js
. This contains the definition of all individual pages (that correspond simply to elements that are shown or hidden based on the route/URL), the menu, and routing.
The components in the src/views
directory usually corresponds to full-page components that fetch data from the backend (e.g., the people list view), while components in src/components
are usually smaller building blocks used inside the views that get their data from attributes provided by their parent element. However, this separation is not strict.
Data is exchanged with the Backend/API via the apiGet
, apiPut
, and apiPost
methods in src/api.js
, which automatically take care of authentication.
Data is passed from parent components to child components via properties (see e.g. the Lit documentation).
+When data needs to be fed back from a child to a parent component, custom events are used that can be fired with the fireEvent
function in src/api.js
and listened to using Lit's @
syntax (docs).
The refresh token and authentication token are stored in the browser's local storage. Whenever an API call is made and the token is expired, the stored refresh token is used to fetch a new access token and the API call is repeated.
+The user's authorization scope, which is stored in the access token's claims, is obtained with the getPermissions
function and used in the top-level GrampsJs
element to set the boolean properties canAdd
, canEdit
, canManageUsers
, which are flowed down to child elements to implement authorization-specific functionality.
To build the frontend for deployment, run +
npm run build
+
The Gramps Web frontend is written in Javascript and built using web components with Lit. This allows encapsulating functionality into reusable components.
+The frontend is designed as a progressive single-page web app with a mobile-first experience. It makes heavy use of Material Web Components for a Material Design look and feel.
+ + + + + + + + +This page describes the steps needed to start with frontend development. It is assumed that you are using Ubuntu Linux and you will need Docker, docker-compose, and git.
+Clone the frontend repository +
git clone git@github.com:gramps-project/gramps-web.git
+cd gramps-web
+
To build and start the containers running the Gramps Web backend with the Gramps example database, as well as the frontend in development mode, simply run
+docker-compose up -d
+
Options for logging in are: owner, editor, contributor, guest or member (use same word for both username and password).
+Warning
+Do not use the development server in production.
+As part of the build process, git hooks for formatting and linting will be installed as well.
+Once the containers are up and running, Gramps Web will be accessible at http://localhost:5555.
+Info
+Note since the *.json
translation files are imported with the new syntax suggested in T39, you must use the Chrome or Chromium browser for the development server to work without errors. This issue is about to change in the future.
Once you make changes to the frontend code, you browser will be reloaded automatically.
+The installed git hooks will format and lint the code on every commit. You can run the scripts manually using
+docker-compose run gramps-frontend format
+
docker-compose run gramps-frontend lint
+
Gramps Web leverages the translations of Gramps Desktop provided by the community for over 40 languages. The additional strings that only needed for the Web app are translated via Weblate.
+To contribute, follow the instructions in the Gramps Wiki to get started with Weblate for Gramps. Once authenticated, you can start translating strings both for Gramps Desktop and Gramps Web.
+ + + + + + + + +Gramps Web is a web application that consists of two components that are developed separately:
+A note on versioning: Gramps Web API and and the Gramps Web frontend are versioned independently. At present, "Gramps Web" – the combined application – does not have a separate version number. Both projects adhere to SemVer.
+If you are not a Python or Javascript developer but would still like to contribute to Gramps Web, check out Contribute.
+ + + + + + + + +The Gramps Web frontend is a Javascript application that is deployed as a set of static HTML, CSS, and Javascript files. Normally, no special configuration is necessary for the frontend. However, some behaviour can be changed by setting appropriate options in the config.js
file at the root of the distriubtion.
The file should have the following structure:
+window.grampsjsConfig = {
+ option: value
+}
+
The following option keys exist.
+Key | +Type | +Description | +
---|---|---|
hideRegisterLink |
+boolean | +If true, hide the registration link on the login page. This should be used for multi-tree deployments. | +
loginRedirect |
+string | +URL to redirect to when not logged in and navigating to any page other than "login" or "register" | +
leafletTileUrl |
+string | +Custom tile URL for Leaflet maps | +
leafletTileSize |
+number | +Custom tile size for Leaflet maps | +
leafletZoomOffset |
+number | +Custom zoom offset for Leaflet maps | +
leafletTileAttribution |
+string | +Custom attribution for Leaflet maps | +
If you run into issues or need help with Gramps Web, please pick one of the following options.
+Forum +Backend issues +Frontend issues
+See below for some guidance on where to head first.
+The official Gramps Discourse forum has a separate category for Gramps Web. Please use it to ask any questions you may have about Gramps Web, for instance
+If you encounter a problem that you believe is a bug in Gramps Web, please support it via Github.
+There are two separate Github repositories for the code used in Gramps Web, one for the user interface (“frontend”) and one for the server code (“backend”):
+ +If you are unsure where to file an issue, don't worry and just choose either of the two – the maintainers will be able to transfer the issue if necessary.
+In either case, please always include the following information in your report:
+Gramps 5.1.6
+Gramps Web API 1.5.1
+Gramps.js 24.1.0
+locale: en
+multi-tree: false
+task queue: true
+
For general ideas and discussion about future improvements, feel free to open a discussion in the forum. You may also want to check the issue pages (see links above) whether a particular feature is already planned or being worked on.
+For specific enhancements with a limited scope, feel free to directly open an issue with a feature request in the appropriate frontend or backend Github repository.
+ + + + + + + + +Gramps Web is a web app for collaborative genealogy. It is based on and interoperable with Gramps, the leading open source genealogy desktop application. Gramps Web is free & open source software and puts your privacy and your control of your research data first.
+ ++ +
Browse all objects in your family tree: people, families, events, places, repositories, sources, citations, media objects, and notes.
+Choose for each user whether they are allowed to view records marked as private. Private records are filtered out at the database layer for maximum security.
+ +Grant users the right to add new or editing existing objects.
+Upload new sources, photos, or create new objects from any device.
+ +Navigate your family tree as an ancestor chart, descendant chart, hourglass chart, or as fan chart, with high-quality interactive graphics and configurable number of generations.
+ +Display all places on an interactive, searchable map.
+Turn a historical map stored as media object in Gramps into a custom map overlay.
+ +Summarize your research in the form of blog stories with pictures. All data is stored in the Gramps database.
+ +Switch the language of the interface between any of 40 languages translated by the Gramps community.
+ +Apart from being able to import data in various formats including Gramps XML and GEDCOM, Gramps Web makes it easy for users to download all of their data (family tree data, media files, user accounts) anytime, for backup purposes or to move to a different server. Your data is yours alone!
+ +Since it's built directly on the core powering Gramps Desktop, you can generate almost all of the reports the desktop app supports right from the browser, including relationship graphs or book reports as PDF.
+ +Gramps Web uses the core of Gramps, the most powerful and popular open-source cross-platform desktop application. It does not only use the same data model and database for storing genalogical data, but can also be synchronized both ways using a Gramps addon.
+Edit your tree on the Web and in the fully-featured desktop app you've grown to love – they work together seamlessly.
+ +Collaborate with your relatives to identify ancestors in old family photos. Thanks to automated face detection, tagging people is just two clicks away.
+ +The search engine supports searching all Gramps object types, including the content of text notes, and supports wildcard syntax and logical operators.
+ +If you have DNA match data from one of the DNA genealogy providers, upload it and store it in a future-proof way and view your matches in an interactive chromosome browser.
+ +Gramps Web comes with an integrated task management app to organize and plan your genealogical research. The tasks are stored as sources in the Gramps database, so they form part of your genealogical data an can be accessed and edited in Gramps Desktop as well.
+ ++ +
Use owner
, editor
, contributor
, or member
as username and the same as password.
By default, Gramps Web only allows accessing a single family tree database (“tree”), specified in the configuration file.
+However, starting with version 0.7.0 of the Gramps Web API backend, it is also possible to serve multiple trees from a single installation. However, each user is (currently) tied to a single tree, so this setup is not suited for sharing trees among users, but for hosting multiple isolated Gramps Web instances.
+To enable multi-tree support, the TREE
config option must be set to a single asterisk *
, e.g. in a configuration file:
TREE = "*"
+
This will make all trees in the server's Gramps database directory accessible (given sufficient user permissions). The tree's ID is the name of the subdirectory. You can list existing trees (names and IDs) with the command
+python -m gramps_webapi --config /app/config/config.cfg tree list
+
In addition, you should set the MEDIA_PREFIX_TREE
configuration option to True
to ensure media files are stored in separate subfolders. Otherwise, users are able to access media files that belong to a tree they have no permission for!
To add a user to a specific tree, simply add the --tree TREEID
command line option to the add user command. You can also POST to the /users/
endpoint with the tree
property set in the JSON payload.
User names and e-mail addresses are required to be unique across all trees.
+To create a new tree, it is recommended to POST to the /trees/
endpoint rather than using the Gramps CLI. This will use a UUIDv4 as tree ID, which leads to additional security as the name cannot be guessed. Currently, only SQLite is supported for newly created trees.
To authorize (fetch a token), only user name and password are necessary, like in single-tree mode, since the tree ID is known for each user, so there is no need to provide it.
+If you want to migrate an existing Gramps Web instance to multi-tree support and are using local media files, you can simply move them to a subfolder of the original location with the tree ID as name.
+If you are using media files hosted on S3, you can use the script provided in the scripts
directory of the gramps-web-api
repository:
python scripts/s3_rename.py BUCKET_NAME TREE_ID
+
This assumes the relevant access keys are set as environment variables already.
+If you want to enable multi-tree support and reuse existing users, you need to assign them to a specific tree. You can use the following command provided for this purpose,
+python -m gramps_webapi --config /app/config/config.cfg user fill-tree TREE_ID
+
The registration page accessible from the login page does not work in a multi-tree setup, since a tree needs to be specified for registration. It is thus advisable to set hideRegisterLink
to true
in the frontend configuration.
To try out Gramps Web on your local computer (Linux, Mac, or Windows) without interfering with your Gramps Desktop installation, you can use Docker with the following command:
+docker run -p "5055:5000" -e TREE=new ghcr.io/gramps-project/grampsweb:latest
+
This will make a new, empty Gramps Web instance accessible at http://localhost:5055, where you can create an admin user and import a Gramps XML file.
+Info
+Since this simple setup does not allow running long tasks in a separate process, importing a large Gramps XML file might fail due to a timeout in the first-run assistant.
+To use media files from your computer you can mount the Gramps media folder into the container with
+docker run -p "5055:5000" -e TREE=new \
+ -v /path/to/my/gramps_media_folder:/app/media \
+ ghcr.io/gramps-project/grampsweb:latest
+
Note that this will not persist the changes you make to the database when you restart the container. To properly set up Gramps Web, continue reading about Deployment.
+ + + + + + +Gramps Web is a web app that runs on a server and is accessed via the web browser. It is meant to be made accessible to authenticated users via the internet.
+The most convenient way to host Gramps Web is via Docker Compose. While this is not possible with ordinary "shared hosting" providers, this makes it possible to host the app on Linux, Mac, or Windows; it can be hosted on a virtual server or on a Raspberry Pi (we provide Docker images for the ARM architecture) in your basement.
+Apart from Docker, you will also need some storage space to store your media files (images, documents).
+Finally, Gramps Web is only secure when served via HTTPS, so you will require an SSL/TLS certificate. The docs below show how to get one automatically for free from Let's Encrypt.
+ + + + + + +Instead of hosting the media files of the family tree on the same server as the Gramps database, they can also be hosted on Amazon S3 or a different API-compatible object storage service. This strongly reduces storage and traffic requirements for the Gramps Web server.
+In your AWS (or other object storage service) account, get an access key ID and secret access key (you may first want to create a separate user with a security policy allowing only access to S3).
+To upload your existing media files to S3, on Linux you can use a local Gramps installation with the S3 Media Uploader Addon, that you can install directly from Gramps desktop. However, some additional configuration is necessary.
+The addon uses the boto3
Python library under the hood. You need to install it first with
python3 -m pip install boto3
+
On the command line, export the access key ID and secret key to the appropriate environment variables: +
export AWS_ACCESS_KEY_ID=my_access_key_id
+export AWS_SECRET_ACCESS_KEY=my_secret_access_key
+
Now, you can start the uploader by runing the following command,
+gramps -O "My Family Tree" -a tool \
+ -p "name=s3uploader,bucket_name=my_bucket_name"
+
replacing "My Family Tree" with the name of your family tree and my_bucket_name
with the complete name of your S3 bucket. You will need a dedicated S3 bucket for your Gramps Web instance. If the bucket does not exist yet, the S3 Uploader Addon will attempt to create it.
To use the new S3 bucket as media source for Gramps Web, simply set the MEDIA_BASE_DIR
configuration option to s3://my_bucket_name
.
When using Docker Compose, the easiest option is to add all environment variables to the env
block:
env:
+ AWS_ACCESS_KEY_ID: my_access_key_id
+ AWS_SECRET_ACCESS_KEY: my_secret_access_key
+ MEDIA_BASE_DIR: s3://my_bucket_name
+ AWS_DEFAULT_REGION: eu-central-1
+
If you want to use an S3-compatible object storage other than AWS (e.g. GCP or for local testing), set the AWS_ENDPOINT_URL
environment variable.
To keep media files in sync between a local Gramps installation and S3-hosted Gramps Web media files, the Gramps Web Sync Addon supports file synchronization via the Web API.
+ + + + + + +Gramps Web is a web app for collaborative genealogy. It is based on and interoperable with Gramps, the leading open source genealogy desktop application. Gramps Web is free & open source software and puts your privacy and your control of your research data first.
"},{"location":"#access-to-all-your-data-respecting-privacy","title":"Access to all your data, respecting privacy","text":"
Browse all objects in your family tree: people, families, events, places, repositories, sources, citations, media objects, and notes.
Choose for each user whether they are allowed to view records marked as private. Private records are filtered out at the database layer for maximum security.
"},{"location":"#collaborative-editing-adding-data-on-the-go","title":"Collaborative editing & adding data on the go","text":"Grant users the right to add new or editing existing objects.
Upload new sources, photos, or create new objects from any device.
"},{"location":"#interactive-family-tree-graphs","title":"Interactive family tree graphs","text":"Navigate your family tree as an ancestor chart, descendant chart, hourglass chart, or as fan chart, with high-quality interactive graphics and configurable number of generations.
"},{"location":"#powerful-map","title":"Powerful map","text":"Display all places on an interactive, searchable map.
Turn a historical map stored as media object in Gramps into a custom map overlay.
"},{"location":"#genealogy-blog-included","title":"Genealogy Blog included","text":"Summarize your research in the form of blog stories with pictures. All data is stored in the Gramps database.
"},{"location":"#fully-internationalized","title":"Fully internationalized","text":"Switch the language of the interface between any of 40 languages translated by the Gramps community.
"},{"location":"#no-lock-in-data-import-and-export","title":"No lock-in \u2013 data import and export","text":"Apart from being able to import data in various formats including Gramps XML and GEDCOM, Gramps Web makes it easy for users to download all of their data (family tree data, media files, user accounts) anytime, for backup purposes or to move to a different server. Your data is yours alone!
"},{"location":"#generate-printable-reports","title":"Generate printable reports","text":"Since it's built directly on the core powering Gramps Desktop, you can generate almost all of the reports the desktop app supports right from the browser, including relationship graphs or book reports as PDF.
"},{"location":"#full-integration-with-gramps-desktop","title":"Full integration with Gramps Desktop","text":"Gramps Web uses the core of Gramps, the most powerful and popular open-source cross-platform desktop application. It does not only use the same data model and database for storing genalogical data, but can also be synchronized both ways using a Gramps addon.
Edit your tree on the Web and in the fully-featured desktop app you've grown to love \u2013 they work together seamlessly.
"},{"location":"#tag-people-in-photos-with-automated-face-detection","title":"Tag people in photos with automated face detection","text":"Collaborate with your relatives to identify ancestors in old family photos. Thanks to automated face detection, tagging people is just two clicks away.
"},{"location":"#powerful-full-text-search","title":"Powerful full-text search","text":"The search engine supports searching all Gramps object types, including the content of text notes, and supports wildcard syntax and logical operators.
"},{"location":"#dna-matches-chromosome-browser","title":"DNA matches & chromosome browser","text":"If you have DNA match data from one of the DNA genealogy providers, upload it and store it in a future-proof way and view your matches in an interactive chromosome browser.
"},{"location":"#integrated-task-management-app","title":"Integrated task management app","text":"Gramps Web comes with an integrated task management app to organize and plan your genealogical research. The tasks are stored as sources in the Gramps database, so they form part of your genealogical data an can be accessed and edited in Gramps Desktop as well.
"},{"location":"#demo","title":"Demo","text":"
Open Demo
Use owner
, editor
, contributor
, or member
as username and the same as password.
Using the default Docker image, all necessary configuration can be made from the browser. However, depending on the deployment, it can be necessary to customize the server configuration.
This page lists all methods to change the configuration and all existing configuration options.
"},{"location":"Configuration/#configuration-file-vs-environment-variables","title":"Configuration file vs. environment variables","text":"For the settings, you can either use a configuration file or environment variables.
When you use the Docker Compose based setup, you can include a configuration file by adding the following list item under the volumes:
key in the grampsweb:
block:
- /path/to/config.cfg:/app/config/config.cfg\n
where /path/to/config.cfg
is the path to the config file in your server's file system (the right-hand side refers to the path in the container and must not be changed). When using environment variables,
GRAMPSWEB_
to obtain the name of the environment variableGRAMPSWEB_THUMBNAIL_CACHE_CONFIG__CACHE_DEFAULT_TIMEOUT
will set the value of the THUMBNAIL_CACHE_CONFIG['CACHE_DEFAULT_TIMEOUT']
config optionThe following configuration options exist.
"},{"location":"Configuration/#required-settings","title":"Required settings","text":"Key DescriptionTREE
The name of the family tree database to use. Show available trees with gramps -l
. If a tree with this name does not exist, a new empty one will be created. SECRET_KEY
The secret key for flask. The secret must not be shared publicly. Changing it will invalidate all access tokens Info
You can generate a secure secret key e.g. with the command
python3 -c \"import secrets;print(secrets.token_urlsafe(32))\"\n
"},{"location":"Configuration/#optional-settings","title":"Optional settings","text":"Key Description MEDIA_BASE_DIR
Path to use as base directory for media files, overriding the media base directory set in Gramps. When using S3, must have the form s3://<bucket_name>
SEARCH_INDEX_DIR
Path for the full-text search index. Defaults to indexdir
relative to the path where the script is run STATIC_PATH
Path to serve static files from (e.g. a static web frontend) BASE_URL
Base URL where the API can be reached (e.g. https://mygramps.mydomain.com/
). This is necessary e.g. to build correct passwort reset links CORS_ORIGINS
Origins where CORS requests are allowed from. By default, all are disallowed. Use \"*\"
to allow requests from any domain. EMAIL_HOST
SMTP server host (e.g. for sending password reset e-mails) EMAIL_PORT
SMTP server port. defaults to 465 EMAIL_HOST_USER
SMTP server username EMAIL_HOST_PASSWORD
SMTP server password EMAIL_USE_TLS
Boolean, whether to use TLS for sending e-mails. Defaults to True
. When using STARTTLS, set this to False
and use a port different from 25. DEFAULT_FROM_EMAIL
\"From\" address for automated e-mails THUMBNAIL_CACHE_CONFIG
Dictionary with settings for the thumbnail cache. See Flask-Caching for possible settings. CELERY_CONFIG
Settings for the Celery background task queue. See Celery for possible settings. REPORT_DIR
Temporary directory where the output of running Gramps reports will be stored EXPORT_DIR
Temporary directory where the output of exporting the Gramps database will be stored Info
When using environment variables for configuration, boolean options like EMAIL_USE_TLS
must be either the string true
or false
(case senitive!).
This is required if you've configured your Gramps database to work with the PostgreSQL addon.
Key DescriptionPOSTGRES_USER
The user name for the database connection POSTGRES_PASSWORD
The password for the database user"},{"location":"Configuration/#settings-relevant-for-hosting-multiple-trees","title":"Settings relevant for hosting multiple trees","text":"The following settings are relevant when hosting multiple trees.
Key DescriptionMEDIA_PREFIX_TREE
Boolean, whether or not to use a separate subfolder for the media files of each tree. Defaults to False
, but strongly recommend to use True
in a multi-tree setup NEW_DB_BACKEND
The database backend to use for newly created family trees. Must be one of sqlite
, postgresql
, or sharedpostgresql
. Defaults to sqlite
."},{"location":"Configuration/#example-configuration-file","title":"Example configuration file","text":"A minimal configuration file for production could look like this:
TREE=\"My Family Tree\"\nBASE_URL=\"https://mytree.example.com\"\nSECRET_KEY=\"...\" # your secret key\nUSER_DB_URI=\"sqlite:////path/to/users.sqlite\"\nEMAIL_HOST=\"mail.example.com\"\nEMAIL_PORT=465\nEMAIL_USE_TLS=True\nEMAIL_HOST_USER=\"gramps@example.com\"\nEMAIL_HOST_PASSWORD=\"...\" # your SMTP password\nDEFAULT_FROM_EMAIL=\"gramps@example.com\"\n
"},{"location":"Deployment/","title":"Deploying Gramps Web with Docker","text":"The most convenient option to host Gramps Web on your own server (or virtual server) is with Docker Compose.
We will assume that Docker and Docker Compose are already installed in your system. You can use Windows, Mac OS, or Linux as a host system. The supported architectures include not only x86-64 (desktop systems), but also ARM systems such as a Raspberry Pi, which can serve as a low-cost, but powerful (enough) web server.
Note
You do not need to install Gramps on the server as it is contained in the docker image.
"},{"location":"Deployment/#step-1-docker-configuration","title":"Step 1: Docker configuration","text":"Create a new file on the server named docker-compose.yml
and insert the following contents: docker-compose.yml.
This will generate six named volumes to make sure that all relevant data will persist when restarting the container.
Warning
The above will make the API available on port 80 of the host machine without SSL/TLS protection. You can use this for local testing, but do not expose this directly to the internet, it is completely insecure!
"},{"location":"Deployment/#step-2-secure-access-with-ssltls","title":"Step 2: Secure access with SSL/TLS","text":"The web API must be served to the public internet over HTTPS. There are several options, e.g.
See Docker with Let's Encrypt for how to set up the former.
If you plan to use Gramps Web only on your local network, you can skip this step.
"},{"location":"Deployment/#step-3-start-the-server","title":"Step 3: Start the server","text":"Run
docker-compose up -d\n
On first run, the app will display a first-run wizard that will allow you to
.gramps
) formatThere are several options for uploading media files.
/home/server_user/gramps_media/:/app/media
instead of gramps_media:/app/media
, and upload your media files there.Instead of setting up Gramps Web yourself, you can also use the Gramps Web DigitalOcean 1-Click App.
As part of the setup procedure, you will have to sign up for an account with DigitalOcean and select a paid plan for the \"droplet\" (virtual machine) to use.
Arguably, this is currently the simplest way to deploy your own, self-hosted Gramps Web instance, secured with SSL, without using your own hardware.
Info
Note that you will be paying DigitalOcean for the hosting services. The Gramps open source project does not provide paid support.
"},{"location":"DigitalOcean/#step-1-create-a-digitalocean-account","title":"Step 1: Create a DigitalOcean account","text":"Create an account at DigitalOcean if you don't have one yet.
"},{"location":"DigitalOcean/#step-2-create-the-droplet","title":"Step 2: Create the droplet","text":"You will need a domain name (or subdomain). If you own a domain, point it to the IP address of your droplet. Otherwise, you could use a free service such as DuckDNS.
"},{"location":"DigitalOcean/#step-4-log-in-to-your-droplet","title":"Step 4: Log in to your droplet","text":"SSH into your droplet. You should be presented with the message \"Welcome to the Gramps Web DigitalOcean 1-click app setup!\". If this is not the case, wait a few minutes and try again (the installation is not yet finished).
The setup script will ask you for the domain name (e.g. mygrampswebinstance.duckdns.org
) and an e-mail address (needed for the Let's Encrypt certificate).
When this is done, wait for the setup to be completed in the background
"},{"location":"DigitalOcean/#step-5-launch-gramps-web","title":"Step 5: Launch Gramps Web","text":"Your Gramps Web instance should now be accessible at the root of your domain, with a valid SSL certificate, and it should be showing the first-run assistant.
"},{"location":"LetsEncrypt/","title":"Setting up HTTPS with Let's Encrypt and Docker Compose","text":"When served to the public internet, Gramps Web must use HTTPS encryption.
A particularly convenient option is to use a dockerized Nginx reverse proxy with automated Let's Encrypt certificate generation. This is achieved with this docker-compose.yml. (The nginx_proxy.conf needs to be stored in the same directory to allow uploading large media files to Gramps Web.)
Please see the acme-companion docs for how to set up your domain.
"},{"location":"Postgres/","title":"Using a PostgreSQL database","text":"By default, Gramps uses a file-based SQLite database to store the family tree. This works perfectly fine for Gramps Web and is recommended for most users. However, starting with Gramps Web API version 0.3.0, also a PostgreSQL server with a single family tree per database is supported, powered by the Gramps PostgreSQL Addon.
"},{"location":"Postgres/#setting-up-the-postgresql-server","title":"Setting up the PostgreSQL server","text":"You can follow the instructions in the Gramps Wiki to set up the PostgreSQL server.
Alternatively, you can also use Docker Compose to run the PostgreSQL server in a container on the same docker host as Gramps Web.
Using a dockerized PostgreSQL with Gramps is only complicated by the fact the the default PostgreSQL images do not have any locales installed, which are however needed by Gramps for localized collation of objects. Thus, it is necessary to use a custom Dockerfile.
Create a Dockerfile
with the following contens in a directory postgres
next to your docker-compose.yml
:
FROM postgres:14\n\nRUN apt-get update && apt-get install -y locales-all \\\n && rm -rf /var/lib/apt/lists/*\n
Next, add the following section to your docker-compose.yml
:
postgres_gramps:\nbuild: ./postgres\nrestart: unless-stopped\nenvironment:\nPOSTGRES_PASSWORD: your_postgres_password\nPOSTGRES_USER: postgres\nvolumes:\n- postgres_data:/var/lib/postgresql/data\n
and also add postgres_data:
as key under the volumes:
section of this YAML file."},{"location":"Postgres/#importing-a-gramps-family-tree","title":"Importing a Gramps family tree","text":"Again, if you have set up the PostgreSQL server yourself, you can follow the instructions in the Gramps Wiki to import a family tree into the database.
Alternatively, if you have followed the Docker Compose instructions above, you can use the following command to import a Gramps XML file located on your docker host:
docker-compose run --entrypoint \"\" grampsweb \\\ngramps -C postgres \\\n-i /root/.gramps/grampsdb/my_tree.gramps \\\n--config=database.backend:postgresql \\\n--config=database.host:postgres_gramps \\\n--config=database.port:5432 \\\n--username=postgres --password=your_postgres_password\n
"},{"location":"Postgres/#configuring-web-api-for-use-with-the-database","title":"Configuring Web API for use with the database","text":"To configure Web API for use with the PostgreSQL database, add the following under the environment:
key of the grampsweb
service in docker-compose.yml
:
# the PostgreSQL addon assumes the tree name to be\n# equal to the database name and here the default \n# database name of the PostgreSQL image is used\nTREE: postgres\n# The credentials must agree with the ones used for\n# the PostgreSQL container\nPOSTGRES_USER: postgres\nPOSTGRES_PASSWORD: your_postgres_password\n
"},{"location":"Postgres/#issues","title":"Issues","text":"In case of issues, please monitor the log output of Gramps Web and the PostgreSQL server. In the case of docker, this is achieved with
docker-compose logs grampsweb\ndocker-compose logs postgres_grampsweb\n
If you suspect there is an issue with Gramps Web (or the documentation), please file an issue on Github.
"},{"location":"Update/","title":"Update Gramps Web","text":"If you are using one of the installation methods based on Docker Compose, updating Gramps Web to the latest version is simple. In the folder where your docker-compose.yml
is located, run the following commands
docker-compose pull\ndocker-compose up -d\n
For minor version jumps of Gramps Web API, this is all that is needed. Do follow the release notes of Gramps Web API though, as there could be breaking changes that require additional attention or configuration changes.
Note that the default grampsweb:latest
docker image always combines the latest version of the API with the latest version of the frontend. If you want to upgrade the two components separately - which is possible - a more involved setup than described here is necessary.
Gramps Web is not meant to be exposed to the internet for public access, but only by authenticated users. User accounts can be created by the site owner via the command line or web interface, or by self-registration and subsequent approval by the site owner.
"},{"location":"Users/#user-roles","title":"User roles","text":"The following user roles are currently defined.
Role Role ID Permissions Guest 0 View non-private objects Member 1 Guest + view private objects Contributor* 2 Member + add objects Editor 3 Contributor + edit and delete objects Owner 4 Editor + manage users Admin 5 Owner + edit other trees in multi-tree setup* Note that the \"Contributor\" role is currently only partially supported; e.g., family objects cannot be added since they imply a modification of the underlying Gramps person objects of family members. It is recommended to use the other roles whenever possible.
"},{"location":"Users/#managing-users","title":"Managing users","text":"There are two ways to manage users:
The owner account required to first access the web app can be added in the onboarding wizard that is automatically launched when accessing Gramps Web with an empty user database.
"},{"location":"Users/#managing-users-on-the-command-line","title":"Managing users on the command line","text":"When using Docker Compose, the basic command is
docker-compose run grampsweb python3 -m gramps_webapi user COMMAND [ARGS]\n
The COMMAND
can be add
or delete
. Use --help
for [ARGS]
to show the syntax and possible configuration options.
Whether you have set up your own instance of Gramps Web or signed up for a pre-installed one, the next step is to populate and manage your family tree database.
The focus of this section is on administrative tasks performed by tree owners. Usually, there is one tree owner for each family tree database (although as tree owner, you can also create other tree owner accounts).
This section only deals with actions that can be performed from the web interface. For command line tools or server configuration, see the previous section Setup.
"},{"location":"contribute/","title":"How to contribute to Gramps Web","text":"Thanks for considering to contribute to Gramps Web! Depending on your skills and interests, there are many ways how you can help.
"},{"location":"contribute/#help-translating-gramps-web-to-your-language","title":"Help translating Gramps Web to your language","text":"Gramps & Gramps Web support several dozen different languages. Helping to translate the app does not require any programming skills. We use the powerful Weblate online tool for translations. Please see here for instructions on how to get started.
"},{"location":"contribute/#help-answering-other-users-questions","title":"Help answering other users' questions","text":"If you are already using Gramps Web, help new users finding the answers to their questions by contributing to discussions in the Gramps Web category of the official Gramps Discourse forum.
"},{"location":"contribute/#help-improve-the-documentation","title":"Help improve the documentation","text":"The documentation site you're looking at is hosted on Github. Contributions to improve it are highly welcome. Just submit a pull request to that repository.
"},{"location":"contribute/#contribute-to-backend-development-python","title":"Contribute to backend development (Python)","text":"If you are a Python programmer, contribute to the development of the Gramps Web API, which is the backend powering Gramps Web. See Backend development for instructions on how to get started.
"},{"location":"contribute/#contribute-to-frontend-development-javascript","title":"Contribute to frontend development (Javascript)","text":"If you are a web programmer, contribute to the development of Gramps Web's responsive frontend. See Frontend development for instructions on how to get started.
"},{"location":"contribute/#contribute-to-the-sync-addon-python","title":"Contribute to the Sync addon (Python)","text":"If you have experience with developing with Python and GTK, contribute to the improvement of The Gramps Web Sync Addon. You can use the development repository for suggesting and submitting improvements.
"},{"location":"cpu-limited/","title":"Limit CPU usage","text":"In order to avoid high CPU/RAM usage, it is possible to set the number of workers using the environment variable GUNICORN_NUM_WORKERS
.
Here, we will take a number of workers = 2. Adjust it according to your needs. It may be a good idea to check the CPU/Threads available before choosing the value:
lscpu | grep CPU
The easiest way is to declare the variable in the docker-compose.yml
file, under the \"environment\".
version: \"3.7\"\nservices:\n grampsweb:\n environment:\n GUNICORN_NUM_WORKERS: 2\n
Other ways are possible, for example by storing the variable in a file, and calling it in the startup command:
docker compose --env-file ./env up
In this case, the env
file would contain a single line: GUNICORN_NUM_WORKERS=2
Gramps Web is a web application that consists of two components that are developed separately:
A note on versioning: Gramps Web API and and the Gramps Web frontend are versioned independently. At present, \"Gramps Web\" \u2013 the combined application \u2013 does not have a separate version number. Both projects adhere to SemVer.
If you are not a Python or Javascript developer but would still like to contribute to Gramps Web, check out Contribute.
"},{"location":"frontend-config/","title":"Customizing the frontend","text":"The Gramps Web frontend is a Javascript application that is deployed as a set of static HTML, CSS, and Javascript files. Normally, no special configuration is necessary for the frontend. However, some behaviour can be changed by setting appropriate options in the config.js
file at the root of the distriubtion.
The file should have the following structure:
window.grampsjsConfig = {\noption: value\n}\n
The following option keys exist.
Key Type DescriptionhideRegisterLink
boolean If true, hide the registration link on the login page. This should be used for multi-tree deployments. loginRedirect
string URL to redirect to when not logged in and navigating to any page other than \"login\" or \"register\" leafletTileUrl
string Custom tile URL for Leaflet maps leafletTileSize
number Custom tile size for Leaflet maps leafletZoomOffset
number Custom zoom offset for Leaflet maps leafletTileAttribution
string Custom attribution for Leaflet maps"},{"location":"help/","title":"Get Help","text":"If you run into issues or need help with Gramps Web, please pick one of the following options.
Forum Backend issues Frontend issues
See below for some guidance on where to head first.
"},{"location":"help/#asking-questions","title":"Asking questions","text":"The official Gramps Discourse forum has a separate category for Gramps Web. Please use it to ask any questions you may have about Gramps Web, for instance
If you encounter a problem that you believe is a bug in Gramps Web, please support it via Github.
There are two separate Github repositories for the code used in Gramps Web, one for the user interface (\u201cfrontend\u201d) and one for the server code (\u201cbackend\u201d):
If you are unsure where to file an issue, don't worry and just choose either of the two \u2013 the maintainers will be able to transfer the issue if necessary.
In either case, please always include the following information in your report:
Gramps 5.1.6\nGramps Web API 1.5.1\nGramps.js 24.1.0\nlocale: en\nmulti-tree: false\ntask queue: true\n
"},{"location":"help/#suggesting-enhancements","title":"Suggesting enhancements","text":"For general ideas and discussion about future improvements, feel free to open a discussion in the forum. You may also want to check the issue pages (see links above) whether a particular feature is already planned or being worked on.
For specific enhancements with a limited scope, feel free to directly open an issue with a feature request in the appropriate frontend or backend Github repository.
"},{"location":"multi-tree/","title":"Setup for hosting multiple trees","text":"By default, Gramps Web only allows accessing a single family tree database (\u201ctree\u201d), specified in the configuration file.
However, starting with version 0.7.0 of the Gramps Web API backend, it is also possible to serve multiple trees from a single installation. However, each user is (currently) tied to a single tree, so this setup is not suited for sharing trees among users, but for hosting multiple isolated Gramps Web instances.
"},{"location":"multi-tree/#enable-multi-tree-support","title":"Enable multi-tree support","text":"To enable multi-tree support, the TREE
config option must be set to a single asterisk *
, e.g. in a configuration file:
TREE = \"*\"\n
This will make all trees in the server's Gramps database directory accessible (given sufficient user permissions). The tree's ID is the name of the subdirectory. You can list existing trees (names and IDs) with the command
python -m gramps_webapi --config /app/config/config.cfg tree list\n
In addition, you should set the MEDIA_PREFIX_TREE
configuration option to True
to ensure media files are stored in separate subfolders. Otherwise, users are able to access media files that belong to a tree they have no permission for!
To add a user to a specific tree, simply add the --tree TREEID
command line option to the add user command. You can also POST to the /users/
endpoint with the tree
property set in the JSON payload.
User names and e-mail addresses are required to be unique across all trees.
"},{"location":"multi-tree/#create-a-new-tree","title":"Create a new tree","text":"To create a new tree, it is recommended to POST to the /trees/
endpoint rather than using the Gramps CLI. This will use a UUIDv4 as tree ID, which leads to additional security as the name cannot be guessed. Currently, only SQLite is supported for newly created trees.
To authorize (fetch a token), only user name and password are necessary, like in single-tree mode, since the tree ID is known for each user, so there is no need to provide it.
"},{"location":"multi-tree/#migrate-existing-media-files","title":"Migrate existing media files","text":"If you want to migrate an existing Gramps Web instance to multi-tree support and are using local media files, you can simply move them to a subfolder of the original location with the tree ID as name.
If you are using media files hosted on S3, you can use the script provided in the scripts
directory of the gramps-web-api
repository:
python scripts/s3_rename.py BUCKET_NAME TREE_ID\n
This assumes the relevant access keys are set as environment variables already.
"},{"location":"multi-tree/#migrate-existing-user-database","title":"Migrate existing user database","text":"If you want to enable multi-tree support and reuse existing users, you need to assign them to a specific tree. You can use the following command provided for this purpose,
python -m gramps_webapi --config /app/config/config.cfg user fill-tree TREE_ID\n
"},{"location":"multi-tree/#customize-the-frontend","title":"Customize the frontend","text":"The registration page accessible from the login page does not work in a multi-tree setup, since a tree needs to be specified for registration. It is thus advisable to set hideRegisterLink
to true
in the frontend configuration.
To try out Gramps Web on your local computer (Linux, Mac, or Windows) without interfering with your Gramps Desktop installation, you can use Docker with the following command:
docker run -p \"5055:5000\" -e TREE=new ghcr.io/gramps-project/grampsweb:latest\n
This will make a new, empty Gramps Web instance accessible at http://localhost:5055, where you can create an admin user and import a Gramps XML file.
Info
Since this simple setup does not allow running long tasks in a separate process, importing a large Gramps XML file might fail due to a timeout in the first-run assistant.
To use media files from your computer you can mount the Gramps media folder into the container with
docker run -p \"5055:5000\" -e TREE=new \\\n-v /path/to/my/gramps_media_folder:/app/media \\\nghcr.io/gramps-project/grampsweb:latest\n
Note that this will not persist the changes you make to the database when you restart the container. To properly set up Gramps Web, continue reading about Deployment.
"},{"location":"requirements/","title":"Setup Requirements","text":"Gramps Web is a web app that runs on a server and is accessed via the web browser. It is meant to be made accessible to authenticated users via the internet.
"},{"location":"requirements/#server-requirements","title":"Server Requirements","text":"The most convenient way to host Gramps Web is via Docker Compose. While this is not possible with ordinary \"shared hosting\" providers, this makes it possible to host the app on Linux, Mac, or Windows; it can be hosted on a virtual server or on a Raspberry Pi (we provide Docker images for the ARM architecture) in your basement.
Apart from Docker, you will also need some storage space to store your media files (images, documents).
Finally, Gramps Web is only secure when served via HTTPS, so you will require an SSL/TLS certificate. The docs below show how to get one automatically for free from Let's Encrypt.
"},{"location":"s3/","title":"Hosting media files on S3","text":"Instead of hosting the media files of the family tree on the same server as the Gramps database, they can also be hosted on Amazon S3 or a different API-compatible object storage service. This strongly reduces storage and traffic requirements for the Gramps Web server.
"},{"location":"s3/#preparing-credentials","title":"Preparing credentials","text":"In your AWS (or other object storage service) account, get an access key ID and secret access key (you may first want to create a separate user with a security policy allowing only access to S3).
"},{"location":"s3/#upload-media-files","title":"Upload media files","text":"To upload your existing media files to S3, on Linux you can use a local Gramps installation with the S3 Media Uploader Addon, that you can install directly from Gramps desktop. However, some additional configuration is necessary.
The addon uses the boto3
Python library under the hood. You need to install it first with
python3 -m pip install boto3\n
On the command line, export the access key ID and secret key to the appropriate environment variables:
export AWS_ACCESS_KEY_ID=my_access_key_id\nexport AWS_SECRET_ACCESS_KEY=my_secret_access_key\n
Now, you can start the uploader by runing the following command,
gramps -O \"My Family Tree\" -a tool \\\n-p \"name=s3uploader,bucket_name=my_bucket_name\"\n
replacing \"My Family Tree\" with the name of your family tree and my_bucket_name
with the complete name of your S3 bucket. You will need a dedicated S3 bucket for your Gramps Web instance. If the bucket does not exist yet, the S3 Uploader Addon will attempt to create it.
To use the new S3 bucket as media source for Gramps Web, simply set the MEDIA_BASE_DIR
configuration option to s3://my_bucket_name
.
When using Docker Compose, the easiest option is to add all environment variables to the env
block:
env:\nAWS_ACCESS_KEY_ID: my_access_key_id\nAWS_SECRET_ACCESS_KEY: my_secret_access_key\nMEDIA_BASE_DIR: s3://my_bucket_name\nAWS_DEFAULT_REGION: eu-central-1\n
If you want to use an S3-compatible object storage other than AWS (e.g. GCP or for local testing), set the AWS_ENDPOINT_URL
environment variable.
To keep media files in sync between a local Gramps installation and S3-hosted Gramps Web media files, the Gramps Web Sync Addon supports file synchronization via the Web API.
"},{"location":"setup/","title":"Gramps Web Setup","text":"This section deals with the installation and setup of Gramps Web, as well as other options to get started.
"},{"location":"setup/#getting-started-with-gramps-web","title":"Getting started with Gramps Web","text":"Gramps Web is a web app that runs on a server and is accessed via the web browser. It is meant to be made accessible to authenticated users via the internet.
If you want to use Gramps Web for your genealogical research data, you have to choose one of the following options:
While the first option gives you maximal flexibility and control, it can also be technically challenging.
Tip
One of the main principles of Gramps Web is to put users in control of their own data at any time, so migrating data from one instance to another is simple. Don't worry about being locked in after having chosen one of the options!
"},{"location":"setup/#self-host-on-your-own-hardware","title":"Self-host on your own hardware","text":"The most convenient way to self-host Gramps Web is via Docker Compose. We also provide Docker images for the ARM architecture, so you can run Gramps Web on a Raspberry Pi in your basement.
See Deploy with Docker for setup instructions.
"},{"location":"setup/#self-host-in-the-cloud","title":"Self-host in the cloud","text":"Installing Gramps Web can be more challenging than other, simple web applications and is not compatible with ordinary \"shared hosting\" providers. You can sign up for a virtual server and install Gramps Web manually.
A simpler option is to use a pre-installed cloud image. One example is our DigitalOcean 1-click app.
"},{"location":"setup/#sign-up-for-a-hosted-instance","title":"Sign up for a hosted instance","text":"A hosted Gramps Web is the easiest way to get started with Gramps Web, since no installation or configuration is required.
Here is a list of dedicated hosting providers for Gramps Web (the Gramps open source community does not take responsibility for their services):
If you use a hosted option for Gramps Web, you can skip the rest of this section and jump right to the Administration section.
"},{"location":"dev-backend/","title":"Gramps Web backend development","text":"The backend of Gramps Web is called Gramps Web API. In fact it is more than just an app backend: it provides a RESTful API to read and modify a Gramps database.
Gramps Web API is a Python application and is powered by the gramps
library itself (which also powers the Gramps Desktop application).
In this section of the docs, you can learn how to contribute to Gramps Web API development.
"},{"location":"dev-backend/api/","title":"API specification","text":"The full API specification for the Gramps Web API can be found at https://gramps-project.github.io/gramps-web-api/.
"},{"location":"dev-backend/queries/","title":"Manual queries","text":"For backend and frontend development, it can be useful to send manual queries to the Gramps Web API. Using HTTPie and jq, this can be done conveniently including JWT authentication.
"},{"location":"dev-backend/queries/#installation","title":"Installation","text":"HTTPie is installed with pip
:
python3 -m pip install httpie\n
You will need HTTPie version 3.0.0 or newer.
jq can be installed in Ubuntu via
sudo apt install jq\n
"},{"location":"dev-backend/queries/#fetching-an-access-token","title":"Fetching an access token","text":"To fetch an access token, query the token endpoint. Assuming your development instance is running on localhost:5555
, you can use the command
http POST http://localhost:5555/api/token/ username=owner password=owner\n
You will see the JSON tokens as output.
Using jq, you can also store the access token in an environment variable:
export ACCESS_TOKEN=$(http POST http://localhost:5555/api/token/ \\\nusername=owner password=owner | jq -r '.access_token')\n
You can now use this token in all API calls that require authentication, e.g.
http -A bearer -a $ACCESS_TOKEN GET http://localhost:5555/api/metadata/\n
Note that, by default, access tokens will expire after 15 minutes.
"},{"location":"dev-backend/setup/","title":"Development setup","text":"This page lists the steps required to start developing Gramps Web API. It will be assumed that you are using Ubuntu Linux.
"},{"location":"dev-backend/setup/#python-version","title":"Python version","text":"The Web API requires Python 3.7 or newer.
"},{"location":"dev-backend/setup/#install-gramps","title":"Install Gramps","text":"The Web API requires the Gramps Python library to be importable. Starting from Gramps 5.2.0, it will be installable via pip
. Right now, development is still based on Gramps 5.1.x, so the most convenient option is to install the Gramps apt
package on Ubuntu
sudo apt install gramps\n
Info
Note that using the gramps
Python package from Gramps installed with apt
requires using the system Python interpreter, so you cannot work in a virtual environment.
Clone the Web API to your PC (assuming you have set up an SSH key with Github) using
git clone git@github.com:gramps-project/gramps-web-api.git\ncd gramps-web-api\n
"},{"location":"dev-backend/setup/#install-prerequisites","title":"Install prerequisites","text":"To start development, please install the dependencies by running
pip3 install -r requirements-dev.txt\n
"},{"location":"dev-backend/setup/#install-the-library-in-editable-mode","title":"Install the library in editable mode","text":"Run
pip3 install -e . --user\n
"},{"location":"dev-backend/setup/#set-up-pre-commit-hooks","title":"Set up pre-commit hooks","text":"To set up the pre-commit hooks for the repository, run
pre-commit install\n
in the repository root. This will e.g. make sure that all source files are nicely formatted with black
."},{"location":"dev-backend/setup/#run-tests","title":"Run tests","text":"To run the unit tests, run
pytest\n
in the repository root."},{"location":"dev-backend/setup/#generate-a-configuration-file","title":"Generate a configuration file","text":"Example content:
TREE=\"My Family Tree\"\nSECRET_KEY=\"not_secure_enough\"\nUSER_DB_URI=\"sqlite:///users.sqlite\"\n
Warning
Do not use this configuration in production.
See Configuration for a full list of config options.
Warning
Do not use your production database for development, but use a copy of it or the Gramps example database.
"},{"location":"dev-backend/setup/#add-users","title":"Add users","text":"You can add a user with owner permissions by running
python3 -m gramps_webapi --config path/to/config user add owner owner --role 4\n
This uses username and password owner
."},{"location":"dev-backend/setup/#run-the-app-in-development-mode","title":"Run the app in development mode","text":"Run
python3 -m gramps_webapi --config path/to/config run\n
The API will be accesible at http://127.0.0.1:5000
by default, which displays an empty page. Access your Gramps data using the API described by gramps-project.github.io/gramps-web-api. For example, to show people go to http://127.0.0.1:5000/api/people
To choose a different port, add the --port
option.
The Gramps Web frontend is written in Javascript and built using web components with Lit. This allows encapsulating functionality into reusable components.
The frontend is designed as a progressive single-page web app with a mobile-first experience. It makes heavy use of Material Web Components for a Material Design look and feel.
"},{"location":"dev-frontend/architecture/","title":"Architecture","text":""},{"location":"dev-frontend/architecture/#components","title":"Components","text":"The frontend is built out of web components. They are defined in the Javascript files in the src
directory.
Typically, each file defines one component, starting with
class GrampsjsSomeElement extends LitElement\n
and ending with customElements.define('grampsjs-some-element', GrampsjsSomeElement)`\n
that defines the new HTML element grampsjs-some-element
that can be used elsewhere. The main entrypoint, included in index.html
, is the gramps-js
element defined in GrampsJs.js
. This contains the definition of all individual pages (that correspond simply to elements that are shown or hidden based on the route/URL), the menu, and routing.
The components in the src/views
directory usually corresponds to full-page components that fetch data from the backend (e.g., the people list view), while components in src/components
are usually smaller building blocks used inside the views that get their data from attributes provided by their parent element. However, this separation is not strict.
Data is exchanged with the Backend/API via the apiGet
, apiPut
, and apiPost
methods in src/api.js
, which automatically take care of authentication.
Data is passed from parent components to child components via properties (see e.g. the Lit documentation).
When data needs to be fed back from a child to a parent component, custom events are used that can be fired with the fireEvent
function in src/api.js
and listened to using Lit's @
syntax (docs).
The refresh token and authentication token are stored in the browser's local storage. Whenever an API call is made and the token is expired, the stored refresh token is used to fetch a new access token and the API call is repeated.
The user's authorization scope, which is stored in the access token's claims, is obtained with the getPermissions
function and used in the top-level GrampsJs
element to set the boolean properties canAdd
, canEdit
, canManageUsers
, which are flowed down to child elements to implement authorization-specific functionality.
To build the frontend for deployment, run
npm run build\n
"},{"location":"dev-frontend/setup/","title":"Development setup","text":"This page describes the steps needed to start with frontend development. It is assumed that you are using Ubuntu Linux and you will need Docker, docker-compose, and git.
"},{"location":"dev-frontend/setup/#step-1-clone-the-repository","title":"Step 1: Clone the repository","text":"Clone the frontend repository
git clone git@github.com:gramps-project/gramps-web.git\ncd gramps-web\n
"},{"location":"dev-frontend/setup/#step-2-build-and-start-the-development-containers","title":"Step 2: Build and start the development containers","text":"To build and start the containers running the Gramps Web backend with the Gramps example database, as well as the frontend in development mode, simply run
docker-compose up -d\n
Options for logging in are: owner, editor, contributor, guest or member (use same word for both username and password).
Warning
Do not use the development server in production.
As part of the build process, git hooks for formatting and linting will be installed as well.
"},{"location":"dev-frontend/setup/#usage-instructions","title":"Usage instructions","text":"Once the containers are up and running, Gramps Web will be accessible at http://localhost:5555.
Info
Note since the *.json
translation files are imported with the new syntax suggested in T39, you must use the Chrome or Chromium browser for the development server to work without errors. This issue is about to change in the future.
Once you make changes to the frontend code, you browser will be reloaded automatically.
The installed git hooks will format and lint the code on every commit. You can run the scripts manually using
docker-compose run gramps-frontend format\n
and docker-compose run gramps-frontend lint\n
respectively."},{"location":"dev-frontend/translation/","title":"Translation","text":"Gramps Web leverages the translations of Gramps Desktop provided by the community for over 40 languages. The additional strings that only needed for the Web app are translated via Weblate.
To contribute, follow the instructions in the Gramps Wiki to get started with Weblate for Gramps. Once authenticated, you can start translating strings both for Gramps Desktop and Gramps Web.
"},{"location":"setup/v2/","title":"Gramps 5.2 upgrade guide","text":"Gramps 5.2 was released on February 23, 2024. Since it uses a new family tree database schema compared to Gramps 5.1, additional steps are necessary when upgrading Gramps Web to be used with Gramps 5.2. This page describes the necessary steps.
"},{"location":"setup/v2/#overview-of-the-steps","title":"Overview of the steps","text":"This is an overview of the steps required to upgrade. It also shows which steps are executed by the administrator of the Gramps Web server, the owner of the family tree, and whether it's needed only for users of the sync addon
Server administrator Tree owner Action \u2713 Back up your family tree \u2713 1 Synchronize Gramps Web with Gramps Desktop \u2713 Update Gramps Web \u2713 Update the tree's database schema \u2713 1 Update Gramps Desktop \u2713 1 Install the updated Sync Addon \u2713 Back up your family tree \u2713 1 Synchronize Gramps Web with Gramps Desktop1 Only needed if you synchronize Gramps Web with Gramps Desktop.
"},{"location":"setup/v2/#overview-of-the-release-status","title":"Overview of the release status","text":"The following table gives an overview of when the components needed for Gramps Web with Gramps 5.2 have been released.
Component Released Gramps 5.2.0 2024-02-23 \u2713 Gramps Web Sync Addon 1.0.4 for Gramps 5.2 2024-02-23 \u2713 Gramps Web API 2.0.0 2024-02-28 \u2713 Gramps Web 23.3.0 2024-02-28 \u2713"},{"location":"setup/v2/#detailed-steps","title":"Detailed steps","text":"This section provides more details about some of the individual steps above.
"},{"location":"setup/v2/#back-up-your-family-tree","title":"Back up your family tree","text":"In Gramps Web, go to the \"Export\" page and select \"Gramps XML (family tree)\" (the default option). Click \"Generate\" and wait until the download of the .gramps file starts.
You can also create a backup in Gramps Desktop in the usual way.
"},{"location":"setup/v2/#update-the-trees-database-schema","title":"Update the tree's database schema","text":"When you access Gramps Web for the first time after having upgraded it, you will be presented with a screen showing the message:
The Family Tree you are trying to load is in a schema version not supported by this version of Gramps Web. Therefore you cannot load this Family Tree without upgrading its schema. This action cannot be undone.
You can now click on the button \"Upgrade Family Tree\". It will show a progress bar and should not take more than a minute to complete. Don't worry, if you accidentally close your browser window, the conversion will continue in the background.
Warning
If you use a non-standard setup without background task queue, the database upgrade might fail and your family tree might get corrupted. You can check (before updating Gramps Web) if you are using a background task queue by going to the \"System Information\" section in the settings and making sure it has \"task queue: true\".
"},{"location":"setup/v2/#update-gramps-desktop","title":"Update Gramps Desktop","text":"Follow the Gramps Desktop installation instructions for your operating system.
"},{"location":"setup/v2/#install-the-updated-sync-addon","title":"Install the updated Sync Addon","text":"You can use the new Plugin Manager included in Gramps 5.2 - just search for Gramps Web Sync, click on install, and restart Gramps.
"},{"location":"user-guide/","title":"Introduction","text":"This section contains the documentation for users of Gramps Web.
"},{"location":"user-guide/blog/","title":"Use the built-in blog","text":"The blog is meant for presenting stories about your family history research.
In the Gramps database, blog posts are represented as sources with a note attached, containg the blog's text, and optionally, media files for the images of the blog post. Gramps Web treats every source with a tag Blog
as blog article.
To add a blog post, you can use Gramps Web or Gramps Dekstop (synchronized with Gramps Web), the steps are the same in both cases:
Blog
to the source (create it if it doesn't exist)Since blog posts are just sources, all blog articles also appear on the list of sources and show up as sources in searches. In the source view, there is a button \"show in blog\" that will take you to the blog view for that blog post. The URL of the blog post also contains the Gramps ID of the corresponding source, so an article at yourdomain.com/blog/S0123
corresponds to the source at yourdomain.com/source/S0123
.
At the bottom of every blog post, there is a button \"details\" that will take you to the source view.
"},{"location":"user-guide/dna/","title":"DNA segment map","text":"The DNA segment map view, accessible under the \"DNA\" tab in the person view, shows DNA matches with other people in the tree as segments highlighted on the person's chromosomes.
This feature does not rely on raw DNA data being uploaded to Gramps Web, but on the segment match data directly, which can be obtained from websites like Gedmatch or MyHeritage.
The DNA segment map is based on the Gramplet Addon that provides the same functionality in Gramps Desktop. Its wiki page contains more details about how to obtain the data, how to interpret it, and how to enter the data in Gramps.
The data is added as notes attached to associations (or attached to association citations), which is possible directly in Gramps Web.
"},{"location":"user-guide/export/","title":"Export data","text":""},{"location":"user-guide/export/#back-up-your-family-tree","title":"Back up your family tree","text":"To create a backup of your family tree, open the Export page in Gramps Web and select the Gramps XML format.
Clicking on \"export\" will generate the file and start the download once it is ready.
Note that if your Gramps Web user does not have permission to view private records, the export will not be a full backup, since it will not contain any private records.
"},{"location":"user-guide/export/#share-your-family-tree-with-users-of-other-genealogy-programs","title":"Share your family tree with users of other genealogy programs","text":"When sharing genealogical data as Gramps XML is not an option, you can also export a GEDCOM file. Note that this is not suited as a backup of your Gramps Web tree.
"},{"location":"user-guide/export/#back-up-your-media-files","title":"Back up your media files","text":"To back up your media files, you can create and download a ZIP archive of all media files on the Export page.
Note that, especially for large trees, this can be an expensive operation for the server and should only be done if absolutely necessary.
A better option to back up your media files on a regular basis is to use the Gramps Web Sync addon (which itself is not a backup solution) and create incremental backups on your local computer.
In both bases, if your Gramps Web user does not have permission to view private records, the export will not contain files of private media objects.
"},{"location":"user-guide/export/#move-to-a-different-gramps-web-instance","title":"Move to a different Gramps Web instance","text":"Gramps Web does not lock you in with a specific provider and you can always move to a different Gramps Web instance without loosing any data, and without having direct access to either of the servers.
To achieve a full migration, follow these steps (assuming you have tree owner permissions):
.gramps
) file. If you use the Sync addon, you can also generate the export in Gramps desktop..gramps
file exported in step 1.Note that, while your user accounts will be migrated, all your users will need to set new passwords by using the \"forgot password\" link, since passwords are stored in encrypted form and cannot be exported.
"},{"location":"user-guide/first-login/","title":"First login","text":"When logging in to Gramps Web for the first time, a form will be displayed requiring the user to select a language for the frontend and a home person.
This home person does not have to coincide with the home person in Gramps desktop \u2013 it is a personal setting for every user of Gramps Web. The home person is used e.g. for the initial view of the family tree. A typical choice would be for a user to select themselves as home person.
To select a person as home person, start typing in the text field and a drop-down list with matches will appear.
The language and home person settings are stored in the browser's local storage, so they will persist on a given device.
"},{"location":"user-guide/gql/","title":"Filter using the Gramps Query Language","text":"The object list views (people, families, events, ...) have an optional advanced filter mode based on the Gramps Query Language (GQL).
To use it, type a query in GQL syntax and press enter (or hit the \"apply\" button). The view will be filtered by the query. If the query is invalid, the input field's frame turns red.
The GQL syntax is described below, copied from the GQL documentation.
"},{"location":"user-guide/gql/#syntax","title":"Syntax","text":"A GQL query is a string composed of statements of the form property operator value
, optionally combined with the keywords and
and or
as well as parentheses.
class
","text":"Filters for the Gramps object class and can be one of person
, family
, event
, place
, citation
, source
, repository
, media
, or note
.
GQL supports querying nested properties of Gramps objects, e.g. primary_name.date.calendar
. See below for a full list of properties \u2013 see also Gramps Data Model.
Individual elements in list-like properties can be accessed by positional index in square brackets. This can be combined with nested properties, e.g. primary_name.surname_list[0].surname
.
length
","text":"This is a special property that returns the length of an array-like Gramps property, e.g. media_list.length > 0
to get objects with media references.
all
, any
","text":"Two more special properties for array-like Gramps properties. all
requires a condition to apply to all items of the list, any
requires it to apply to at least one item. Both properties can be combined with other properties before and after. Examples: media_list.any.citation_list.length > 0
to return objects with media references that have citations; media_list.all.citation_list.length = 0
to return objects where all media objects do not have citations.
A numerical array index can be used to access specific elements of a list, e.g. child_ref_list[0]
for the first child.
get_person
, etc.","text":"While all the preceding properties refer to a single Gramps object, it is also possible to filter on different objects referred to by the initial object. For instance, an event has a place handle in its place
property. Using the get_place
pseudo-property, GQL switches to the properties of that object. For instance, it is possible to search for class = event and place.get_place.name.value ~ York
. This can also be combined with any
or all
, e.g. class = person and event_ref_list.any.ref.get_event.description ~ farmer
.
=
, !=
","text":"Equality or inequality. Examples: class = person
, class != family
>
, >=
, <
, <=
","text":"Comparison. Works for strings as well as numbers. Examples: confidence <= 1
, change > 1712477760
, gramps_id > \"I2015\"
~
, !~
","text":"Contains or does not contain. Works for lists as well as strings. Examples: gramps_id !~ F00
, author ~ David
, family_list ~ \"3a16680f7d226e3ac3eefc8b57a\"
If no operator and value is given, the value is interpreted as a boolean (true or false). This works for all types of properties and Python rules for casting to true/false are applied. For instance, the query private
returns private objects; confidence
returns objects where confidence is greater than 0; media_list
returns objects with at least one media reference.
Values can be numbers or strings. If numbers should be interpreted as strings or special characters like = are involved, enclose the value in strings. Examples: gramps_id = F0001
, but gramps_id = \"0001\"
.
class = note and private and text.string ~ David\n
All private notes that contain the string \"David\" in their text
media_list.length >= 10\n
All objects (of any class) with 10 or more media references
class != person and media_list.any.rect\n
All objects that are not a person but have a media reference that is part of an image. Here, media_list.any.rect
means that for each of the items in the media list, it is checked whether the rect
(rectangle) property has a truthy value, meaning it is a non-empty list. (media_list.any.rect.length > 0
would have the same effect.)
class = family and child_ref_list.length > 10\n
Families with more than 10 children.
class = event and date.modifier = 0 and date.dateval[2] > 2020\n
Events where the date is a normal date (not a range etc.) and the year is after 2020.
note_list.any.get_note.text.string ~ \"David\"\n
All objects with at least one note that contains the string \"David\" in their text.
class = family and child_ref_list.all.ref.get_person.gender = 0 and child_ref_list.length = 3\n
All families with three daughters.
"},{"location":"user-guide/gql/#full-list-of-gramps-properties","title":"Full list of Gramps Properties","text":"For a full list of Gramps properties, see the GQL documentation.
"},{"location":"user-guide/import/","title":"Import data","text":""},{"location":"user-guide/import/#prepare-your-gramps-database","title":"Prepare your Gramps database","text":"If you are using Gramps Desktop, there are two steps to prepare your database to make sure everything will run smoothly in the following. If you are migrating from a different genealogy program, you can skip this step.
To import an existing family tree, use the \"Import\" page and upload a file in any of the file formats supported by Gramps \u2013 see Import from another genealogy program in the Gramps Wiki.
If you already use Gramps Desktop, it is strongly recommended to use the Gramps XML (.gramps
) format to ensure your online and offline trees use the same identifiers and can be synchronized.
While Gramps XML (.gramps
) is the preferred format for importing data, Gramps XML package (.gpkg
) is not supported by Gramps Web. This is because the import and export routines for media files are not suited for use on a web server.
To import the media files belonging to an imported .gramps
file, see the next section.
If you have uploaded a family tree and need to upload the corresponding media files, you can use the \"import media archive\" button on the \"Import\" page.
It expects a ZIP file with the missing media files inside. The folder structure in the ZIP file does not have to be the same as the folder structure inside the Gramps media folder as the files are matched to media objects by their checksum.
Note that this feature only works for files that have the correct checksum in the Gramps database (which should be ensured by running the check and repair tool in the first step).
When moving to Gramps Web from a different genalogy program including media files, it is recommended to first import everything into Gramps Desktop, which has more options to associate existing media files with an imported tree.
"},{"location":"user-guide/media/","title":"Add media files","text":"There are two ways to add a new media file (an image, audio file, video file, or any other file):
"},{"location":"user-guide/media/#add-a-new-standalone-media-file","title":"Add a new standalone media file","text":"To add a standalone media file, click the + icon in the top app bar and select \"Media Object\".
Click on \"select a file\" to select a file from your computer. On a mobile device, clicking this button will give you the option of directly taking a photo with your device's camera.
Optionally,
Click \"add\" to upload the file and create the media object.
"},{"location":"user-guide/media/#add-a-new-media-file-and-link-it-to-another-object","title":"Add a new media file and link it to another object","text":"The following object types in Gramps can have media objects attached: people, families, events, places, sources, and citations.
In the detail view of any object, click the blue edit button in the bottom right (if you do not see it, your user does not have edit permissions). Click on the \"gallery\" tab and click the blue + button.
A dialog will open that offers the same fields as described in the previous section. Click \"save\" to upload the file, add a new media object, and link it to the viewed object.
"},{"location":"user-guide/owner/","title":"Create an account for the tree owner","text":"Before you can start using Gramps Web, you need to create an account for the tree owner. If no user account exists for a given tree, a form will be shown to create an account. The form depends on the server setup being for a single tree or for multiple trees.
"},{"location":"user-guide/owner/#single-tree-setup-create-admin-account","title":"Single-tree setup: create admin account","text":"On a server with single-tree setup, when no user account exists yet, opening Gramps Web shows a form to create an admin account. The admin user will be both the owner of the (single) tree and the administrator of the installation. The form also allows setting the e-mail configuration needed for e-mail notifications (e.g. resetting a user password). If the e-mail configuration has already been added via a configuration file or environment variables on the server, this part of the form can be left empty.
The form also allows to import genealogical data by uploading a file. This can also be done later from the \"Import\" page in Gramps Web (see Import data).
"},{"location":"user-guide/owner/#multi-tree-setup-create-admin-account","title":"Multi-tree setup: create admin account","text":"In a multi-tree setup, the same form to create an admin account will be shown if no users exists in any tree, i.e. when the server has just been created.
"},{"location":"user-guide/owner/#multi-tree-setup-create-tree-owner-account","title":"Multi-tree setup: create tree owner account","text":"In a multi-tree setup, every user is tied to a single tree. Even if users already exist in other trees, a tree owner can be created in the web interface if no owner exists for this tree yet.
However, the owner creation form will not be displayed automatically on the Gramps Web home page, which is the same for all trees. Instead, it can be reached at https://my-gramps-instance/firstrun/my-tree-id
, where https://my-gramps-instance
is the base address of your Gramps Web installation, and my-tree-id
is the ID of your tree.
A possible workflow for a site administrator to create a new tree is to
The tree owner creation form is analogous to the admin creation form described above, except that it does not allow to change the e-mail configuration (which is only allowed for admins).
"},{"location":"user-guide/registration/","title":"Registration","text":"In a single-tree installation, anybody can register a new account at a Gramps Web instance, but it will need to be enabled manually by a site owner before it can be used to log in.
In a multi-tree installation, users additionally require the tree ID to sign up; in practice, this means they can sign up using a registration link shared by the tree owner.
"},{"location":"user-guide/registration/#1-find-registration-form","title":"1. Find registration form","text":"On the login form on the home page of Gramps Web, usually there is a link \"Register new account\".
If this link is missing, it is probably because it is a multi-tree installation of Gramps Web. In that case, contact the tree owner for a registration link.
The tree owner can find and copy the registration link under Settings/Administration.
"},{"location":"user-guide/registration/#2-submit-registration-form","title":"2. Submit registration form","text":"The registration form has four mandatory fields: username, password, e-mail address, and full name. When all four fields have been filled, click \"submit\" to start the registration process.
"},{"location":"user-guide/registration/#3-confirm-e-mail-address","title":"3. Confirm e-mail address","text":"After the form has been submitted, an automated e-mail will be sent to the e-mail address provided containing an e-mail confirmation link. Clicking it will open a confirmation page.
If the confirmation e-mail does not arrive (and you have checked your Spam folder), it could be that e-mail has not been configured correctly by the Gramps Web server administrator.
"},{"location":"user-guide/registration/#4-enable-account","title":"4. Enable account","text":"After the e-mail address has been confirmed, the tree owner will receive an e-mail notification and can enable the new user account by going to the \"User administration\" section in settings page (accessible via the user icon in the top app bar) and changing the user role from \"disabled\" to any of the other roles.
Note that the new user will not receive an automated notification that their account has been enabled, so it is advisible for the administrator to notify them personally.
"},{"location":"user-guide/revisions/","title":"Revision History","text":"The revision history view shows all edits that have been made to the family tree.
The list view shows the edits grouped by \"transactions\". A transaction is a group of one or more additions, deletions, or changes to Gramps objects. For instance, adding a new family with two existing persons as father and mother generates a transaction with one added family object and two modified person objects (because they contain the link to the new family object).
Clicking on a transaction opens the transaction detail view. It contains the list of individual additions, deletions, and updates by Gramps object.
Selecting an indivdial change opens a view of the raw JSON representation of the Gramps object with additions and deletions highlighted in green and red, respectively.
"},{"location":"user-guide/sync/","title":"Synchronize Gramps Web and Gramps Desktop","text":"Gramps Web Sync is an addon for Gramps that allows to synchronize your Gramps database on your desktop computer with Gramps Web, including media files.
Warning
As with any synchronization tool, please do not consider this as a backup tool. An accidental deletion on one side will be propagated to the other side. Make sure to create regular backups (in Gramps XML format) of your family tree.
Using Gramps Web Sync requires tree owner permissions in Gramps Web.
"},{"location":"user-guide/sync/#installation","title":"Installation","text":"The addon requires Gramps 5.2 running on Python 3.8 or newer. It is available in Gramps Desktop and can be installed in the usual way.
Warn
Please make sure to use the same version of Gramps on your desktop as the one running on your server. See the Get Help section for how to find out which Gramps version your server is running. The Gramps version has the form MAJOR.MINOR.PATCH
, and MAJOR
and MINOR
must be the same on web and desktop.
Optional step:
keyring
(e.g. sudo apt install python3-keyring
) to allow storing the API password safely in your system's password manager Once installed, the addon is availabe in Gramps under Tools > Family Tree Processing > Gramps\u00a0Web\u00a0Sync. Once started, and after confirming the dialog that the undo history will be discarded, the tool will ask you for the base URL (example: https://mygrampsweb.com/
) of your Gramps Web instance, your username, and password. You need an account with owner privileges To sync changes back to your remote database. The username and URL will be stored in plain text in your Gramps user directory, the password will only be stored if keyring
is installed (see above).
If there are any changes, the tool will display a confirmation dialog before applying the changes. (At present, the confirmation dialog only shows the Gramps IDs of the affected objects.)
"},{"location":"user-guide/sync/#media-file-synchronization","title":"Media file synchronization","text":"After the databases have been synchronized, the tool checks for any new or updated media files. It displays the files missing locally or on the remote server and, upon user confirmation, tries to download and upload the files.
Limitations:
The addon is meant to keep a local Gramps database in sync with a remote Gramps Web database, to allow both local and remote changes (collaborative editing).
It is not suited
The principles of operation of the tool are very simple:
This algorithm is simple and robust as it does not require tracking syncrhonization history. However, it works best when you synchronize often.
"},{"location":"user-guide/tagging/","title":"Tag people in photos","text":"Gramps Web allows tagging people in photographs, similar to Gramps Desktop, linking the person and the media object. This is simplified by automated face detection.
To tag a person in a photo, follow these steps:
Gramps Web contains a built-in genealogical task management tool. It is meant to enable reserarches to plan and prioritize, but also document their tasks. This is why tasks are represented as sources in the Gramps database. After completing a task, the associated content can serve as a source documenting the research process.
"},{"location":"user-guide/tasks/#task-basics","title":"Task basics","text":"Tasks have the following properties:
ToDo
label to identify them as tasks, but this label is hidden in the task list to avoid clutter.)Since tasks are normal Gramps objects, they can be edited or created by the same group of users that can edit or create other objects (like people or events).
To create a task, click on the + button on the task list page. Enter at least a title. The status will always be \"Open\" on creation.
"},{"location":"user-guide/tasks/#edit-a-task","title":"Edit a task","text":"To any of the task's details, click on it in the task list.
The task detail page does not have a separate \"edit mode\" like other Gramps objects. Changes to the title, status, and priority are applied immediately. Changes to the rich-text description require clicking the \"save\" button beneath it.
"},{"location":"user-guide/tasks/#bulk-change-of-task-properties","title":"Bulk change of task properties","text":"The priority and status of tasks can be changed in bulk by using the checkboxes in the task list for selection and the appropriate buttons above the task list.
"},{"location":"user-guide/tasks/#tasks-in-gramps-desktop","title":"Tasks in Gramps Desktop","text":"When adding tasks via Gramps Web, both the sources and the notes will have the ToDo
tag attached to them, so the tasks will show up in the desktop To Do Notes Gramplet as well as the To Do Report.
To add or edit a task in Gramps Desktop, use the following guidelines
ToDo
and the task title as titleToDo
, type \"To Do\", and the description as textThis section deals with the installation and setup of Gramps Web, as well as other options to get started.
+Gramps Web is a web app that runs on a server and is accessed via the web browser. It is meant to be made accessible to authenticated users via the internet.
+If you want to use Gramps Web for your genealogical research data, you have to choose one of the following options:
+While the first option gives you maximal flexibility and control, it can also be technically challenging.
+Tip
+One of the main principles of Gramps Web is to put users in control of their own data at any time, so migrating data from one instance to another is simple. Don't worry about being locked in after having chosen one of the options!
+The most convenient way to self-host Gramps Web is via Docker Compose. We also provide Docker images for the ARM architecture, so you can run Gramps Web on a Raspberry Pi in your basement.
+See Deploy with Docker for setup instructions.
+Installing Gramps Web can be more challenging than other, simple web applications and is not compatible with ordinary "shared hosting" providers. You can sign up for a virtual server and install Gramps Web manually.
+A simpler option is to use a pre-installed cloud image. One example is our DigitalOcean 1-click app.
+A hosted Gramps Web is the easiest way to get started with Gramps Web, since no installation or configuration is required.
+Here is a list of dedicated hosting providers for Gramps Web (the Gramps open source community does not take responsibility for their services):
+If you use a hosted option for Gramps Web, you can skip the rest of this section and jump right to the Administration section.
+ + + + + + +Gramps 5.2 was released on February 23, 2024. Since it uses a new family tree database schema compared to Gramps 5.1, additional steps are necessary when upgrading Gramps Web to be used with Gramps 5.2. This page describes the necessary steps.
+This is an overview of the steps required to upgrade. +It also shows which steps are executed by the administrator of the Gramps Web server, the owner of the family tree, and whether it's needed only for users of the sync addon
+Server administrator | +Tree owner | +Action | +
---|---|---|
+ | ✓ | +Back up your family tree | +
+ | ✓ 1 | +Synchronize Gramps Web with Gramps Desktop | +
✓ | ++ | Update Gramps Web | +
+ | ✓ | +Update the tree's database schema | +
+ | ✓ 1 | +Update Gramps Desktop | +
+ | ✓ 1 | +Install the updated Sync Addon | +
+ | ✓ | +Back up your family tree | +
+ | ✓ 1 | +Synchronize Gramps Web with Gramps Desktop | +
1 Only needed if you synchronize Gramps Web with Gramps Desktop.
+The following table gives an overview of when the components needed for Gramps Web with Gramps 5.2 have been released.
+Component | +Released | +
---|---|
Gramps 5.2.0 | +2024-02-23 ✓ | +
Gramps Web Sync Addon 1.0.4 for Gramps 5.2 | +2024-02-23 ✓ | +
Gramps Web API 2.0.0 | +2024-02-28 ✓ | +
Gramps Web 23.3.0 | +2024-02-28 ✓ | +
This section provides more details about some of the individual steps above.
+In Gramps Web, go to the "Export" page and select "Gramps XML (family tree)" (the default option). Click "Generate" and wait until the download of the .gramps file starts.
+You can also create a backup in Gramps Desktop in the usual way.
+When you access Gramps Web for the first time after having upgraded it, you will be presented with a screen showing the message:
+++The Family Tree you are trying to load is in a schema version not supported by this version of Gramps Web. Therefore you cannot load this Family Tree without upgrading its schema. This action cannot be undone.
+
You can now click on the button "Upgrade Family Tree". It will show a progress bar and should not take more than a minute to complete. Don't worry, if you accidentally close your browser window, the conversion will continue in the background.
+Warning
+If you use a non-standard setup without background task queue, the database upgrade might fail and your family tree might get corrupted. You can check (before updating Gramps Web) if you are using a background task queue by going to the "System Information" section in the settings and making sure it has "task queue: true".
+Follow the Gramps Desktop installation instructions for your operating system.
+You can use the new Plugin Manager included in Gramps 5.2 - just search for Gramps Web Sync, click on install, and restart Gramps.
+ + + + + + +The blog is meant for presenting stories about your family history research.
+In the Gramps database, blog posts are represented as sources with a note attached, containg the blog's text, and optionally, media files for the images of the blog post. Gramps Web treats every source with a tag Blog
as blog article.
To add a blog post, you can use Gramps Web or Gramps Dekstop (synchronized with Gramps Web), the steps are the same in both cases:
+Blog
to the source (create it if it doesn't exist)Since blog posts are just sources, all blog articles also appear on the list of sources and show up as sources in searches. In the source view, there is a button "show in blog" that will take you to the blog view for that blog post. The URL of the blog post also contains the Gramps ID of the corresponding source, so an article at yourdomain.com/blog/S0123
corresponds to the source at yourdomain.com/source/S0123
.
At the bottom of every blog post, there is a button "details" that will take you to the source view.
+ + + + + + +The DNA segment map view, accessible under the "DNA" tab in the person view, shows DNA matches with other people in the tree as segments highlighted on the person's chromosomes.
+This feature does not rely on raw DNA data being uploaded to Gramps Web, but on the segment match data directly, which can be obtained from websites like Gedmatch or MyHeritage.
+The DNA segment map is based on the Gramplet Addon that provides the same functionality in Gramps Desktop. Its wiki page contains more details about how to obtain the data, how to interpret it, and how to enter the data in Gramps.
+The data is added as notes attached to associations (or attached to association citations), which is possible directly in Gramps Web.
+ + + + + + +To create a backup of your family tree, open the Export page in Gramps Web and select the Gramps XML format.
+Clicking on "export" will generate the file and start the download once it is ready.
+Note that if your Gramps Web user does not have permission to view private records, the export will not be a full backup, since it will not contain any private records.
+When sharing genealogical data as Gramps XML is not an option, you can also export a GEDCOM file. Note that this is not suited as a backup of your Gramps Web tree.
+To back up your media files, you can create and download a ZIP archive of all media files on the Export page.
+Note that, especially for large trees, this can be an expensive operation for the server and should only be done if absolutely necessary.
+A better option to back up your media files on a regular basis is to use the Gramps Web Sync addon (which itself is not a backup solution) and create incremental backups on your local computer.
+In both bases, if your Gramps Web user does not have permission to view private records, the export will not contain files of private media objects.
+Gramps Web does not lock you in with a specific provider and you can always move to a different Gramps Web instance without loosing any data, and without having direct access to either of the servers.
+To achieve a full migration, follow these steps (assuming you have tree owner permissions):
+.gramps
) file. If you use the Sync addon, you can also generate the export in Gramps desktop..gramps
file exported in step 1.Note that, while your user accounts will be migrated, all your users will need to set new passwords by using the "forgot password" link, since passwords are stored in encrypted form and cannot be exported.
+ + + + + + +When logging in to Gramps Web for the first time, a form will be displayed requiring the user to select a language for the frontend and a home person.
+This home person does not have to coincide with the home person in Gramps desktop – it is a personal setting for every user of Gramps Web. The home person is used e.g. for the initial view of the family tree. A typical choice would be for a user to select themselves as home person.
+To select a person as home person, start typing in the text field and a drop-down list with matches will appear.
+The language and home person settings are stored in the browser's local storage, so they will persist on a given device.
+ + + + + + +The object list views (people, families, events, ...) have an optional advanced filter mode based on the Gramps Query Language (GQL).
+To use it, type a query in GQL syntax and press enter (or hit the "apply" button). The view will be filtered by the query. If the query is invalid, the input field's frame turns red.
+The GQL syntax is described below, copied from the GQL documentation.
+A GQL query is a string composed of statements of the form property operator value
, optionally combined with the keywords and
and or
as well as parentheses.
class
Filters for the Gramps object class and can be one of person
, family
, event
, place
, citation
, source
, repository
, media
, or note
.
GQL supports querying nested properties of Gramps objects, e.g. primary_name.date.calendar
. See below for a full list of properties – see also Gramps Data Model.
Individual elements in list-like properties can be accessed by positional index in square brackets. This can be combined with nested properties, e.g. primary_name.surname_list[0].surname
.
length
This is a special property that returns the length of an array-like Gramps property, e.g. media_list.length > 0
to get objects with media references.
all
, any
Two more special properties for array-like Gramps properties. all
requires a condition to apply to all items of the list, any
requires it to apply to at least one item. Both properties can be combined with other properties before and after. Examples: media_list.any.citation_list.length > 0
to return objects with media references that have citations; media_list.all.citation_list.length = 0
to return objects where all media objects do not have citations.
A numerical array index can be used to access specific elements of a list, e.g. child_ref_list[0]
for the first child.
get_person
, etc.While all the preceding properties refer to a single Gramps object, it is also possible to filter on different objects referred to by the initial object. For instance, an event has a place handle in its place
property. Using the get_place
pseudo-property, GQL switches to the properties of that object. For instance, it is possible to search for class = event and place.get_place.name.value ~ York
. This can also be combined with any
or all
, e.g. class = person and event_ref_list.any.ref.get_event.description ~ farmer
.
=
, !=
Equality or inequality. Examples: class = person
, class != family
>
, >=
, <
, <=
Comparison. Works for strings as well as numbers. Examples: confidence <= 1
, change > 1712477760
, gramps_id > "I2015"
~
, !~
Contains or does not contain. Works for lists as well as strings. Examples: gramps_id !~ F00
, author ~ David
, family_list ~ "3a16680f7d226e3ac3eefc8b57a"
If no operator and value is given, the value is interpreted as a boolean (true or false). This works for
+all types of properties and Python rules for casting to true/false are applied. For instance, the query private
returns private objects; confidence
returns objects where confidence is greater than 0; media_list
returns objects with at least one media reference.
Values can be numbers or strings. If numbers should be interpreted as strings or special characters like = are involved, enclose the value in strings. Examples: gramps_id = F0001
, but gramps_id = "0001"
.
class = note and private and text.string ~ David
+
All private notes that contain the string "David" in their text
+media_list.length >= 10
+
All objects (of any class) with 10 or more media references
+class != person and media_list.any.rect
+
All objects that are not a person but have a media reference that is part of an image. Here, media_list.any.rect
means that for each of the items in the media list, it is checked whether the rect
(rectangle) property has a truthy value, meaning it is a non-empty list. (media_list.any.rect.length > 0
would have the same effect.)
class = family and child_ref_list.length > 10
+
Families with more than 10 children.
+class = event and date.modifier = 0 and date.dateval[2] > 2020
+
Events where the date is a normal date (not a range etc.) and the year is after 2020.
+note_list.any.get_note.text.string ~ "David"
+
All objects with at least one note that contains the string "David" in their text.
+class = family and child_ref_list.all.ref.get_person.gender = 0 and child_ref_list.length = 3
+
All families with three daughters.
+For a full list of Gramps properties, see the GQL documentation.
+ + + + + + +If you are using Gramps Desktop, there are two steps to prepare your database to make sure everything will run smoothly in the following. If you are migrating from a different genealogy program, you can skip this step.
+To import an existing family tree, use the "Import" page and upload a file in any of the file formats supported by Gramps – see Import from another genealogy program in the Gramps Wiki.
+If you already use Gramps Desktop, it is strongly recommended to use the Gramps XML (.gramps
) format to ensure your online and offline trees use the same identifiers and can be synchronized.
While Gramps XML (.gramps
) is the preferred format for importing data, Gramps XML package (.gpkg
) is not supported by Gramps Web. This is because the import and export routines for media files are not suited for use on a web server.
To import the media files belonging to an imported .gramps
file, see the next section.
If you have uploaded a family tree and need to upload the corresponding media files, you can use the "import media archive" button on the "Import" page.
+It expects a ZIP file with the missing media files inside. The folder structure in the ZIP file does not have to be the same as the folder structure inside the Gramps media folder as the files are matched to media objects by their checksum.
+Note that this feature only works for files that have the correct checksum in the Gramps database (which should be ensured by running the check and repair tool in the first step).
+When moving to Gramps Web from a different genalogy program including media files, it is recommended to first import everything into Gramps Desktop, which has more options to associate existing media files with an imported tree.
+ + + + + + +This section contains the documentation for users of Gramps Web.
+ + + + + + + + +There are two ways to add a new media file (an image, audio file, video file, or any other file):
+To add a standalone media file, click the + icon in the top app bar and select "Media Object".
+Click on "select a file" to select a file from your computer. On a mobile device, clicking this button will give you the option of directly taking a photo with your device's camera.
+Optionally,
+Click "add" to upload the file and create the media object.
+The following object types in Gramps can have media objects attached: people, families, events, places, sources, and citations.
+In the detail view of any object, click the blue edit button in the bottom right (if you do not see it, your user does not have edit permissions). Click on the "gallery" tab and click the blue + button.
+A dialog will open that offers the same fields as described in the previous section. Click "save" to upload the file, add a new media object, and link it to the viewed object.
+ + + + + + +Before you can start using Gramps Web, you need to create an account for the tree owner. If no user account exists for a given tree, a form will be shown to create an account. The form depends on the server setup being for a single tree or for multiple trees.
+On a server with single-tree setup, when no user account exists yet, opening Gramps Web shows a form to create an admin account. The admin user will be both the owner of the (single) tree and the administrator of the installation. The form also allows setting the e-mail configuration needed for e-mail notifications (e.g. resetting a user password). If the e-mail configuration has already been added via a configuration file or environment variables on the server, this part of the form can be left empty.
+The form also allows to import genealogical data by uploading a file. This can also be done later from the "Import" page in Gramps Web (see Import data).
+In a multi-tree setup, the same form to create an admin account will be shown if no users exists in any tree, i.e. when the server has just been created.
+In a multi-tree setup, every user is tied to a single tree. Even if users already exist in other trees, a tree owner can be created in the web interface if no owner exists for this tree yet.
+However, the owner creation form will not be displayed automatically on the Gramps Web home page, which is the same for all trees. Instead, it can be reached at https://my-gramps-instance/firstrun/my-tree-id
, where https://my-gramps-instance
is the base address of your Gramps Web installation, and my-tree-id
is the ID of your tree.
A possible workflow for a site administrator to create a new tree is to
+The tree owner creation form is analogous to the admin creation form described above, except that it does not allow to change the e-mail configuration (which is only allowed for admins).
+ + + + + + +In a single-tree installation, anybody can register a new account at a Gramps Web instance, but it will need to be enabled manually by a site owner before it can be used to log in.
+In a multi-tree installation, users additionally require the tree ID to sign up; in practice, this means they can sign up using a registration link shared by the tree owner.
+On the login form on the home page of Gramps Web, usually there is a link "Register new account".
+If this link is missing, it is probably because it is a multi-tree installation of Gramps Web. In that case, contact the tree owner for a registration link.
+The tree owner can find and copy the registration link under Settings/Administration.
+The registration form has four mandatory fields: username, password, e-mail address, and full name. When all four fields have been filled, click "submit" to start the registration process.
+After the form has been submitted, an automated e-mail will be sent to the e-mail address provided containing an e-mail confirmation link. Clicking it will open a confirmation page.
+If the confirmation e-mail does not arrive (and you have checked your Spam folder), it could be that e-mail has not been configured correctly by the Gramps Web server administrator.
+After the e-mail address has been confirmed, the tree owner will receive an e-mail notification and can enable the new user account by going to the "User administration" section in settings page (accessible via the user icon in the top app bar) and changing the user role from "disabled" to any of the other roles.
+Note that the new user will not receive an automated notification that their account has been enabled, so it is advisible for the administrator to notify them personally.
+ + + + + + +The revision history view shows all edits that have been made to the family tree.
+The list view shows the edits grouped by "transactions". A transaction is a group of one or more additions, deletions, or changes to Gramps objects. For instance, adding a new family with two existing persons as father and mother generates a transaction with one added family object and two modified person objects (because they contain the link to the new family object).
+Clicking on a transaction opens the transaction detail view. It contains the list of individual additions, deletions, and updates by Gramps object.
+Selecting an indivdial change opens a view of the raw JSON representation of the Gramps object with additions and deletions highlighted in green and red, respectively.
+ + + + + + +Gramps Web Sync is an addon for Gramps that allows to synchronize your Gramps database on your desktop computer with Gramps Web, including media files.
+Warning
+As with any synchronization tool, please do not consider this as a backup tool. An accidental deletion on one side will be propagated to the other side. Make sure to create regular backups (in Gramps XML format) of your family tree.
+Using Gramps Web Sync requires tree owner permissions in Gramps Web.
+The addon requires Gramps 5.2 running on Python 3.8 or newer. +It is available in Gramps Desktop and can be installed in the usual way.
+Warn
+Please make sure to use the same version of Gramps on your desktop as the one running on your server. See the Get Help section for how to find out which Gramps version your server is running. The Gramps version has the form MAJOR.MINOR.PATCH
, and MAJOR
and MINOR
must be the same on web and desktop.
Optional step:
+keyring
(e.g. sudo apt install python3-keyring
) to allow storing the API password safely in your system's password manager Once installed, the addon is availabe in Gramps under Tools > Family Tree Processing > Gramps Web Sync. Once started, and after confirming the dialog that the undo history will be discarded, the tool will ask you for the base URL (example: https://mygrampsweb.com/
) of your Gramps Web instance, your username, and password. You need an account with owner privileges To sync changes back to your remote database. The username and URL will be stored in plain text in your Gramps user directory, the password will only be stored if keyring
is installed (see above).
If there are any changes, the tool will display a confirmation dialog before applying the changes. (At present, the confirmation dialog only shows the Gramps IDs of the affected objects.)
+After the databases have been synchronized, the tool checks for any new or updated media files. It displays the files missing locally or on the remote server and, upon user confirmation, tries to download and upload the files.
+Limitations:
+The addon is meant to keep a local Gramps database in sync with a remote Gramps Web database, to allow both local and remote changes (collaborative editing).
+It is not suited
+The principles of operation of the tool are very simple:
+This algorithm is simple and robust as it does not require tracking syncrhonization history. However, it works best when you synchronize often.
+ + + + + + +Gramps Web allows tagging people in photographs, similar to Gramps Desktop, linking the person and the media object. This is simplified by automated face detection.
+To tag a person in a photo, follow these steps:
+Gramps Web contains a built-in genealogical task management tool. It is meant to enable reserarches to plan and prioritize, but also document their tasks. This is why tasks are represented as sources in the Gramps database. After completing a task, the associated content can serve as a source documenting the research process.
+Tasks have the following properties:
+ToDo
label to identify them as tasks, but this label is hidden in the task list to avoid clutter.)Since tasks are normal Gramps objects, they can be edited or created by the same group of users that can edit or create other objects (like people or events).
+To create a task, click on the + button on the task list page. Enter at least a title. The status will always be "Open" on creation.
+To any of the task's details, click on it in the task list.
+The task detail page does not have a separate "edit mode" like other Gramps objects. Changes to the title, status, and priority are applied immediately. Changes to the rich-text description require clicking the "save" button beneath it.
+The priority and status of tasks can be changed in bulk by using the checkboxes in the task list for selection and the appropriate buttons above the task list.
+When adding tasks via Gramps Web, both the sources and the notes will have the ToDo
tag attached to them, so the tasks will show up in the desktop To Do Notes Gramplet as well as the To Do Report.
To add or edit a task in Gramps Desktop, use the following guidelines
+ToDo
and the task title as titleToDo
, type "To Do", and the description as text