Skip to content

Connecting QGIS

Once your spatial tables are created in pgAdmin, you can connect your hosted PostGIS database to QGIS. This allows you to visualize, edit, and manage your spatial layers directly from your QGIS workspace.


Step 1: Open Data Source Manager

To begin connecting your hosted PostGIS database:

  1. In QGIS, click the Open Data Source Manager button on the toolbar.

  2. In the left-hand panel, select PostgreSQL.

  3. Click New to create a new connection.


Data Source Manager
Image credit: pgAdmin


Step 2: Configure Connection

Before proceeding, make sure you have your connection credentials ready. You can find the Host and Password values on your Product Details page:

Field Description
Host The same URL as your PostGIS product (e.g. my-postgis.sta.geospatialhosting.com).
Password Retrieved by clicking Get Password next to the PostGIS URL.


You’ll now set up the connection to your hosted database.

  1. Under Connections Information, fill in the following details:


    Property Value
    Name my-postgis
    Host your-product-name.sta.geospatialhosting.com
    Port 5432
    Database kartoza_postgis
    SSL Mode Require


  2. Under Authentication, click the + button.

  3. Fill in the following fields:


    Property Value
    Name my-postgis
    Username kartoza_postgis
    Password Copy from the Product Details page


  4. Click Test Connection to verify that QGIS can access your hosted database.

  5. If successful, click OK to save the connection.


Add Connection
Image credit: pgAdmin


Step 3: Load Layers

Now that your connection is configured, you can add spatial layers from your PostGIS database into QGIS.

  1. From the Data Source Manager, click Connect.

  2. Expand the public schema to view your available spatial tables.

  3. Select the places layer and click Add.


Your hosted PostGIS layer is now connected and ready for use in QGIS. You can style, query, and edit it just like any other vector layer.


Add Layer
Image credit: pgAdmin



Next up: Learn how to add and edit features in your PostGIS layer directly from QGIS.