Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Can sоmеbody explain me what to write in the "service" box when connecting to the local DB.

QGIS Lisboa and Postgres are installed.

share|improve this question

3 Answers 3

What does the “service” box in the PostGIS connection dialog stand for?:

The service entry allows you to specify a service file that contains the connection parameters needed to access a certain postgresql database.

By having a service file, you can then ignore having to enter other details like database, host, port, user and password.

Here are some of the options you can include in a service file.

Can sоmеbody explain me what to write in the "service" box when connecting to the local DB.:

So unless you've got some service files made up, you don't need to enter anything - leave it blank.

I use service files so that individuals who couldn't be bothered to remember server details can easily connect when needed. It's easier for me to say, "please enter xyz into the service box and press OK."

There's also the option to save those connection details to an xml file from QGIS using the "save/load" buttons from the initial "Add PostGIS Layer" screen.

share|improve this answer

I usually keep it empty.

You just need to enter a Name for the connection, Host (either IP or hostname of the database server), Posrt, Database, userName and password.

That is more than sufficient to connect to the PostGIS database.

share|improve this answer
Name: (Any)
Host:localhost (or IP) 
Port:5432 (5432 is postgres default port)
Database:postgis20 (yours may be different)  
Username:postgres (yours may be different)    

enter image description here

check your pg_hba.conf allows you to connect



# IPv4 local connections:
host    all         all          md5
# IPv6 local connections:
host    all         all         ::1/128               md5
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.