In this tutorial, we will guide you on how to install Wiki.js on Linux Mint. Wiki.js is an open source and modern wiki application designed for small to large-scale businesses.
Before we start with the installation, make sure that your system meets the following requirements:
Before we install anything, let's update the system packages using the following command:
sudo apt update && sudo apt upgrade
Wiki.js uses MariaDB as the backend database. Use the following command to install it:
sudo apt install mariadb-server
After installation, run the following command to secure your database:
sudo mysql_secure_installation
And answer the questions as follows:
Now let's install Wiki.js. Clone the repository on your system using the following command:
git clone https://github.com/Requarks/wiki.git
Then move to the cloned directory:
cd wiki
Next, install the dependencies using the following command:
npm install
Create a new configuration file by copying the example file:
cp config.sample.yml config.yml
Edit the configuration file with your desired settings. You can use nano or vim to edit the file:
nano config.yml
Set the host
property to localhost
, and the port
property to 3000
:
...
server:
host: localhost
port: 3000
...
In this step, we will configure Nginx as a reverse proxy for Wiki.js. Install Nginx on your system using the following command:
sudo apt install nginx
Create a new Nginx configuration file for the Wiki.js virtual host:
sudo nano /etc/nginx/sites-available/wiki.example.com
Replace wiki.example.com
with your domain name. Add the following content to the file:
server {
listen 80;
server_name wiki.example.com;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Save and close the file.
Create a symlink to the sites-enabled
directory:
sudo ln -s /etc/nginx/sites-available/wiki.example.com /etc/nginx/sites-enabled/
Check the Nginx configuration for any syntax errors:
sudo nginx -t
If there are no errors, restart Nginx to apply the changes:
sudo systemctl restart nginx
Finally, start the Wiki.js using the following command:
npm start
Wiki.js will now start running. You can access Wiki.js by visiting http://localhost:3000 in your web browser.
In this tutorial, we have successfully installed Wiki.js on Linux Mint and configured it to run behind Nginx. You can now begin using Wiki.js to create and manage your documentation.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!