Skip to content

Wiki.js 2.0 - Run as Background Service on DSM 7

Wiki.js can be set to start automatically when DSM starts by running the node server as a background service.

Running as Service on DSM 7

On DSM, use the following content for the wiki.service file when following the Run as Service Wiki.js guide (assuming your wiki is installed at /volume1/web/wiki):

[Unit]
Description=Wiki.js
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/node server
Restart=always
# Consider creating a dedicated user for Wiki.js here:
User=root
Environment=NODE_ENV=production
WorkingDirectory=/volume1/web/wiki/

[Install]
WantedBy=multi-user.target

Highlighted lines are the differences compared to the official manual:

  • Line 7: ExecStart - Node.js binary resides under /usr/local/bin/
  • Line 10: User - change to root
  • Line 12: WorkingDirectory - change to /volume1/web/wiki/
Back to top