1

Synology NAS's provide a multimedia server backed by a PostgreSQL database. You can connect to that database from an SSH session:

sudo su -
su - postgres
psql mediaserver postgres

Now, I'd love to be able to connect to the database from any computer on my home network, e.g. using pgAdmin, rather than through an SSH terminal. My NAS is not exposed to the Internet and is behind my router's firewall, so I only need to open this to computers on my home network.

Can anyone guide me on how to get there? I have no knowledge whatsoever on PostgreSQL, as I'm more experienced with MySQL.

5
  • pgadmin can also ssh, so you need also to consult the manual
    – nbk
    Jan 17 '21 at 11:50
  • In the end, when I understand the connection and the schema structure, I'll want to connect through other means, but still from a computer on my home network.
    – mrgou
    Jan 17 '21 at 11:53
  • if you can use for example with putty via ssh you can tunnel all traffic through the ssh tunnel.So it doesn't matter if you use putty or ogadmin to connect it first establish a connection ia ssh and through that access the server like it was on your computer
    – nbk
    Jan 17 '21 at 12:18
  • you need to enable remote connections in pg_hba.conf and you also need to provide a password for the user used by your mediaserver. I strongly recommend to not enable remote logins for the superuser postgres - and if your software uses that, that is a huge security risk. You might also need to configure the firewall to let the connection through. Jan 17 '21 at 13:01
  • I'm using an SSH connection to a shell to administer the NAS, but I don't know if it would work for the postgreSQL instance that supports the media server. I have no idea what port it uses or what user would authenticate...
    – mrgou
    Jan 17 '21 at 16:34

Browse other questions tagged or ask your own question.