Skip to content
CloseYourItdocsPages

Documentation / Getting started

Database

What the database is, what is inside, how long data stays and how much room it takes.

CloseYourIt keeps everything in PostgreSQL 17 with the pgvector extension. The installer starts it in a container: you do not install or configure it.

What is inside

One PostgreSQL server holds four databases:

DatabaseHoldsIn the backup
closeyourityour data: projects, tickets, errors, logs, metrics, visitsyes
closeyourit_queuebackground work waiting to runno
closeyourit_cachetemporary values that can be rebuiltno
closeyourit_cablelive updates on their way to open pagesno

The last three hold nothing you would miss: after a restore they start empty and fill up again.

The data sits in the Docker volume closeyourit_postgres. The user is closeyourit; its password is POSTGRES_PASSWORD in /opt/closeyourit/.env. The database is not reachable from outside the server: no port is published.

Open a console

cd /opt/closeyourit
docker compose exec postgres psql -U closeyourit -d closeyourit

Read as much as you like. Do not change rows by hand: the app expects them to change through its own rules.

How long data stays

Old data is deleted automatically. The defaults:

DataKept for
Logs14 days
Errors30 days
Performance samples30 days
Server samples30 days
Session replays30 days
Web analytics365 days
Uptime checks730 days

Tickets, comments, projects and people are never deleted by time.

You can change each window at three levels: the whole install (administration area), one organization, one project. The closest level wins: a project value beats the organization, which beats the install. A project may keep data longer than its organization.

How much room it takes

It depends on how much your applications send. Logs and web analytics grow fastest. To see the size:

cd /opt/closeyourit
docker compose exec postgres psql -U closeyourit -d closeyourit \
  -c "SELECT pg_size_pretty(pg_database_size('closeyourit'))"

If the disk fills up, shorten the windows above for the noisiest projects. closeyourit doctor warns when less than 10% of the disk is free.

Errors, logs, metrics, visits and server samples are stored in monthly slices. When a whole month is past every window, its slice is dropped at once and the room comes back to the disk straight away.

Use your own PostgreSQL

The installer does not support it: the address of the database is fixed in compose.yml and points to the container it starts. An external PostgreSQL would need PostgreSQL 17, the pgvector extension, the four databases above and a hand-edited compose.yml. The closeyourit backup and restore commands would stop working, because they run inside the database container.