I'm using QGIS Server to provide WMS access to a handful of layers. QGIS Server is running on a headless Ubuntu machine and seems to be working fine for layers that are themselves stored in files (like .gpkg or .shp). But it isn't working for layers stored in a database (I use MySQL) because the database access credentials aren't being properly provided.

It looks like the credentials are stored in the /home/qgis/qgisserverdb/qgis-auth.db file, which is initially empty.

What is the best practice for populating the qgis-auth.db file on a headless server?

Since QGIS Desktop isn't installed on the server machine, I can't use the UI. I've tried copying the qgis-auth.db file from another desktop, but that doesn't seem to work either (not surprising).


Your Answer

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

Browse other questions tagged or ask your own question.