For the last three/four months i’ve deployed PostGIS locally but now i’ve just been given a server to deploy PostGIS on and scale up my open source adventures. I’ve installed Postgres/gis and its working just fine on my Windows server, but how do I connect to it from my desktop pc (via QGIS). I’ve looked around for threads on ‘Remote Access PostGIS on Windows Server’ and variation of, but haven’t actually found anything concrete.
I get the gist that I have to edit the some of the Postgres config files to allow remote access, but the threads that do comment on doing this all offer difference solutions. Very confused!
In short, yes. It’s built into the IP protocol used by PostgreSQL.
However, it partially depends on your network. Does your Windows Server have either a static IP or a DNS name (e.g., yourname.com)? If your server have a dynamic IP, try something like http://dyn.com/dns/. Furthermore, if your server is behind a firewall or router, you might need to use port forwarding to expose the PostgreSQL port (usually 5432) to outside traffic.
The PostgreSQL/PostGIS side of things is easier to set up. There are tonnes of resources out in the web to tell you how to enable remote connections to a PostgreSQL database (e.g. this). Basically, you need to edit your
postgresql.confandpg_hba.conffiles, and either restart and/or refresh your server.To connect from QGIS, make a new connection with the DNS name or IP address in “Host”. I frequently use QGIS to connect to remote servers.