I'm using Nextcloud, it's forked from Owncloud.
Of course, it's possible to link your database to a local machine. Why do you want to store your database on a local machine? Why don't you want to put the database together with Owncloud?
Your steps should be like this with my approach.
- Install wireguard software on VPS.
- Install wireguard client on your local machine as a service.
- Install database software on your local machine and use the IP address of wireguard client IP as management.
- Install Owncloud on your VPS. While installing it will ask for the database IP address, so point it as wireguard client IP address.