For the attachments like pdf you can use webdav, but for the metadata you have to use their service [1]. They have the code repos online so it's open source, but no self-hosting instructions [2]. They claimed it to be due to technical difficulties [3], though imo they have no incentives to provide this given that they host a paid service themselves.
I've installed the app linked in TFA and it immediately asked me to sign in or sign up without any option to configure my own server address. But since it's still a beta version, the custom server/local only options are probably not implemented yet.
[1]: https://www.zotero.org/support/sync
[2]: https://github.com/zotero/dataserver
[3]: https://github.com/zotero/dataserver/issues/105