A self-hosted wiki is one of those infrastructure pieces that pays for itself immediately. This guide covers deploying Wiki.js 2.x in a Proxmox LXC container backed by PostgreSQL — the same setup this homelab uses to document everything from cluster topology to runbooks.
The whole thing runs on a single HP EliteDesk 705 G4 mini node and consumes under 300 MB RAM at idle.
Why Wiki.js over alternatives
| Option | Pros | Cons |
|---|---|---|
| Wiki.js | Full-featured, Git storage, LDAP, great editor | Requires Node.js + DB |
| Obsidian | Excellent local editor | No browser access |
| BookStack | Simple, good permissions | Less powerful editor |
| Outline | Slack-like feel | Requires OAuth provider |
Wiki.js wins for homelab use because it stores pages as Markdown files in a git repository — meaning your documentation is always in plain text, version controlled, and portable.
Architecture
Task 1: Create the PostgreSQL container
In the Proxmox web UI: pvelab04 → Create CT.
| Field | Value |
|---|---|
| VMID | 109 |
| Hostname | postgres |
| OS | Ubuntu 24.04 LXC (unprivileged) |
| IP | 10.0.0.77 (static) |
| Cores | 2 |
| RAM | 1024 MB |
| Disk | 10 GB |
Start the container.
apt-get update && apt-get install -y postgresql-16
systemctl enable --now postgresql
sudo -u postgres psql <<SQL
CREATE USER wikijs WITH PASSWORD 'changeme_strong_password';
CREATE DATABASE wikijs OWNER wikijs;
GRANT ALL PRIVILEGES ON DATABASE wikijs TO wikijs;
SQL
Use a strong password here. This database will contain all your wiki content. Store the password in your secrets manager — not in the wiki itself.
PostgreSQL by default only accepts local connections. Edit the config to allow the Wiki.js container’s IP:
# Allow MD5 auth from the wiki container's subnet
echo "host wikijs wikijs 10.0.0.0/24 md5" >> /etc/postgresql/16/main/pg_hba.conf
# Bind to all interfaces (not just localhost)
sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/" /etc/postgresql/16/main/postgresql.conf
systemctl restart postgresql
Task 2: Create the Wiki.js container
| Field | Value |
|---|---|
| VMID | 108 |
| Hostname | wikijs |
| OS | Ubuntu 24.04 LXC (unprivileged) |
| IP | 10.0.0.76 (static) |
| Cores | 2 |
| RAM | 512 MB |
| Disk | 10 GB |
apt-get update && apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
node --version # → v20.x.x
useradd -m -s /bin/bash wikijs
mkdir -p /opt/wikijs
cd /opt/wikijs
curl -sSL https://github.com/requarks/wiki/releases/latest/download/wiki-js.tar.gz | tar xz
chown -R wikijs:wikijs /opt/wikijs
cat > /opt/wikijs/config.yml << 'EOF'
port: 3000
db:
type: postgres
host: 10.0.0.77
port: 5432
user: wikijs
pass: changeme_strong_password
db: wikijs
ssl: false
logLevel: info
logFormat: default
upload:
maxFileSize: 10485760
maxFiles: 10
temp: /tmp
EOF
chown wikijs:wikijs /opt/wikijs/config.yml
cat > /etc/systemd/system/wikijs.service << 'EOF'
[Unit]
Description=Wiki.js
After=network.target
[Service]
User=wikijs
WorkingDirectory=/opt/wikijs
ExecStart=/usr/bin/node server
Restart=always
RestartSec=10
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target
EOF
systemctl enable --now wikijs
systemctl status wikijs
journalctl -u wikijs -f
# Wait for: "HTTP Server: STARTED"
Then open http://10.0.0.76:3000 in your browser. The first-launch wizard will guide you through creating the admin account.
Task 3: Configure reverse proxy with Caddy
Running on port 3000 works fine on LAN. For HTTPS and a clean URL (useful if you ever expose it externally or want a proper TLS cert on LAN), add a Caddy reverse proxy on the Proxmox host.
apt-get install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
apt-get update && apt-get install -y caddy
wiki.homelab.lan {
tls internal
reverse_proxy 10.0.0.76:3000
}
systemctl reload caddy
tls internal generates a self-signed cert automatically. For LAN access, add wiki.homelab.lan to your router’s DNS or your local /etc/hosts.
Task 4: Enable Git storage
This is the killer feature: every page save is committed to a git repository, giving you full history and a plain-text backup.
su - wikijs -c "git config --global user.email 'wikijs@homelab.lan'"
su - wikijs -c "git config --global user.name 'Wiki.js'"
mkdir -p /home/wikijs/wiki-content.git
su - wikijs -c "git init --bare /home/wikijs/wiki-content.git"
In the Wiki.js admin panel:
- Go to Administration → Storage
- Enable Git
- Set the repository path to
/home/wikijs/wiki-content.git - Set mode to Local
- Click Apply Changes → Sync Now
All existing pages will be committed to the repository immediately.
Task 5: Automatic daily backups via Proxmox snapshot
In the Proxmox web UI: Datacenter → Backup → Add.
| Field | Value |
|---|---|
| Schedule | daily, 02:00 |
| Storage | local (or your NAS) |
| VMs/CTs | 108 (wikijs), 109 (postgres) |
| Mode | Snapshot |
| Retention | Keep last 7 |
This captures both containers — the app and the database — in a consistent state each night.
Service management reference
# View live log
journalctl -u wikijs -f
# Restart after config change
systemctl restart wikijs
# Check database connection
pct exec 109 -- sudo -u postgres psql -c "\l"
# Manual git log of wiki changes
su - wikijs -c "git -C /home/wikijs/wiki-content.git log --oneline -20"
Wiki.js also exposes a GraphQL API at /graphql — useful for scripted page creation or bulk imports from other wiki systems.
Recommended hardware for this setup:
- HP EliteDesk 705 G4 mini — the host node used in this guide (~$120 refurbished)
- WD Blue SN570 NVMe 500GB — local storage for wiki content and backups
Related posts:
- Proxmox LXC Networking: Bridges, VLANs, and Static IPs — set a static IP and VLAN for this container
- Proxmox Security Hardening — harden the host before exposing a wiki
- Tailscale Subnet Router: Remote Access to Your Entire Homelab — read and edit your wiki from anywhere
- Proxmox Backup Server: Automated Container Backups — protect your wiki content with automated backups
- Hermes Agent Setup: Self-Hosted AI Agent on Proxmox — pair Hermes with Wiki.js to auto-document your lab
This post contains Amazon affiliate links (tag: buildahomelab-20). I earn a small commission on qualifying purchases at no extra cost to you.