I've built a QGIS template project that I'm using for repetitive municipal projects that I'm sharing with other users on the local network, the layers are organized and stylized within geopackage files. I've just learned that when other users open the QGIS project, they don't see the layers because they're not connected to the geopackage files - not a hard problem to solve since they can just make the connection and move on, but I feel like there must be a way to have the qgis project automatically make that connection so it doesn't have to be done manually for each user?

  • What do you mean they aren't connected to the geopackag files? Is their path to the file different from yours? Also you could create a script to fix the connections on startup if needed.
    – Al rl
    Commented Sep 10, 2020 at 21:45
  • 3
    It is not recommended to use SQLite databases from network drives sqlite.org/whentouse.html but if your users connect read-only it should be at least safe.
    – user30184
    Commented Sep 10, 2020 at 22:51
  • Thanks for that link about sqlite.... good info there.
    – nr_aus
    Commented Sep 11, 2020 at 2:26
  • Agreed. Thanks for the sqlite info, very helpful. Setting up a client/server rdbms definitely sounds like the best situation, but a bit out of my skill level at the moment, I'll have to look into it more. In the meantime, yes, all users have the same path to the gpkg files, I'll also look into writing a script for startup.
    – CEL-ma
    Commented Sep 11, 2020 at 11:11

1 Answer 1


If this is your preferred approach to distributing QGIS projects, then it might be worthwhile embedding a startup python script inside of the project, which will check if connected and then if not, make the connection. Nice introductory article here https://madmanwoo.gitlab.io/foss4g-python-workshop/startup/

  • I'm just getting into scripting so I'll have to do some research, but this sounds like a great solution - thanks!
    – CEL-ma
    Commented Sep 11, 2020 at 11:12

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.