I have been looking for a Debian based NC install script for a while that uses PostgreSQL instead of MySQL/MariaDB and have had no luck. I saw Onryo’s install script and really appreciated how well his script works. This gave me the idea to try and modify his script to work with PostgreSQL. I am not trying to take credit for Onryo’s work, I am just trying to make PostgreSQL work with his configuration.

Changes I made: updated OpenSSL to 1.1.0h and added DDNS client inadyn; swapped out LetsEncrypt with acme.sh; and included UFW firewall due to my needs. I attempted to update the script to include the necessary modifications for these new items.

I would love feed back on how I can improve the PostgreSQL portion of this script as I am a novice when it comes to scripting and PostgreSQL with NC.