Install TNG on a Synology NAS

steven
Posts: 181
Joined: Sun Oct 01, 2017 3:08 pm

Re: Install TNG on a Synology NAS

Post by steven »

The instructions recommend using a Unix socket for added security. This requires a direct local domain connection so you cannot use the socket with a DDNS host such as Synology.me. I will update the instructions this week to add more information about this as well as updating the permission settings. The original post is the result of trial and error testing over years and I did not make using a domain socket connection clear in the instructions.

Connecting to the MariaDB database with a DDNS host, such as Synology.me, requires using TCP/IP instead of the Domain Socket. To enable TCP/IP connections, login to DSM > open packages > open MariaDB and check the Enable the TCP/IP connection and note the port number and click Apply. The default port is normally 3306, unless it has been changed.

Then go to the DSM control panel and open Security > then the Firewall tab. Under the Firewall Profile select Edit Rules.
Check to see if a rule for MariaDB exists and if it does not select Create. Click the Select from a list of built-in application radio button and then click Select. Scroll down to MariaDB10 and click the checkbox and click OK. Then click OK again on the next window and click OK on the last window. Last click Apply to ensure the settings were saved. This procedure will allow connecting through the NAS firewall.

Return to the TNG install page and enter the port number and leave the socket blank. This will enable remote connections to allow connecting through a DDNS host. This should resolve your connection problem.
harrieklomp
Posts: 4
Joined: Sat Nov 09, 2024 6:47 am

Re: Install TNG on a Synology NAS

Post by harrieklomp »

Thank you Steven,

For now this is not the solution that works.
I wait for your updated instructions and give it a new try from start.
steven
Posts: 181
Joined: Sun Oct 01, 2017 3:08 pm

Re: Install TNG on a Synology NAS

Post by steven »

I updated the instructions for the database connection and permissions. If you are using a domain from Synology you will be not able to connect using the database socket as that connection only works locally and not over a DDNS host connection. Once you enable TCP/IP on MariaDB and permit access through the NAS firewall, you should be able to connect unless you have a typo somewhere.
harrieklomp
Posts: 4
Joined: Sat Nov 09, 2024 6:47 am

Re: Install TNG on a Synology NAS

Post by harrieklomp »

steven wrote: Tue May 26, 2026 2:28 pm I updated the instructions for the database connection and permissions. If you are using a domain from Synology you will be not able to connect using the database socket as that connection only works locally and not over a DDNS host connection. Once you enable TCP/IP on MariaDB and permit access through the NAS firewall, you should be able to connect unless you have a typo somewhere.
Somehow it now work (local).
On some strange way i cannot connect to the common link to phpMyAdmin to fill in the data fot TNG. I get a 404 cannot find the page. It woked before so that confuses me a bit.
steven
Posts: 181
Joined: Sun Oct 01, 2017 3:08 pm

Re: Install TNG on a Synology NAS

Post by steven »

I'm not sure I understand the problem.
Can you open phpMyAdmin from Synology DSM or are you trying to load phpMyAdmin, over the internet (WAN)?

Depending on how you are trying to connect to phpMyAdmin, you may need to forward a port on your router.
I only use phpMyAdmin on a local LAN connection using DSM and not over the internet.

Error 404 means the resource cannot be found on the server. Are you getting this message from phpMyAdmin or something else?
harrieklomp
Posts: 4
Joined: Sat Nov 09, 2024 6:47 am

Re: Install TNG on a Synology NAS

Post by harrieklomp »

steven wrote: Sun May 31, 2026 1:36 pm I'm not sure I understand the problem.
Can you open phpMyAdmin from Synology DSM or are you trying to load phpMyAdmin, over the internet (WAN)?

Depending on how you are trying to connect to phpMyAdmin, you may need to forward a port on your router.
I only use phpMyAdmin on a local LAN connection using DSM and not over the internet.

Error 404 means the resource cannot be found on the server. Are you getting this message from phpMyAdmin or something else?
When i try it with the synology link like *****.synology.me/phpmyadmin/ i get the 404 page. But when i try with IPv4 adress/phpmyadmin/ it works. I am not sure if this is the correct (safe) way.

TNG now works via *****.synology.me/index.php.
steven
Posts: 181
Joined: Sun Oct 01, 2017 3:08 pm

Re: Install TNG on a Synology NAS

Post by steven »

Under normal circumstances you should not expose phpMyAdmin and use Synology DSM to open phpMyAdmin.

That said, the reason you cannot connect using synology.me is your website uses synology.me which points to the web folder. The problem is phpMyAdmin and docker are located in the web_packages folder. However, when you connect directly you can access the web_packages folder. When you connect with synology.me it goes to the web folder and does not have access to the web_packages folder.

I recommend using Synology DSM to connect to phpMyAdmin locally otherwise you're taking a risk, exposing your database to the whole world.
Post Reply