Wiki.js on Proxmox LXC: Self-Hosted Knowledge Base in 30 Minutes

Deploy Wiki.js in an unprivileged Proxmox LXC container with a PostgreSQL backend, HTTPS via a reverse proxy, and automatic backups — the exact setup powering this homelab's documentation.

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

CT 108Wiki.jsNode.js · port 3000CT 109PostgreSQL 16port 5432Caddy (host)Reverse proxyport 443 → 3000Git storage backendPages stored as .md files, versioned automatically

Task 1: Create the PostgreSQL container

1Create CT 109 for PostgreSQL5 min

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.

2Install PostgreSQL 165 min
Inside CT 109

apt-get update && apt-get install -y postgresql-16
systemctl enable --now postgresql
3Create the Wiki.js database and user3 min
Inside CT 109 — create DB

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
Warning

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.

4Allow connections from the Wiki.js container3 min

PostgreSQL by default only accepts local connections. Edit the config to allow the Wiki.js container’s IP:

Inside CT 109 — allow remote connections

# 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

1Create CT 108 for Wiki.js5 min
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
2Install Node.js 20 LTS5 min
Inside CT 108

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
3Create the wikijs user and download Wiki.js5 min
Inside CT 108 — install Wiki.js

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
4Configure Wiki.js5 min
Inside CT 108 — create config.yml

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
5Create the systemd service3 min
Create /etc/systemd/system/wikijs.service

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
6Verify Wiki.js is running2 min
Check service status and logs

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.

1Install Caddy on the Proxmox host5 min
pvelab04 host — install Caddy

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
2Configure Caddy to proxy Wiki.js3 min
Edit /etc/caddy/Caddyfile

wiki.homelab.lan {
tls internal
reverse_proxy 10.0.0.76:3000
}
Reload Caddy

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.

1Create a bare git repo for wiki content3 min
Inside CT 108 — create git repo

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"
2Wire up the Git storage provider in the UI3 min

In the Wiki.js admin panel:

  1. Go to Administration → Storage
  2. Enable Git
  3. Set the repository path to /home/wikijs/wiki-content.git
  4. Set mode to Local
  5. Click Apply ChangesSync Now

All existing pages will be committed to the repository immediately.


Task 5: Automatic daily backups via Proxmox snapshot

1Add a scheduled Proxmox snapshot job5 min

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

Common Wiki.js operations

# 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:


Related posts:

This post contains Amazon affiliate links (tag: buildahomelab-20). I earn a small commission on qualifying purchases at no extra cost to you.