PostgreSQL Setup
Bearcat needs a PostgreSQL database to store its data.
It does not ship with PostgreSQL, so you need to provide it yourself. Both the Desktop app and the Windows service connect to your own PostgreSQL server.
Use PostgreSQL 18. Older PostgreSQL versions are currently untested.
Recommended Settings
Section titled “Recommended Settings”The examples below use these values:
You can use different values, but enter the same values in your Bearcat configuration.
Windows
Section titled “Windows”On Windows you have two ways to run PostgreSQL: in Docker, or with the native installer.
If you prefer a native install, follow the steps below.
Native installer
Section titled “Native installer”Download the PostgreSQL 18 Windows installer from postgresql.org/download/windows.
During installation:
- Choose PostgreSQL 18.
- Keep the default port
5432unless it is already used. - The installer creates a superuser named
postgresand asks you to set its password. You choose only the password here, not the user name. - Stack Builder is optional and not required by Bearcat.
After installation you need a user and a database for Bearcat. You have two options:
Use the postgres superuser directly (simplest). In your Bearcat configuration, enter postgres as the username and the password you set during installation, and bearcat as the database name. Bearcat creates the database and applies migrations on first start.
Create a dedicated bearcat user. Open pgAdmin 4 (installed alongside PostgreSQL), connect as postgres, and create a new login role named bearcat: set a password and enable Can create databases? in its privileges. Then use that account in your Bearcat configuration. Bearcat creates the bearcat database on first start.
Download Postgres.app from postgresapp.com.
Install and start Postgres.app, then create or start a PostgreSQL 18 server. Keep the default port 5432 unless it is already used.
Open a terminal and use the psql command shipped with Postgres.app. If psql is not on your PATH, use the full path from the Postgres.app documentation or add the Postgres.app command line tools to your shell profile.
To let Bearcat create the database on first start:
To create the database manually instead:
Enter the same host, port, database, username, and password in your Bearcat configuration.
PostgreSQL In Docker
Section titled “PostgreSQL In Docker”If you prefer not to install PostgreSQL directly on your operating system, you can run only PostgreSQL in Docker and still run Bearcat natively with the Desktop app or the Windows service. On Windows this is the recommended way to run PostgreSQL.
Create a persistent data directory on your host machine:
Choose a folder you can easily back up. This folder contains the PostgreSQL database files.
Start PostgreSQL 18:
On Windows PowerShell, use a Windows path instead:
Use these settings in your Bearcat configuration:
To stop the database:
To start it again later:
Do not delete the data directory unless you intentionally want to delete the Bearcat database. For backups, stop the container first so PostgreSQL has flushed all files cleanly.
Troubleshooting
Section titled “Troubleshooting”If Bearcat cannot connect:
- Check that PostgreSQL is running.
- Check that the port is
5432, or update your Bearcat configuration to use the port you chose. - Check that the username and password match.
- If the database does not exist, either grant the user
CREATEDBpermission or create the database manually.
