Skip to main content

Create an LXC Container

We use ID 110 as an example.

  • General: Set ID, hostname and password. Optionally add your public SSH key.

  • Template: Ubuntu 24.04

  • Disks: Minimum 8 GB. Recommended: 32 GB or 48 GB if you plan to store many files or images.

  • CPU: 1 core works; 2 cores are recommended for higher load.

  • Memory: Minimum 512 MB RAM and 512 MB swap. If possible, increase RAM to 1024 MB.

  • Network:

    • IPv4: Static IP, e.g. 192.168.100.110/24
    • Gateway: Your host’s gateway, e.g. 192.168.100.1
    • IPv6: Disabled
  • DNS: Use host settings or adjust if required.

  • Confirm: Review all settings. Enable Start after created and click Finish.

After creation, open the Console tab and log in as root. If the screen shows only a cursor, click inside the console window and press Enter to display a prompt.

Log in with root and your password.

Update and upgrade the system:

apt update -qqy && apt upgrade -y

Reboot once the upgrade has completed.

Create an administrative user and assign sudo privileges:

adduser admin
usermod -aG sudo admin

You can now continue here or switch to an external terminal.

PostgreSQL Installation

This step can be done as admin or root. Example shown as admin:

sudo apt update
sudo apt install postgresql postgresql-contrib -y

# Switch to postgres user
sudo -u postgres psql

# Inside psql:
CREATE DATABASE wikijs;
CREATE USER wikiuser WITH PASSWORD 'your_secure_password';
GRANT ALL PRIVILEGES ON DATABASE wikijs TO wikiuser;
\q

Node Installation

Follow the instructions from the Node.js website:

sudo apt install curl -y
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt install nodejs -y

node -v
npm -v

# Upgrade npm to the version shown on screen
sudo npm install -g npm@11.6.2

Creating a WikiJS System User

Create a dedicated system user for running the Wiki.js service:

sudo useradd -r -s /usr/sbin/nologin wikijs
sudo mkdir -p /var/www/wiki
sudo chown wikijs:wikijs /var/www/wiki

WIKI JS Installation

Based on the official documentation: https://docs.requarks.io/install/linux

Install

  1. Download the latest Wiki.js release:

    wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz
    
  2. Extract the files:

    mkdir wiki
    tar xzf wiki-js.tar.gz -C ./wiki
    cd ./wiki
    
  3. Rename the sample configuration:

    mv config.sample.yml config.yml
    
  4. Edit your configuration:

    nano config.yml
    
  5. (Only for SQLite installations):

    npm rebuild sqlite3
    
  6. Start Wiki.js:

    node server
    
  7. Wait for the setup message and open the provided URL in your browser.

  8. Complete the setup wizard.

Run as Service (systemd)

  1. Create the service file:

    sudo nano /etc/systemd/system/wiki.service
    
  2. Insert the following (adjust paths as needed):

    [Unit]
    Description=Wiki.js
    After=network.target
    
    [Service]
    Type=simple
    ExecStart=/usr/bin/node server
    Restart=always
    User=nobody
    Environment=NODE_ENV=production
    WorkingDirectory=/var/wiki
    
    [Install]
    WantedBy=multi-user.target
    
  3. Save and exit.

  4. Reload systemd:

    sudo systemctl daemon-reload
    
  5. Start the service:

    sudo systemctl start wiki
    
  6. Enable autostart:

    sudo systemctl enable wiki
    

You can view logs using:

journalctl -u wiki

If you want, I can also streamline the wording further or adapt the text to match the exact formatting conventions of your wiki system.