Setup Apache Tomcat on Synology

  1. you need to ssh to the synology using root account with your default GUI password.
  2. go to directory /var/packages/Tomcat/target/apache-tomcat-6.0.36/conf/
  3. edit the file Tomcat-users.xml
  4. stop and restart Tomcat server
  5. now can login with your new account

This is an example of the code of the file tomcat-users.xml:

<?xml version='1.0' encoding='utf-8'?>    
<tomcat-users>
<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="user" password="password" roles="admin,admin-gui,manager,manager-gui,manager-script,manager-jmx,manager-status"/>
</tomcat-users>

It is in the path /var/packages/Tomcat7/target/src/conf.

If there is any problem with the XML, you can check the log file: /var/packages/Tomcat7/target/src/logs/catalina.out


  1. Through Terminal/SSH session, open the /var/packages/Tomcat7/target/src/conf/tomcat-users.xml file.

  2. Ensure atleast below is available in that:

    <role rolename="manager-gui"/> 
    <user username="tomcat" password="s3cret" roles="manager-gui"/>  
    
  3. Under Package Center in the Diskstation, restart Tomcat service (Stop and Start).

Now you should be able to login with username 'tomcat' password 's3cret'.

Reference: https://community.synology.com/enu/forum/1/post/128739