Connect LibreOffice Base to PostgreSQL with the Built-In Wizard

Use LibreOffice Base’s direct PostgreSQL connection: start a new database file, select Connect to an existing database, choose PostgreSQL, and enter the database name, server, and port. Base then asks for a PostgreSQL login and saves a small .odb file containing the connection information; the PostgreSQL server continues to hold the actual data. The steps below follow LibreOffice Help 26.8, checked October 9, 2026; labels can differ slightly in older releases.

What do you need before connecting?

Get the exact database name, a server hostname or IP address reachable from the computer running LibreOffice, and the PostgreSQL port. LibreOffice’s connection form uses these three values, and its documented default port is 5432. You also need a PostgreSQL username and password, plus permission to connect to the database and access the tables or views you intend to use. Ask the database administrator for these values rather than guessing.

For a server on the same computer, the host may be localhost. For a separate server, use its DNS name or address, not the word “localhost”; that always refers to the machine where Base is running. The example values in this article (inventory, db.example.net, and 5432) are illustrative, not credentials for a real service.

Base includes a direct PostgreSQL option in its Database Wizard. You usually do not need to set up a JDBC or ODBC driver for this route. An organization may require one of those routes for its own environment, but follow that setup only if the direct option is unavailable or the database administrator specifies it.

How do you create the Base connection?

  1. Open the Database Wizard. In LibreOffice, choose File > New > Database. In the first wizard page, select Connect to an existing database and choose PostgreSQL from the database-type list. Click Next.
LibreOffice Base Database Wizard with Connect to an existing database selected and PostgreSQL chosen
Select the existing-database option and choose PostgreSQL in the Base wizard.
  1. Enter the connection address. On the PostgreSQL connection page, fill in Database name, Server, and Port number. For example, use inventory, db.example.net, and 5432 only if those are the values supplied for your server. The page also accepts a PostgreSQL connection string, such as dbname=inventory host=db.example.net port=5432; use the separate boxes unless your administrator gives you additional parameters. LibreOffice notes that user= and password= values in the connection string are ignored, and credentials are requested when connecting.
PostgreSQL connection settings with database name inventory, server db.example.net, and port 5432
Enter the database name, PostgreSQL server address, and port supplied by the database administrator.
  1. Authenticate. Continue to the user-authentication page. Enter the PostgreSQL role name and its password when prompted, then test or finish the connection. Avoid saving a password on a shared or managed computer unless your organization’s policy allows it.
Database Wizard user authentication page with a username and masked password
Base requests the PostgreSQL username and password when it tests the connection.
  1. Choose how Base should save the connection. In the final wizard page, choose whether to register the database in LibreOffice and whether to open it for editing. Registering makes the data source easier to select from other LibreOffice components; it does not publish the database or create a PostgreSQL server. Save the file with a clear name, such as inventory.odb, in a location you can access. Reopen this file later to use the same connection settings.

What should appear after the connection succeeds?

Base opens the database window. Select Tables to see tables available to the connected role; open one only if you have permission to read it. If the expected objects appear, the connection is established. A successful login does not automatically grant permission to every table, and Base does not copy PostgreSQL tables into the .odb file.

LibreOffice Base main window showing the Tables navigation and an example data grid
After connecting, open Tables and confirm that the expected database objects are visible.

What if Base cannot connect?

  • Connection refused or timeout: check the hostname, port, network route, and firewall between the Base computer and PostgreSQL. For a remote connection, PostgreSQL must listen on an appropriate network interface; its default may only accept local loopback connections. Ask the server administrator to check listen_addresses and network policy rather than exposing the database broadly. See the PostgreSQL connection settings.
  • “No pg_hba.conf entry” or authentication failure: the server may not have an authentication rule matching the client address, requested database, user, and authentication method, or the supplied password may be wrong. The administrator should check the matching rule and password method in pg_hba.conf. PostgreSQL processes rules in order and denies the connection if none matches. Do not use trust as a quick fix for a network-accessible server; it bypasses password authentication. See the PostgreSQL client authentication documentation.
  • Database not found: confirm the database name and make sure you are connecting to the intended PostgreSQL instance and port.
  • Login works but tables are missing or read-only: ask the administrator to confirm the role has the database’s CONNECT privilege and appropriate privileges on the required schema and objects. PostgreSQL documents that passing host authentication checks alone is not sufficient for database access.

How can you verify the setup?

Close and reopen the saved .odb file, connect with the intended role, and confirm the expected tables appear under Tables. If you have authorization, open a known table and check a few expected column names or records. If Base prompts for a password again, that may simply reflect the credential-saving choice or policy; it does not by itself mean the connection details are wrong.

For field definitions, see the LibreOffice PostgreSQL connection settings and the LibreOffice Database Wizard help. Ask your PostgreSQL administrator to investigate server-side access when the connection works locally but fails from another computer.

Leave a Comment

Connect LibreOffice Base to PostgreSQL with the Built-In Wizard

Connect LibreOffice Base to PostgreSQL with the Built-In Wizard

Use Base’s direct PostgreSQL option to enter your server details, sign in, save an ODB connection file, and troubleshoot common access errors.

Make Custom Fonts Available to LibreOffice Flatpak

Make Custom Fonts Available to LibreOffice Flatpak

Install a font in your Linux user font folder, restart LibreOffice Flatpak, and confirm it appears in Writer without weakening the app sandbox.

Stop LibreOffice Save Crashes on Sonoma: Work Locally First

Stop LibreOffice Save Crashes on Sonoma: Work Locally First

Protect your work and isolate network-drive save crashes in LibreOffice on macOS Sonoma with a local-first workflow, permission checks, and targeted tests.

Keep CSV IDs Intact in Calc by Importing Them as Text

Keep CSV IDs Intact in Calc by Importing Them as Text

Preserve leading zeros in Calc by setting ID columns to Text during CSV import, checking the preview, and verifying the saved data.

LibreOffice Document Locked by Unknown User: A Safe Fix

LibreOffice Document Locked by Unknown User: A Safe Fix

Find the cause of a LibreOffice document lock, safely clear a stale lock file, and confirm that you can edit and save without losing changes.

Speed Up Writer by Hiding and Compressing Document Images

Speed Up Writer by Hiding and Compressing Document Images

Make image-heavy Writer files easier to edit: test a reversible display setting, compress oversized pictures in a copy, and verify the saved layout.

Speed Up LibreOffice Startup on Windows 11 and Linux

Speed Up LibreOffice Startup on Windows 11 and Linux

Find out whether a slow launch comes from extensions, profile settings, or the system, then test the safest fix without losing LibreOffice data.

Save LibreOffice Documents Directly to Nextcloud with WebDAV

Save LibreOffice Documents Directly to Nextcloud with WebDAV

Connect LibreOffice to Nextcloud over WebDAV, save the server copy with Ctrl+S, and understand how AutoRecovery differs from cloud syncing.

Bluetooth Adapter Missing on Pardus 23? Start with These Checks

Bluetooth Adapter Missing on Pardus 23? Start with These Checks

Find out whether Pardus 23 is blocking Bluetooth, missing BlueZ, or failing to detect adapter firmware, then confirm the controller works.

Set Gooroom Browser Isolation Through Your Organization’s Policy

Set Gooroom Browser Isolation Through Your Organization’s Policy

Learn how Gooroom separates trusted and untrusted browsing, what users can change, and how an administrator can safely update site policies.