How-To: Install Wiki.js On Ubuntu 22.04


This tutorial shows you how to install Wiki.js on an Ubuntu 22.04 operating system. It requires MySQL and Node.js. Other databases such as PostgreSQL, MariaDB, MS SQL and SQLite can also be used.


  • Operating System: Ubuntu 22.04 
  • MySQL has been installed and a root user (or similar account that can create a new user) is available


01. MySQL should be installed on the machine. If not, follow the instructions installation and setting of the root password here.

02. Next is to create the database and user for the Wiki.js. While it is also possible to use the root account, it is not recommended. Execute the following commands. Note that this setup only allows the database to be accessible from (within the system) and cannot be accessed remotely. 

sudo mysql -u root -p


CREATE DATABASE <<db-name>>;
CREATE USER <<db-username>>@'localhost' IDENTIFIED BY '<<db-password>>';
GRANT ALL PRIVILEGES ON <<db-name>>.* TO <<db-username>>@'localhost' IDENTIFIED BY '<<db-password>>';

Example only (Set your own password, and not just copy paste this as is)

CREATE USER wiki_dba@ IDENTIFIED WITH mysql_native_password BY 'AVeryLongComplexP@ssw0rdW33';
GRANT ALL ON wiki.* TO 'wiki_dba'@;

We suggest using an SSH tunnel if you intend to access the database.


Install Node.js version 16.x. Support for Node.js 18 and later will be supported when Wiki.js 3.0 is released.

curl -fsSL | sudo -E bash - && sudo apt-get install -y nodejs

Verify if installed correctly. 

curl -sL | bash -

and check the version

node --version

For other installation instructions see here.


01. Download the Wiki application to the local file system.


02. Create the directory and unpack the application

mkdir wiki
tar xzf wiki-js.tar.gz -C ./wiki
cd ./wiki

03. Make a copy of the sample config file

mv config.sample.yml config.yml

04. Edit the config file and apply the database credentials you created before.

nano config.yml

It will be something like the following

# ---------------------------------------------------------------------
# Port the server should listen to
# ---------------------------------------------------------------------

port: 3000


  type: mysql

  # PostgreSQL / MySQL / MariaDB / MS SQL Server only:
  host: localhost
  port: 5432
  user: wikijs
  pass: wikijsrocks
  db: wiki
  ssl: false

Update the configuration, specifying the application port and DB credentials. The port can be left as is or changed to port 8080.

# ---------------------------------------------------------------------
# Port the server should listen to
# ---------------------------------------------------------------------

port: 8080


  type: mysql

  # PostgreSQL / MySQL / MariaDB / MS SQL Server only:
  port: 3306
  user: wiki_dba
  pass: AVeryLongComplexP@ssw0rdW33
  db: wiki
  ssl: false

Save the changes.

05. Start the server

node server

06. Access the Wiki on your browser using the link displayed in the console. By default if you did not change the port is 3000. It will be something like http://localhost:3000

Congratulations. You now have your own setup of Wiki.js. In our next guide we will run the Wiki.js as a service and use NGINX as our reverse proxy.


For enquiries, product placements, sponsorships, and collaborations, connect with us at We'd love to hear from you!