Accessing the PS database via the internet....

Post Reply
Logie
Posts: 3
Joined: 11 Jan 18 20:52

Accessing the PS database via the internet....

Post by Logie » 20 Mar 18 19:16

I have PS Server Version. The photos are stored on a QNAP NAS and the PostgreSQL database also resides on the NAS. I have the PS software installed on 3 laptops. All are working flawlessly from within the office environment while the laptops and NAS are connected to the same office network. What I want to be able to do is have the laptops connect to the database via the internet when they are away from the office (at home or on the road). Is it possible to connect to the database from afar?

weidmic
moderator
Posts: 4419
Joined: 04 Dec 06 22:21

Re: Accessing the PS database via the internet....

Post by weidmic » 20 Mar 18 20:35

Logie, welcome to the forum!

I am sure it is possible, to access the database over the internet.
PSU Server needs to be installed on the laptop, of course...

Though, I don’t know how to configure PostgrSQL and your NAS to open the access over the Inet to the database. If that has been done you only need to put in the ip / server adress, port, username and password in the startup screen of PSU and it should work.
Configuring the nas and postgreSQL should be pretty easy, I guess - maybe you google for it.

However, i think speed could be an issue. depending on the preview size and the size of your database, I expect it to be slow. Also, I would not be surprised that you could run into database issues when the connection is not reliable. There is a script available, that puts postgresql into a the
Synchronous mode - I believe this could prevent those issues. Please see my signaturand follow the link. (Sorry its slow)

Hope that helps...
Michael
PSUServer 4.x, PostgreSQL 10.x
My homepage http://www.michaelweidner.com
PSU Tips and Tricks http://www.michaelweidner.com/WP/psu/

jtk
Posts: 30
Joined: 21 Feb 18 17:57

Re: Accessing the PS database via the internet....

Post by jtk » 21 Mar 18 8:17

Hello,

I would try a VPN Connection to my Network, but you can also ask the User Robiwan. He has something simular.

Greetings from Germany
Thomas
Photo Supreme beginner, former Aperture User
MacBook Pro with macOS High Sierra

Username
Posts: 97
Joined: 18 Feb 18 22:21

Re: Accessing the PS database via the internet....

Post by Username » 21 Mar 18 11:15

I would never open up for direct internet access to my internal systems.
I have setup OpenVPN in my router and have configed the pg_hba.conf to allow access from the specific VPN IP scope (i.e. 10.111.111.0/24)

host all all 10.111.111.0/24 md5

That works perfect and I'm reducing the risk of something going really bad.
- I'm the user

weidmic
moderator
Posts: 4419
Joined: 04 Dec 06 22:21

Re: Accessing the PS database via the internet....

Post by weidmic » 21 Mar 18 11:26

I totally agree with both of you :)
PSUServer 4.x, PostgreSQL 10.x
My homepage http://www.michaelweidner.com
PSU Tips and Tricks http://www.michaelweidner.com/WP/psu/

Logie
Posts: 3
Joined: 11 Jan 18 20:52

Re: Accessing the PS database via the internet....

Post by Logie » 21 Mar 18 15:45

I have OpenVPN and will work toward using it for PS. If I do that, will the configuration force me to always use the VPN even when I'm in the office environment? I'm thinking that I can live with it being slow for short periods of time away from the office, but when in the office, speed will be more important. I guess what I'm asking is if the config file lets me define more than one network.

Username
Posts: 97
Joined: 18 Feb 18 22:21

Re: Accessing the PS database via the internet....

Post by Username » 21 Mar 18 16:21

If you have your OpenVPN setup to reach your internal network, you can connect to the PS server by IP or local name regardless if you are on your local network or the VPN.

But remember that you need two lines for host connection set in the pg_hba.conf.

One line as you already have it today, which is based on your local lan IP scope.
And then another line for the VPN access IP scope, incase it is different (like the one I posted earlier)

¨That way you will be allowed to connect to the postgres server regardless if you are on the local lan or the VPN network.
- I'm the user

Logie
Posts: 3
Joined: 11 Jan 18 20:52

Re: Accessing the PS database via the internet....

Post by Logie » 23 Mar 18 1:50

Thank you! I've got this working with the VPN and all is good.... slow, but good. :-)
Your help is appreciated very much!!

Username
Posts: 97
Joined: 18 Feb 18 22:21

Re: Accessing the PS database via the internet....

Post by Username » 23 Mar 18 6:24

Cool. Thank you.
Glad to have been of help.
- I'm the user

weidmic
moderator
Posts: 4419
Joined: 04 Dec 06 22:21

Re: Accessing the PS database via the internet....

Post by weidmic » 23 Mar 18 8:54

Logie, what NAS do you use?
PSUServer 4.x, PostgreSQL 10.x
My homepage http://www.michaelweidner.com
PSU Tips and Tricks http://www.michaelweidner.com/WP/psu/

Post Reply