Tuesday, 18 February 2014

Changing the Default Synagios Port

UPDATE: The port can now be changed when Synagios is installed. These instructions are still useful if you need to change the port after installation.

The Synagios in-built Web server is set to start on port 8888 and nagrestconf, pnp4nagios and nagios all work from this port. If it needs to be changed then currently it can only be changed by using the terminal on the Synology device. How to change the default port follows.

Only use these instructions if you are comfortable using the Synology terminal.

First make a backup using the Nagrestconf web interface. If anything goes wrong Synagios can be uninstalled, then re-installed, and the backup restored.

In the Synology DSM ensure that the terminal is enabled. Open the Control Panel, click Terminal, then ensure that 'Enable SSH service' is checked.

From the workstation, use putty or ssh to log into the diskstation, for example:
ssh root@diskstation
Then, once logged in, set the port you want to use, for example:
Change to the Synagios directory:
cd /volume1/@appstore/Synagios/
Then copy the following block and paste it directly into the terminal:
sed -i 's/\(port =\).*/\1 '$PORT'/' \
sed -i 's/\(SYNAGIOS_PORT=\).*/\1'$PORT'/' \
sed -i 's/\(NameVirtualHost.*:\).*/\1'$PORT'/' \
sed -i 's/\(<VirtualHost .*:\).*/\1'$PORT'>/' \
sed -i 's/^\(Listen \).*/\1'$PORT'/' \
sed -i 's/\(^.*\)[^\/]*/\1:'$PORT'/' \
sed -i 's/^\(adminport="\).*/\1'$PORT'"/' \
This will change the port in all the relevant files. Stop then start Synagios using the Package Manager and it should now be using the new port.

1 comment:

  1. Login The default local address for the network router is and this is also a “class A” internet protocol address used by the private network ip