Before going any further, make sure your system meets all the requirements.
Looking for a complete, easy step-by-step installation guide, including all dependencies and an auto-updater? Check out the Ubuntu-based installation guide.
wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz
mkdir wiki
tar xzf wiki-js.tar.gz -C ./wiki
cd ./wiki
config.yml
:mv config.sample.yml config.yml
nano config.yml
npm rebuild sqlite3
node server
There are several solutions to run Wiki.js as a background service. We'll focus on systemd in this guide as it's available in nearly all linux distributions.
wiki.service
inside directory /etc/systemd/system
.nano /etc/systemd/system/wiki.service
/var/wiki
):[Unit]
Description=Wiki.js
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/node server
Restart=always
# Consider creating a dedicated user for Wiki.js here:
User=nobody
Environment=NODE_ENV=production
WorkingDirectory=/var/wiki
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl start wiki
systemctl enable wiki
Note: You can see the logs of the service using journalctl -u wiki