Skip to content

Instantly share code, notes, and snippets.

@RikshaDriver
Last active August 26, 2024 17:03
Show Gist options
  • Save RikshaDriver/653bcac5f0854fa3518d9e112e5b59e6 to your computer and use it in GitHub Desktop.
Save RikshaDriver/653bcac5f0854fa3518d9e112e5b59e6 to your computer and use it in GitHub Desktop.
Installing PostgreSQL 13 on QNAP for Davinci Resolve

Installing PostgreSQL 13 on QNAP for Davinci Resolve

This guide aims to provide an updated overview on installing PostgreSQL 13 within a QNAP NAS for use as a database inside Davinci Resolve.

The previous guide(s) created by QNAP are somewhat irrelevant as Davinci Resolve, Container Station and QTS/QuTS have since undergone major upgrades.

These original guides are linked below for reference:

https://www.qnap.com/en/how-to/tutorial/article/how-can-i-migrate-my-davinci-resolve-studio-database-to-a-newer-version-of-qts

https://www.qnap.com/en/how-to/tutorial/article/how-can-i-collaborate-davinci-resolve-studio-16-between-macos-and-windows-in-qts-4-4-3

In order to create a PostgreSQL Server container for Resolve, we must follow a few steps:

  • Create shared folder and structure
  • Set up Docker container in Container Station
  • Configure database access
  • Connect and use database in Resolve

1. Shared Folder

  1. Under Storage and Disks, create a new Shared Folder:

    image

Note

Example settings for sample shared folder:

image

  1. Create a folder inside the share to use as the data folder. I've created postgres for ease of identification:

    image

2. Container Station

  1. Click on Explore, then search for postgres.

  2. Click Deploy next to the official postgres Docker Hub container:

    image
  3. Select the latest version of Postgres 13. Personally, I've selected 13-alpine as that this uses a leaner image.

    image
  4. Set the the name of your docker container, add port 5432 under host then click Advanced

    image
  5. Under Environments tab, add the POSTGRES_PASSWORD variable and password parameter:

    image
  6. Under Storage, Select Bind Mount Host Path

    image
  7. Delete the first Volume entry.

  8. Under the Host entry, enter/locate the respective Share and folder location created earlier.

  9. Set the properties to RW (Read/Write) and add the relevant Container location: /var/lib/postgresql/data

    image
  10. Click Apply, then click Next on the subsequent window.

  11. You will see a summary as below. Click Finish when done

    image

Note

The container should download and start automatically:

image

3. Database Configuration

Next we need to allow access to the databse from remote hosts.

Edit the pg_hba.conf and postgresql.conf files in our postgres folder under the created share.

Edit using Text Editor

This can be done by editing the files through the Share folder or by using File Station directly on the NAS (provided Text Editor is installed).

image

Edit using SSH or shell

This can also be done via ssh to the NAS share folder or even thru the Docker Container itself.

Edit the respective configuration files accordingly using vi, or even a simple shell commmand such as:

echo "listen_addresses = '*' " >> /var/lib/postgresql/data/postgresql.conf

echo "host all all <IP ADDRESS>/<SUBNET> trust" >> /var/lib/postgresql/data/pg_hba.conf

Make sure to replace IP ADDRESS and SUBNET values with appropriate ones relevant to your network.

To edit using a shell prompt within the container itself, click on the container name, then Exceute.

With /bin/bash selected, click Execute in the popup.

image

This will bring the bash prompt for editing

image

4. Database Access

Add the database into Resolve as per the guide:

https://www.qnap.com/en/how-to/tutorial/article/how-can-i-collaborate-davinci-resolve-studio-16-between-macos-and-windows-in-qts-4-4-3

@BobZelin
Copy link

I am sorry Mr. Garbutt - this is not a simple process. It is for the experienced user with QNAP. The author has done an amazing job showing the exact menus of what to click on, and install. No one can teach you command line ssh stuff on a user forum. If all of this is just too complicated, just get a cheap Mac Mini, and run Resolve 18 Project Server, and you are done. Stick this on your network (you have to have a common network to have collaboration in Resolve), and you can connect right from Resolve . The cost of a low end Mac Mini is the same price that any IT professional would charge you to set this up for you. And if all of that is unacceptable, simply use the Blackmagic Cloud, where Blackmagic will charge your $5 a month to access your common PostgreSQL database - and that applies to ALL of your users.
Bob Zelin

@JLGarbutt
Copy link

Thanks for the help Bob! If its for an advanced user then I can let it be and go with finding a mac mini. I'm in South Africa and black magic cloud just doesnt cut it with the data travel. Appreciate the time and help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment