Organize documentation, notes, and knowledge in a beautiful wiki
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!
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
What You'll Need
Prerequisites
- Docker and Portainer running (Part 4)
- Nginx Proxy Manager configured (Part 5)
- At least 2GB RAM
- Storage space for wiki content
Ports Required
- Port 3000 - Wiki.js web interface
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:
- Click Stacks in left sidebar
- Click + Add stack
- Name:
wikijs - 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 # Find yours: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
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:
- Click + Add environment variable
- Name:
DB_PASSWORD - Value: Paste the password you generated in Step 2
- 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:
wikijswikijs_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.
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:
- Go to SSL Certificates
- Click Add SSL Certificate > Let's Encrypt
- Domain Names:
wiki.homelab.example.com - Use a DNS Challenge: Enable (if using DNS challenge)
- Email Address: Your email for Let's Encrypt notifications
- Agree to Terms: Check
- Click Save
- Wait for certificate issuance (1-2 minutes)
Step 2: Create Proxy Host
In NPM:
- Go to Hosts > Proxy Hosts
- 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: Enable
- Block Common Exploits: Enable
- Websockets Support: Enable
SSL Tab:
- SSL Certificate: Select your certificate
- Force SSL: Enable
- HTTP/2 Support: Enable
- HSTS Enabled: Leave unchecked
Click: Save
Step 3: Test Access
Open your browser:
https://wiki.homelab.example.com
You should see the Wiki.js setup wizard!
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?
- Use a password manager (Bitwarden, 1Password, Proton Pass, KeePassXC)
- Or generate one:
openssl rand -base64 20
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
Using Wiki.js
Creating Your First Page
- Click: + New Page (top right)
- Select editor:
- Markdown - Simple text formatting (recommended)
- Visual Editor - Rich text WYSIWYG
- Code - Raw HTML
- Choose path:
/homeor custom path - Write content
- 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)

`inline code`
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
- Click: Insert > Image
- Upload image or paste URL
- Add alt text (optional)
- Click: Insert
Images are stored in the database - no separate file management needed!
Page History
Every edit is saved:
- Click: Page Actions > History
- View all versions with timestamps
- Compare versions side-by-side
- 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
User Management
Adding Users
As admin:
- Click: Administration (profile menu)
- Go to: Users
- Click: + New User
- Fill in:
- Name
- Password (or send invite)
- Group (permissions)
- Click: Create
Groups and Permissions
Default groups:
- Administrators - Full access
- Guests - Read-only access
Create custom groups:
- Go to: Administration > Groups
- Click: + New Group
- Set permissions:
- Read pages
- Write pages
- Manage pages
- Upload assets
- Admin access
- Assign users to group
Customization
Change Theme
- Go to: Administration > Theme
- Choose:
- Light mode
- Dark mode
- Auto (follows system)
- Customize colors (optional)
- Click: Apply
Add Logo
- Go to: Administration > General
- Upload logo image
- Set logo URL (optional)
- Click: Apply
Configure Footer
- Go to: Administration > General
- Edit footer content
- Add links (privacy policy, contact, etc.)
- Click: Apply
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:
- Go to Stacks > wikijs
- Click Editor
- Click Update the stack
- Select Re-pull image and redeploy
- Wait for update to complete
Check for updates quarterly - Wiki.js is stable and updates less frequently than other services.
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
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