📚 Wiki.js - Your Personal Knowledge Base [Part 8 of 10]

:books: Wiki.js - Your Personal Knowledge Base [Part 8 of 10]

Organize documentation, notes, and knowledge in a beautiful wiki

:open_book::writing_hand::magnifying_glass_tilted_left::light_bulb:


Need a place to document everything? Store notes? Create guides? Build a knowledge base?

Wiki.js is a modern, powerful wiki platform that makes documentation beautiful and easy.

Features:

  • Beautiful, modern interface

  • Markdown editor with live preview

  • Rich text editor option

  • Full-text search

  • Version history for all pages

  • User permissions and groups

  • Multiple authentication methods

  • Asset management (images, files)

  • Export to PDF, HTML, Markdown

  • Dark mode support

Let’s set it up!


:brain: What is Wiki.js?

Wiki.js is a modern wiki software built on Node.js.

Perfect for:

  • Personal documentation - How-to guides, notes, references

  • Project documentation - Technical specs, API docs

  • Team knowledge base - Shared information, procedures

  • Learning notes - Study materials, tutorials

  • Recipe collection - Yes, people use it for recipes!

Why Wiki.js?

  • Clean, modern interface

  • Fast and lightweight

  • Easy to use (no complex syntax)

  • Powerful search

  • Version control built-in

  • Free and open source


:clipboard: What You’ll Need

Prerequisites

  • :white_check_mark: Docker and Portainer running (Part 4)

  • :white_check_mark: Nginx Proxy Manager configured (Part 5)

  • :white_check_mark: At least 2GB RAM

  • :white_check_mark: Storage space for wiki content

Ports Required

  • Port 3000 - Wiki.js web interface

:rocket: Installing Wiki.js

Wiki.js uses two containers:

  • wikijs - Main application

  • PostgreSQL - Database for content storage

We’ll deploy them as a stack in Portainer.


Step 1: Create Data Directory

On your Ubuntu server (via SSH):


# Create directory for Wiki.js database

sudo mkdir -p /mnt/storage/docker/wikijs/postgres

# Set ownership (replace 'admin' with your username)

sudo chown -R admin:admin /mnt/storage/docker/wikijs


Step 2: Generate Database Password

Generate a secure password for PostgreSQL:


# Generate a 32-character password (A-Z, a-z, 0-9 only)

openssl rand -base64 32 | tr -dc 'A-Za-z0-9' | head -c 32

Save this password - you’ll need it in the next step!


Step 3: Deploy via Portainer

Login to Portainer:


https://portainer.homelab.example.com

Create new stack:

  1. Click Stacks in left sidebar

  2. Click + Add stack

  3. Name: wikijs

  4. Build method: Web editor

Paste this compose configuration:


version: '3.8'

services:

wikijs:

container_name: wikijs

image: ghcr.io/requarks/wiki:2

environment:

DB_TYPE: postgres

DB_HOST: wikijs_postgres

DB_PORT: 5432

DB_USER: wikijs

DB_PASS: ${DB_PASSWORD}

DB_NAME: wikijs

TZ: America/New_York # Change to your timezone

ports:

- '3000:3000'

depends_on:

- database

restart: unless-stopped

networks:

- default

- portainer-network

database:

container_name: wikijs_postgres

image: postgres:17-alpine

environment:

POSTGRES_DB: wikijs

POSTGRES_USER: wikijs

POSTGRES_PASSWORD: ${DB_PASSWORD}

volumes:

- /mnt/storage/docker/wikijs/postgres:/var/lib/postgresql/data

restart: unless-stopped

networks:

- default

networks:

portainer-network:

external: true

Note about timezone:

  • Find your timezone: TZ Database Timezones

  • Examples: America/New_York, America/Los_Angeles, Europe/London, Asia/Tokyo


Step 4: Set Environment Variable

Scroll down to “Environment variables” section:

  1. Click + Add environment variable

  2. Name: DB_PASSWORD

  3. Value: Paste the password you generated in Step 2

  4. Click Add


Step 5: Deploy the Stack

Deploy:

  • Scroll down

  • Click Deploy the stack

  • Wait 2-3 minutes for deployment

Verify deployment:

  • Go to Containers in Portainer

  • Confirm both containers are running:

  • wikijs

  • wikijs_postgres


Step 6: Configure Firewall

On your Ubuntu server (via SSH):


# Allow Wiki.js from LAN

sudo ufw allow from 192.168.1.0/24 to any port 3000 proto tcp comment 'Wiki.js from LAN'

# Check firewall status

sudo ufw status numbered

Note: Replace 192.168.1.0/24 with your network range.


:globe_with_meridians: Setting Up Proxy with NPM

Now let’s add Wiki.js to Nginx Proxy Manager.

Step 1: Create SSL Certificate

Login to NPM:


https://npm.homelab.example.com

Create certificate:

  1. Go to SSL Certificates

  2. Click Add SSL CertificateLet’s Encrypt

  3. Domain Names: wiki.homelab.example.com

  4. Use a DNS Challenge: :white_check_mark: Enable (if using DNS challenge)

  5. Email Address: Your email for Let’s Encrypt notifications

  6. Agree to Terms: :white_check_mark: Check

  7. Click Save

  8. Wait for certificate issuance (1-2 minutes)


Step 2: Create Proxy Host

In NPM:

  1. Go to HostsProxy Hosts

  2. Click Add Proxy Host

Details Tab:

  • Domain Names: wiki.homelab.example.com

  • Scheme: http

  • Forward Hostname/IP: wikijs (container name)

  • Forward Port: 3000

  • Cache Assets: :white_check_mark: Enable

  • Block Common Exploits: :white_check_mark: Enable

  • Websockets Support: :white_check_mark: Enable

SSL Tab:

  • SSL Certificate: Select your certificate

  • Force SSL: :white_check_mark: Enable

  • HTTP/2 Support: :white_check_mark: Enable

  • HSTS Enabled: :white_large_square: Leave unchecked

Click: Save


Step 3: Test Access

Open your browser:


https://wiki.homelab.example.com

You should see the Wiki.js setup wizard!


:artist_palette: First-Time Setup

Complete Setup Wizard

Step 1: Administrator Account

  • Email: Your email address

  • Password: Choose a strong password

  • Confirm Password: Re-enter password

  • Click Install

Need a strong password?

Step 2: General Settings

  • Site URL: https://wiki.homelab.example.com

  • Site Title: Choose a title (e.g., “My HomeLab Wiki”)

  • Click Continue

Step 3: Telemetry

  • Choose whether to send anonymous usage data

  • Click Continue

Step 4: Finish

  • Setup is complete!

  • Click Start to access your wiki


:memo: Using Wiki.js

Creating Your First Page

  1. Click: + New Page (top right)

  2. Select editor:

  • Markdown - Simple text formatting (recommended)

  • Visual Editor - Rich text WYSIWYG

  • Code - Raw HTML

  1. Choose path: /home or custom path

  2. Write content

  3. Click: Create (top right)


Markdown Basics

Wiki.js uses Markdown for formatting:


# Heading 1

## Heading 2

### Heading 3

**Bold text**

*Italic text*

- Bullet point

- Another point

1. Numbered list

2. Second item

[Link text](https://example.com)

![Image](image.jpg)

`inline code`

code block


Live preview shows your formatting as you type!


Organizing Pages

Use paths to organize:

  • /home - Home page

  • /guides/docker - Docker guide

  • /guides/networking - Networking guide

  • /recipes/pizza - Pizza recipe (why not?)

Paths create hierarchy:

  • Parent pages automatically list child pages

  • Breadcrumbs show navigation path

  • Search indexes all pages


Adding Images

  1. Click: Insert → Image

  2. Upload image or paste URL

  3. Add alt text (optional)

  4. Click: Insert

Images are stored in the database - no separate file management needed!


Page History

Every edit is saved:

  1. Click: Page Actions (⋮) → History

  2. View all versions with timestamps

  3. Compare versions side-by-side

  4. Restore any previous version

Never lose content again!


Search

Full-text search built-in:

  • Search box in top navigation

  • Searches all page content

  • Instant results

  • Highlights matches


:busts_in_silhouette: User Management

Adding Users

As admin:

  1. Click: Administration (profile menu)

  2. Go to: Users

  3. Click: + New User

  4. Fill in:

  • Email

  • Name

  • Password (or send invite)

  • Group (permissions)

  1. Click: Create

Groups and Permissions

Default groups:

  • Administrators - Full access

  • Guests - Read-only access

Create custom groups:

  1. Go to: Administration → Groups

  2. Click: + New Group

  3. Set permissions:

  • Read pages

  • Write pages

  • Manage pages

  • Upload assets

  • Admin access

  1. Assign users to group

:artist_palette: Customization

Change Theme

  1. Go to: Administration → Theme

  2. Choose:

  • Light mode

  • Dark mode

  • Auto (follows system)

  1. Customize colors (optional)

  2. Click: Apply


Add Logo

  1. Go to: Administration → General

  2. Upload logo image

  3. Set logo URL (optional)

  4. Click: Apply


Configure Footer

  1. Go to: Administration → General

  2. Edit footer content

  3. Add links (privacy policy, contact, etc.)

  4. Click: Apply


:wrench: Maintenance

Check Storage Usage


# Check Wiki.js database size

du -sh /mnt/storage/docker/wikijs/postgres


Backup Wiki

Backup database:


# Backup PostgreSQL database

docker exec wikijs_postgres pg_dump -U wikijs wikijs > wikijs-backup-$(date +%Y%m%d).sql

# Compress backup

gzip wikijs-backup-$(date +%Y%m%d).sql

Store backups off-site for redundancy!


Restore from Backup


# Decompress backup

gunzip wikijs-backup-YYYYMMDD.sql.gz

# Restore database

cat wikijs-backup-YYYYMMDD.sql | docker exec -i wikijs_postgres psql -U wikijs -d wikijs


Update Wiki.js

Via Portainer:

  1. Go to Stackswikijs

  2. Click Editor

  3. Click Update the stack

  4. Select Re-pull image and redeploy

  5. Wait for update to complete

Check for updates quarterly - Wiki.js is stable and updates less frequently than other services.


:light_bulb: Use Cases

Personal Documentation

Document your HomeLab:

  • Server configurations

  • Network diagrams

  • Troubleshooting guides

  • Command references

  • Service documentation


Project Notes

Track projects:

  • Project goals and requirements

  • Design decisions

  • Implementation notes

  • Testing procedures

  • Lessons learned


Learning Notes

Study materials:

  • Course notes

  • Tutorial summaries

  • Code examples

  • Reference materials

  • Practice exercises


Recipe Collection

Yes, really:

  • Organize recipes by category

  • Add photos

  • Track modifications

  • Share with family

  • Search by ingredient


:brain: TL;DR

  • Wiki.js is a modern wiki platform

  • Features: Markdown editor, version history, search, permissions

  • Installation: Deploy two-container stack via Portainer

  • Setup: Simple wizard, no email required

  • Organization: Use paths to create hierarchy

  • Backup: Export database regularly

  • Next: We’ll set up OpenSpeedTest for network monitoring in Part 9


:speech_balloon: Your Turn

What will you document in your wiki?

Do you currently use any note-taking apps?

Excited about having your own knowledge base?

Drop a comment below!


Navigation: ← Part 7 | Part 9 →