Synology Install MariaDB With Portainer

Synology Install MariaDB With Portainer

MyĀ previous guide for MariaDBĀ involved the use of Task Scheduler. Today Iā€™m offering a recommended and excellent alternative for installing the latest MariaDBĀ version via Portainer. Synology already supports MariaDB having made it downloadable via Package Center. But in today’s article I want to teach you how to install the Docker version of MariaDB which will help you set up a database for each Docker package you want to install that requires a database. MariaDB is one of the most popular database server. MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system, intended to remain free and open-source software under the GNU General Public License. In this step by step guide I will show you how to install MariaDB on your Synology NAS using Docker & Portainer.

šŸ’”Note:Ā This guide works perfectly with the latest MariaDB 11.4.3 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

Install Text Editor via Synology ā€œPackage Centerā€. (Mandatory STEP.) If you already have Text Editor installed on your Synology NAS, skip this STEP.

Synology Install Text Editor 2023

  • STEP 4

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

MariaDB Synology NAS Portainer Set up 1

  • STEP 5

Now create one new folder inside the mariadb folder that you have previously created at STEP 4 and name it phpmyadmin. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

MariaDB Synology NAS Portainer Set up 2

  • STEP 6

Download (click on the blue link below) then unzip and upload the uploads.ini file below in the phpmyadmin folder that you have previously created at STEP 5. Follow the instructions in the image below. šŸ”’Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!

šŸ‘‰šŸ»Download uploads.ini

MariaDB Synology NAS Portainer Set up 3

  • STEP 7

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 8

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

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

services:
  mariadb:
    image: mariadb:11.4 #LTS Long Time Support Until May 29, 2029.
    container_name: MariaDB
    volumes:
      - /volume1/docker/mariadb:/var/lib/mysql:rw
    environment:
      - MYSQL_ROOT_PASSWORD=mariushosting
      - TZ=Europe/Bucharest
      - PGID=100
      - PUID=1026
    ports:
      - 3306:3306
    restart: on-failure:5

  phpmyadmin:
    image: phpmyadmin:latest
    container_name: phpMyAdmin
    healthcheck:
     test: curl -f http://localhost:80/ || exit 1
    environment:
      - PMA_PORT=3306
      - PMA_HOST=192.168.1.18
    volumes:
      - /volume1/docker/mariadb/phpmyadmin/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:rw
    ports:
      - 2500:80
    depends_on:
      - mariadb
    restart: on-failure:5

Note: Before you paste the code above in the Web editor area below, change the value for MYSQL_ROOT_PASSWORD and type in your own password. mariushosting is an example for a password. You will need this password later at STEP 12. āš ļøWarning: Do NOT use a complicated password with special characters.
Note: Before you paste the code above in the Web editor area below, change the value for TZ.Ā (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value numbers for PUIDĀ andĀ PGIDĀ with your own values. (Follow my step by step guide on how to do this.)
Note: Before you paste the code above in the Web editor area below, change the value of PMA_HOST and add your own LOCAL NAS IP. 192.168.1.18 is my own Synology NAS IP you should use your own Synology NAS IP.

MariaDB Synology NAS Portainer Set up 4 new 2027

  • STEP 9

Scroll down on the page until you see a button called 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.

MariaDB Synology NAS Portainer Set up 5 new 2027

  • STEP 10

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

MariaDB Synology NAS Portainer Set up 6

  • STEP 11

šŸŸ¢Please Support My work by Making a Donation. Almost 99,9% of the people that install something using my guidesĀ forget to support my work, or justĀ ignoreĀ STEP 1. Iā€™ve been very honest about this aspect of my work since the beginning: I donā€™t run any ADS, I donā€™t require subscriptions, paid or otherwise, I donā€™t collect IPs, emails, and I donā€™t have any referral links from Amazon or other merchants. I also donā€™t have any POP-UPs or COOKIES. I have repeatedly been told over the years how much I have contributed to the community. Itā€™s something I love doing and have been honest about my passion since the beginning. But I also Need The Community to Support me Back to be able to continue doing this work.

  • STEP 12

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:2500 Connect to your MariaDB using root as Username and the MYSQL_ROOT_PASSWORD you have previously chosen at STEP 8. Click Log in. Follow the instructions in the image below. Note: MariaDB doesn’t have a graphical interface; it works in the background. In order to view and create new databases you will need to use phpMyAdmin.

MariaDB Synology NAS Portainer Set up 7

  • STEP 13

Your phpMyAdmin container with MariaDB database at a glance!

MariaDB Synology NAS Portainer Set up 7 new 2027

  • STEP 14Ā 

Fix the phpMyAdmin configuration storage issue.

Enjoy MariaDB!

šŸ†˜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 the phpMyAdmin graphical interface container over HTTPS, check How to Run Docker Containers Over HTTPS. In order to make phpMyAdmin work via HTTPS, it’s mandatory to activate WebSocket.

Note: Can I run Docker on my Synology NAS?Ā See the supported models.
Note: Find outĀ how to update the MariaDB 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 Wednesday / January 15th, 2025 at 2:31 AM