• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Fedora

How to Install Wiki.js on Fedora 28

How VPS by How VPS
December 1, 2019
in Fedora
0
0
SHARES
105
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Using a Different System?
  2. Requirements
  3. Before you begin
  4. Install Node.js
  5. Install MongoDB
  6. Install and configure Nginx
  7. Install Acme.sh client and obtain Let’s Encrypt certificate (optional)
  8. Install Wiki.js
  9. Setup PM2
  10. Want to contribute?

Using a Different System?

  • How to Install Wiki.js on Ubuntu 18.04

  • How to Install Wiki.js on CentOS 7

  • How to Install Wiki.js on Debian 9

  • How to Install Wiki.js on FreeBSD 11

Are we missing a guide for your target system? Request one, or submit your own!


Wiki.js is a free and open source, modern wiki app built on Node.js, MongoDB, Git and Markdown. Wiki.js source code is publicly hosted on Github. This guide will show you how to install Wiki.js on a fresh Fedora 28 Vultr instance by using Node.js, MongoDB, PM2, Nginx, Git and Acme.sh.

Requirements

Requirements to run Wiki.js are the following:

  • Node.js version 6.9.0 or later
  • MongoDB version 3.2 or later
  • A web server such as Nginx, Apache, IIS, Caddy, or H2O. This guide will use Nginx
  • Git version 2.7.4 or later
  • A Git-compliant repository (public or private) This is optional
  • A minimum of 768MB RAM
  • Domain name with A/AAAA records set up

Before you begin

Check the OS version.

cat /etc/fedora-release
# Fedora release 28 (Twenty Eight)

Create a new non-root user account with sudo access and switch to it.

useradd -c "John Doe" johndoe && passwd johndoe
usermod -aG wheel johndoe
su - johndoe

NOTE: Replace johndoe with your username.

Ensure that your system is up to date.

sudo dnf check-upgrade || sudo dnf upgrade -y

Set up the timezone.

timedatectl list-timezones
sudo timedatectl set-timezone 'Region/City'

Install required and useful packages.

sudo dnf install -y wget vim unzip bash-completion git

For simplicity, disable SELinux and Firewall.

sudo setenforce 0
sudo systemctl stop firewalld
sudo systemctl disable firewalld

Install Node.js

Wiki.js requires Node.js 6.9.0 or later, so we will first need to install Node.js.

Install Node.js.

sudo dnf install -y nodejs

Check Node.js and npm versions.

node -v && npm -v
# v8.11.3
# 5.6.0

Install MongoDB

Wiki.js uses MongoDB as a database engine. According to that, we will need to install MongoDB on our server.

Install MongoDB.

sudo dnf install -y mongodb mongodb-server

Check the MongoDB version.

mongo --version | head -n 1 && mongod --version | head -n 1
# MongoDB shell version v3.6.3
# db version v3.6.3

Enable and start MongoDB.

sudo systemctl enable mongod.service
sudo systemctl start mongod.service

Install and configure Nginx

Wiki.js can run without any actual web server (such as Nginx or Apache).
However, it is highly recommended to put a standard web server in front of Wiki.js. This ensures you can use features like SSL, multiple websites, caching, and others. We will use Nginx in this tutorial, but any other server will do, you just need to configure it properly.

Install Nginx.

sudo dnf install -y nginx

Check the version.

nginx -v
# nginx version: nginx/1.12.1

Enable and start Nginx.

sudo systemctl enable nginx.service
sudo systemctl start nginx.service

Configure Nginx as a HTTP or HTTPS (if you use SSL) reverse proxy for the Wiki.js application.

Run sudo vim /etc/nginx/conf.d/wiki.js.conf and populate it with the basic reverse proxy configuration below.

server {

    listen [::]:80;
    listen 80;

    server_name wiki.example.com;

    root /usr/share/nginx/html;

    charset utf-8;
    client_max_body_size 50M;

    location /.well-known/acme-challenge/ {
        allow all;
    }

    location / {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_next_upstream error timeout http_502 http_503 http_504;
    }

}

The only thing you need to change in the above config is the server_name directive, and potentially the proxy_pass directive if you decide to configure some port other than 3000. Wiki.js uses port 3000 by default.

Check the configuration.

sudo nginx -t

Reload Nginx.

sudo systemctl reload nginx.service

Install Acme.sh client and obtain Let’s Encrypt certificate (optional)

Securing your wiki with HTTPS is not necessary, but it is a good practice to secure your site traffic. In order to obtain an SSL certificate from Let’s Encrypt we will use Acme.sh client. Acme.sh is a pure unix shell software for obtaining SSL certificates from Let’s Encrypt with zero dependencies. That makes it very lightweight in comparison to some other ACME protocol clients that require a lot of dependencies to run successfully.

Download and install Acme.sh.

sudo mkdir /etc/letsencrypt
git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
sudo ./acme.sh --install --home /etc/letsencrypt --accountemail [email protected]
cd ~

Check the acme.sh version.

/etc/letsencrypt/acme.sh --version
# v2.7.9

Obtain RSA and ECDSA certificates for wiki.example.com.

# RSA 2048
sudo /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt -d wiki.example.com --webroot /usr/share/nginx/html --reloadcmd "sudo systemctl reload nginx.service" --accountemail [email protected] --ocsp-must-staple --keylength 2048
# ECDSA/ECC P-256
sudo /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt -d wiki.example.com --webroot /usr/share/nginx/html --reloadcmd "sudo systemctl reload nginx.service" --accountemail [email protected] --ocsp-must-staple --keylength ec-256 

After running the above commands, your certificates and keys will be in:

  • For RSA: /etc/letsencrypt/wiki.example.com
  • For ECC/ECDSA: /etc/letsencrypt/wiki.example.com_ecc

NOTE: Don’t forget to replace wiki.example.com with your domain name.

After obtaining certificates from Let’s Encrypt, we need to configure Nginx to take advantage of them.

Run sudo vim /etc/nginx/conf.d/wiki.js.conf again and configure Nginx as a HTTPS reverse proxy.

server {

    listen [::]:443 ssl http2;
    listen 443 ssl http2;
    listen [::]:80;
    listen 80;

    server_name wiki.example.com;

    root /usr/share/nginx/html;

    charset utf-8;
    client_max_body_size 50M;

    location /.well-known/acme-challenge/ {
        allow all;
    }

    # RSA
    ssl_certificate /etc/letsencrypt/wiki.example.com/fullchain.cer;
    ssl_certificate_key /etc/letsencrypt/wiki.example.com/wiki.example.com.key;
    # ECDSA
    ssl_certificate /etc/letsencrypt/wiki.example.com_ecc/fullchain.cer;
    ssl_certificate_key /etc/letsencrypt/wiki.example.com_ecc/wiki.example.com.key;

    location / {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_next_upstream error timeout http_502 http_503 http_504;
    }

}

Check the configuration.

sudo nginx -t

Reload Nginx.

sudo systemctl reload nginx.service

Install Wiki.js

Create an empty document root folder, where Wiki.js should be installed.

sudo mkdir -p /var/www/wiki.example.com

Navigate to the document root folder.

cd /var/www/wiki.example.com

Change ownership of /var/www/wiki.example.com folder to user johndoe.

sudo chown -R johndoe:johndoe /var/www/wiki.example.com

From the /var/www/wiki.example.com folder, run the following command to download and install Wiki.js.

curl -sSo- https://wiki.js.org/install.sh | bash

You can run the following command in order to view the currently installed version of Wiki.js.

node wiki --version
# 1.0.78

Once the installation is completed, you’ll be prompted to run the configuration wizard.

Start the configuration wizard by running.

node wiki configure

This will notify you to navigate to http://localhost:3000 to configure Wiki.js. If you have Nginx in front of Wiki.js, then it means you can open your domain name (e.g. http://wiki.example.com) instead of going to localhost.

Using your web browser, navigate to http://wiki.example.com and follow the on-screen instructions. All the settings entered during the configuration wizard are saved in the config.yml file. The configuration wizard will automatically start Wiki.js for you.

Setup PM2

By default, Wiki.js will not start automatically after a system reboot. In order to make it start on boot, we need to setup PM2 process manager. PM2 comes bundled with Wiki.js as a local NPM module, so we don’t need to install PM2 globally.

Tell PM2 to configure itself as a startup service by running:

/var/www/wiki.example.com/node_modules/pm2/bin/pm2 startup

Finally, save the current PM2 configuration by running the command: /var/www/wiki.example.com/node_modules/pm2/bin/pm2 save

Your Wiki.js instance runs as a background process, using PM2 as its process manager.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

Install TaskServer (taskd) on Fedora 26

Next Post

How to Install Attendize on Fedora 29

Next Post

How to Install Attendize on Fedora 29

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet