Connect the database
Enter the PostgreSQL connection string and the name of the app in Configuration.
OpenReports reads its data from one PostgreSQL database. You set the connection in Configuration.

Set the connection
- Select Configuration (the gear icon) in the bar on the left.
- In Connection string, enter the address of your database in this form:
postgres://user:password@host:5432/database. - Select SUBMIT. The message Configuration have been saved successfully. appears.
OpenReports connects with the new settings straight away; you do not need to restart it. The field hides its value after you leave it.
Name
Name is the name of the app. It appears as the title of the browser tab. The default is OpenReports.
Use a user that can only read
The SQL of every view runs with the user of the connection string. Give OpenReports its own PostgreSQL user that can read your tables but not change them. For example, for a database named shop:
CREATE ROLE openreports LOGIN PASSWORD 'choose-a-password';
GRANT CONNECT ON DATABASE shop TO openreports;
GRANT USAGE ON SCHEMA public TO openreports;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO openreports;Then use openreports and its password in the connection string. GRANT SELECT ON ALL TABLES covers the tables that exist now; run it again after you add tables.
Other settings on this screen
- Enable API for reading reports and Token: see Enable the API.
- OpenPlatform: see Use OpenReports with OpenPlatform.