Welcome to the community @Bastian_Vorholt!
The root permission issues is a common one that we see in Linux. It generally has to do with a global installation of NodeJS being installed with a user account that has different permission to the node_modules directory than the user account being used to install n8n. When the n8n installation attempts to write the mmmagic module, it does not have the permissions to do so and it then fails.
The second issue that you are going to run into is that with the upgrade of the older version of NodeJS. If you just upgrade to a more recent version, you will end up having problems with the installation of the mmmagic package.
Warning: This is just a general overview of what has worked for me in the past on various systems. It may or may not work for you on the Synology. Since I do not know if the Synology user NodeJS for its core systems or even WebUI, there is a very real chance that removing NodeJS could cause issues your system that renders it unusable. Proceed at Your Own Risk!
My recommendations would be to perform the following:
- Uninstall all NodeJS packages and modules
- Manually remove NodeJS
- Install updated version of NodeJS
- Update the global installation of NodeJS with a modules folder located on the root user’s home directory
- Reinstall n8n
Here are a few articles for you to read as reference:
Let us know how this works out for you!