Remote access to LibreOffice-Base Database with PostgreSql

Hi I have a Synology NAS DS216j in my LAN and I am running a postgreSQL database on it.

I am try to find a way to connect and run my database from a computer outside my LAN so I can use it and update it.

In order to do that I had to forward the port 5432 (postgres) and WebDav (5005) of my router to the NAS.

The port Postgresql (5432) and WebDav (5005 )is open on my public IP.
The port Postgresql (5432) and WebDav (5005 )is open on the NAS.

From the remote host:

  • I am able to see the database file (in LibreOffice Base), on the NAS if I connect with quickconnect or WebDav (in windows I installed the program: NetDrive).

  • I am able to connect to the database structure with PgAdminIII.

but I am not able to Lunch/Open the database.

When I get prompt the user and password I just get this error saying:


The connection to the data source “NAS” could not be established.
Couldnt establish dataabse connection to ´sdbc:postgresql:postgresql://192.168.0.20/5432/dbname´ could not connect to the serve: Connection timed out (0x0000274c/10060).
Is the server running on host 192.168.0.20 and accepting TCP/IP connection on port 5432?


I wonder why I am able to connect with PgAdminIII but not able to open the LibreOffice Base from WebDav.

Hello. Haven’t dealt with networks in years & don’t have one to test but it seems your connection string is incorrect at least for the port. Would think it should be:

sdbc:postgresql://192.168.0.20:5432/dbname

Hey, thank you for the aswer. 5432 is the port of PostgreSQL which is open on IP 192.168.0.20 (the NAS where the database) and also same port is open in my public IP. I used dbname as typo.

My only point was because of the message showing: sdbc:postgresql:postgresql://192.168.0.20/5432/dbname. Normally a port in a connection string is separated by a : and not a /. Also postgresql: twice? Just doesn’t seem correct compared to what I use for connections.

Thank you , you are right, was my mispelling. The error Message says: sdbc:postgresql:postgresql://192.168.0.20:5432/dbname