I have a QGIS project that uses a table with PostGIS geometry from a PostgreSQL server in the cloud, I have a username and password to connect. In QGIS it is requested to enter username and password to load the project and it works normally, but when taking the same project to QField an error of "Connection to database failed appears. fe_sendauth: no password suplied" and does not ask to enter username and password.

How should the project be configured so that it requests the username and password and allows displaying PostGIS tables from QField?

enter image description here

  • 3
    When you configure the PostGIS connection, have you tried storing the username and password within project? There is that tick box you can check after which QGIS gives you a warning about storing passwords. Dec 11, 2020 at 6:33
  • 1
    304 / 5000 Resultados de traducción Yes it works, but the problem is that the connection string can be displayed by opening the project with a notepad and the database security is exposed. Do you know if there is a way in which I ask you for username and password? In QGIS if requested and the access level depends on the user's role Dec 11, 2020 at 20:53
  • Did you ever find a solution for this?
    – ferus89
    Mar 6, 2021 at 18:56

1 Answer 1


At the current point in time, QField does not support asking the password for postgres connections. Requesting the password is supported for WFS layers.

The password for postgres can be stored in the QGIS project file or it can be provided with the pg_service.conf file supported since version 1.8.

With QGIS 3.20 and QField 2.0 (both unreleased at the time of writing) it is possible to export authentication configurations as XML files from QGIS and put these into the folder /QField/auth on the device. These will be imported on the next app startup and stored in the local auth database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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