How to Install PGBackWeb on Your Synology NAS

How to Install PGBackWeb on Your Synology NAS

PGBackWeb is an effortless PostgreSQL backup with a user-friendly web interface! It’s your trusted ally in ensuring the security and availability of your PostgreSQL data. Set it and forget it. PGBackWeb takes care of the rest. In this step by step guide I will show you how to install PGBackWeb on your Synology NAS using Docker & Portainer.

šŸ’”Note:Ā This guide works perfectly with the latest PGBackWeb 0.3.0 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

InstallĀ Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

Go toĀ File Station and open the docker folder. Inside the docker folder, create one new folder and name it pgbackwebdb. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

PGBackWeb Synology NAS Set up 1

  • STEP 4

Log into Portainer using your username and password. On the left sidebar in Portainer, click on StacksĀ thenĀ + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 5

In the Name field type in pgbackweb. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

version: "3.9"
services:
  pgbackweb:
    image: eduardolat/pgbackweb:latest
    container_name: PGBackWeb
    healthcheck:
      test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/8085' || exit 1
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 90s
    ports:
      - 8085:8085
    environment:
      PBW_ENCRYPTION_KEY: MariushostingMariushostingMari13
      PBW_POSTGRES_CONN_STRING: postgresql://pgbackwebuser:pgbackwebpass@pgbackweb-db:5432/pgbackweb?sslmode=disable
    depends_on:
      pgbackweb-db:
        condition: service_healthy

  pgbackweb-db:
    image: postgres:16
    hostname: pgbackweb-db
    container_name: PGBackWeb-DB
    environment:
      POSTGRES_USER: pgbackwebuser
      POSTGRES_DB: pgbackweb
      POSTGRES_PASSWORD: pgbackwebpass
    volumes:
      - /volume1/docker/pgbackwebdb:/var/lib/postgresql/data:rw
    healthcheck:
      test: ["CMD", "pg_isready", "-q", "-d", "pgbackweb", "-U", "pgbackwebuser"]
      timeout: 45s
      interval: 10s
      retries: 10

Note: Before you paste the code above in the Web editor area below, change the value for PBW_ENCRYPTION_KEY and add your own ENCRYPTION KEY. MariushostingMariushostingMari13 is an example for an ENCRYPTION KEY. You should invent your own Value. Add 32Ā random characters, both letters and numbers.

PGBackWeb Synology NAS Set up 2

  • STEP 6

Scroll down on the page until you see a button namedĀ Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

PGBackWeb Synology NAS Set up 3

  • STEP 7

If everything goes right, you will see the following message at the top right of your screen: ā€œSuccess Stack successfully deployedā€œ.

PGBackWeb Synology NAS Set up 4

  • STEP 8

Go back toĀ STEP 1Ā or you will deal with karma šŸ™‚.

  • STEP 9

The installation process can take up to a few seconds/minutes. It will depend on your Internet speed connection. Now open your browser and type inĀ http://Synology-ip-address:8085 Create your administrator user then click Create user and continue. Follow the instructions in the image below.

PGBackWeb Synology NAS Set up 5

  • STEP 10

A new pop up window will open. Click OK. Follow the instructions in the image below.

PGBackWeb Synology NAS Set up 6

  • STEP 11

Type in your own Email address and Password that you have previously created at STEP 9, then click Login. Follow the instructions in the image below.

PGBackWeb Synology NAS Set up 7

  • STEP 12

You can easily change the default Theme by clicking the Theme button at the top left of the page. Click Databases. Follow the instructions in the image below.

PGBackWeb Synology NAS Set up 8

  • STEP 13

At the top right of the page, click Create database +. In the Name field type a name for your database. In the Version field select your favorite PostgreSQL version and in the Connection string field, type in the following code, then click Save. Follow the instructions in the image below.

postgresql://pgbackwebuser:pgbackwebpass@pgbackweb-db:5432/pgbackweb

PGBackWeb Synology NAS Set up 9

  • STEP 14

Your PGBackWeb dashboard at a glance!

PGBackWeb Synology NAS Set up 10

Enjoy PGBackWeb!

šŸ†˜TROUBLESHOOTING

If you encounter issues by using this container, make sure to check out the Common Docker issuesĀ article.

Note: If you want to run the PGBackWeb container over HTTPS, check How to Run Docker Containers Over HTTPS. In order to make PGBackWeb work via HTTPS, it’s mandatory to activate WebSocket.

Note: Can I run Docker on my Synology NAS?Ā See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find outĀ how to update the PGBackWeb container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Sunday / September 15th, 2024 at 8:32 AM