See setupPostgresqlDbOnDebian.sh for instructions on how to setup a PostgreSQL database server on Debian with a dedicated cluster instance and exposed port.
See setupMatchStatsDb.sh for instructions on how to setup the actual database on the server with two users, one for writing and one for read-only.