Data to back up
Colliedesk keeps data in two places. Back up both (the commands, and how to restore the whole install or one workspace, are in upgrade, roll back and restore):
- PostgreSQL (the
postgres-datavolume). - Attachment files in
ATTACHMENTS_DIR(theattachments-datavolume, mounted at/data/attachments). Without a volume, files are lost when the container is recreated.
PostgreSQL row-level security keeps each workspace's rows apart. Because of it:
- Run
pg_dumpas a superuser:postgresfor installs made with the installer,colliedeskfor older installs and for the repository'scompose.yaml. - Before you restore into a new PostgreSQL server, create the role that Colliedesk uses for
requests. Its name is
colliedesk_app_followed by the database name:
Replace the secondCREATE ROLE colliedesk_app_colliedesk NOLOGIN; GRANT colliedesk_app_colliedesk TO colliedesk;colliedeskwith yourDATABASE_URLuser if it is different.
A workspace admin can also download everything in one workspace from the web app; see export all your data.
Database requirements and hardening
An external database must be PostgreSQL 16 or newer.
The installer connects Colliedesk with two users:
colliedeskowns the data and runs migrations. It is not a superuser.colliedesk_requestserves requests and can only read the signed-in workspace.
Installs made before this layout keep one superuser connection and upgrade without changes. To add the request user to such an install:
- Add one line to
.env, with a new random password:DATABASE_REQUEST_URL=postgres://colliedesk_request:<password>@postgres:5432/colliedesk?sslmode=disable - Run
docker compose up -d. The server creates the user on start.
The server opens at most 20 database connections per pool. To change that, add
pool_max_conns=N to DATABASE_URL or DATABASE_REQUEST_URL, for example
...?sslmode=disable&pool_max_conns=40. Keep it well above 2, the number of workspace exports the
server runs at once.
When you remove an install from a shared PostgreSQL server, also remove its two users. Dropping the database does not remove them. As a superuser, after dropping the database:
DROP ROLE colliedesk_app_colliedesk;
DROP ROLE colliedesk_request;
Details: workspace isolation.
This page is rendered from the repository. Spot a mistake? Open an issue or a pull request.