Filament Manager and Spool manager external databases

I am wanting to set up a Postgresql Database on my Pi4 that runs my Anet, and be able to have the other pi running my Ender3 be able to access the databases for both of these on the Pi4. Can anyone point me on how to set it up for the remote pi?
Thanks