What is WikiJS
WikiJS is well-known wiki-based engine. Its popularity is growing today due to such advantages as open-source code which supported by big developers community, easy-to-install, small system requirements and well-readable documents markup by default.
Necessary server specs
To install WikiJS you need:
- Server with at least 1Gb RAM and 10Gb disk space;
- Actual Linux OS (Ubuntu 20.04 in this article);
- Privileged user access;
- Domain name with A-records, "pointed" to the server's IP (optional).
Installation procedure
WikiJS setup process is very simple, possible for everybody. Just do followed step-by-step instruction:
- Authorize on the server, update exist software and reboot machine to apply changes;
- Set up utilities to earn other necessary tools and scripts;
- Earn, then setup nodejs;
IMPORTANT: NodeJS v18 is not compatible with WikiJS now! You shuldn't use it.
- Add additional repository and install database service e.g. MariaDB;
- Enable, then launch MariaDB, then check the status;
systemctl status mariadb
- Make necessary database service settings. Set password you want, other settings - up to you, default is enough;
- For convenient experience in future, create authentication data and put section with your credentials inside;
[client]
user=root
password=<your_password>
- Enter into Mariadb console, create database and user for WikiJS;
create user '<database_username>'@'localhost' identified by '<your_database_password>';
grant all on <database_name>.* to '<database_username>'@'localhost' with grant option;
flush privileges;
exit
- The best way is run WikiJS engine in dedicated userspace. Let's create account and directory:
- Switch user to wikijs, download and unpack the archive;
cd ~; wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz; tar -xf *.tar.gz
- Rename template config and edit it. Set database type and credentials;
- Return back to the root console and create wiki service via text editor. Just run this command:
nano /etc/systemd/system/wiki.service
- Insert code below into the file and save it;
[Unit]
Description=Wiki
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/node server
Restart=always
User=wikijs
Environment=NODE_ENV=production
WorkingDirectory=/wikijs
[Install]
WantedBy=multi-user.target
- Then create start.sh script with followed content:
#/bin/bash
sleep 5
/usr/bin/node /wikijs/server
- Reload system configuration, enable and run service you've made. Then check service status;
service wiki status
Final configuration
Now WikiJS is working, so, it's time to finalize installation.
- Open address http://<server_IP>:3000 (or http://<your_domain>:3000) in browser, fill all necessary data add click to the INSTALL button;
- System will apply settings. When finished, you should see WikiJS welcome screen. Congratulations!
Conclusion
Now you knew what is WikiJS, what its system requirements and how to install this platform on your own Ubuntu 20.04 server.