A personal wiki on your own server turns scattered notes into one place you can search. Runbooks, homelab docs, project notes, and how-to pages all live in one spot, backed up on your terms. A personal wiki vps docker setup gives you that without a monthly subscription, and both BookStack and Wiki.js run as containers you can start in an afternoon.
This guide compares the two, then walks through installing the one you pick with Docker Compose, putting it behind a reverse proxy, and backing it up. If you have not set up Docker yet, start with our guide to installing Docker Compose on Ubuntu 24.04 and come back here.
BookStack vs Wiki.js Comparison for a Personal Wiki VPS Docker Setup
BookStack organises content into a fixed hierarchy: shelves hold books, books hold chapters, chapters hold pages. That structure suits documentation that has a clear order, like server runbooks or a homelab manual. Its editor is a simple WYSIWYG editor, and it also has a Markdown editor if you prefer plain text. Search is fast, permissions are per shelf and book, and the interface stays calm even with hundreds of pages.
Wiki.js is flatter and more flexible. Pages sit in folders, and you pick your editor: Markdown, WYSIWYG, or raw HTML. It has built-in diagram support, a GraphQL API, and Git-backed storage so every page can live in a repo. That makes Wiki.js a strong pick if you want version control on your notes or you plan to automate page creation from scripts.
| Feature | BookStack | Wiki.js |
|---|---|---|
| Content structure | Shelves, books, chapters, pages | Folders and pages, no fixed hierarchy |
| Editors | WYSIWYG and Markdown | Markdown, WYSIWYG, and HTML |
| Search | Built-in, fast for books and pages | Built-in, with optional external search engines |
| Version control | Page revisions in the database | Revisions plus optional Git storage |
| Authentication | Local, LDAP, SAML, OIDC | Local, LDAP, SAML, OIDC, and social logins |
| Database | MySQL or MariaDB | PostgreSQL, MySQL, MariaDB, or SQLite |
| Best for | Ordered documentation and runbooks | Flexible notes, diagrams, and API use |
Pick BookStack when your notes have a natural order and you want the tool to enforce it. Pick Wiki.js when you want freedom in how pages connect, Git history, or an API to script against. Both are free and open source, so the cost is the same: your VPS time and a small amount of disk.
What you need before you install
A VPS with at least 1 GB of RAM runs either wiki fine for personal use, though 2 GB gives the database room to breathe. Check our VPS sizing guide for Docker stacks if you plan to run more services next to the wiki. You need Docker and Docker Compose installed, a domain or subdomain pointed at the VPS, and a folder for the project, such as /opt/wiki. Keep the wiki behind a login from day one. A public wiki with open registration fills with spam fast.
Install BookStack with Docker Compose
BookStack needs a database container next to the app container. This self hosted wiki docker compose file runs BookStack with MariaDB:
services:
bookstack:
image: lscr.io/linuxserver/bookstack:latest
container_name: bookstack
environment:
- PUID=1000
- PGID=1000
- APP_URL=https://wiki.example.com
- DB_HOST=bookstack_db
- DB_PORT=3306
- DB_USER=bookstack
- DB_PASS=change-this-password
- DB_DATABASE=bookstackapp
volumes:
- ./bookstack/config:/config
ports:
- 6875:80
restart: unless-stopped
depends_on:
- bookstack_db
bookstack_db:
image: lscr.io/linuxserver/mariadb:latest
container_name: bookstack_db
environment:
- PUID=1000
- PGID=1000
- MYSQL_ROOT_PASSWORD=change-this-root-password
- MYSQL_DATABASE=bookstackapp
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=change-this-password
volumes:
- ./bookstack/db:/config
restart: unless-stopped
Change the passwords and the APP_URL before you start it. Then run docker compose up -d from /opt/wiki and open http://your-server-ip:6875. Log in with the default admin account, then change its password and email right away. The default credentials are in the BookStack docs, so treat the first login as a setup step, not a finished install.
Install Wiki.js with Docker Compose
Wiki.js ships as a single app container plus a database. This file pairs it with PostgreSQL:
services:
wikijs:
image: ghcr.io/requarks/wiki:2
container_name: wikijs
environment:
- DB_TYPE=postgres
- DB_HOST=wikijs_db
- DB_PORT=5432
- DB_USER=wikijs
- DB_PASS=change-this-password
- DB_NAME=wikijs
ports:
- 3000:3000
restart: unless-stopped
depends_on:
- wikijs_db
wikijs_db:
image: postgres:16
container_name: wikijs_db
environment:
- POSTGRES_DB=wikijs
- POSTGRES_USER=wikijs
- POSTGRES_PASSWORD=change-this-password
volumes:
- ./wikijs/db:/var/lib/postgresql/data
restart: unless-stopped
Start it with docker compose up -d, then open http://your-server-ip:3000 and finish the setup wizard. The wizard asks for an admin account, site title, and whether to allow public registration. Turn public registration off unless you have a clear reason to leave it on. If you are new to Compose files, our Docker Compose explainer walks through what each part of a file like this does.
Put the wiki behind a reverse proxy with HTTPS
Do not leave the wiki on a bare port with plain HTTP. Point a subdomain at your VPS, then proxy it through Nginx with a TLS certificate. A typical server block for BookStack on port 6875 looks like this:
server {
listen 443 ssl;
server_name wiki.example.com;
ssl_certificate /etc/letsencrypt/live/wiki.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/wiki.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:6875;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
For Wiki.js, change the port to 3000. Get the certificate with Certbot, then test with nginx -t and reload Nginx. Our guide to configuring Nginx as a reverse proxy for Docker containers covers the full setup, including HTTP to HTTPS redirects and headers. After the proxy is up, close the wiki port in your firewall so the only way in is through the domain.
Back up the wiki before you need the backup
A wiki holds the notes you cannot rebuild from memory, so back it up on a schedule. Two parts matter: the database volume and the file volume. A simple nightly script stops neither container, dumps the database, and copies both volumes to a backup folder:
#!/bin/bash
BACKUP_DIR=/opt/backups/wiki-$(date +%F)
mkdir -p $BACKUP_DIR
docker compose -f /opt/wiki/docker-compose.yml exec -T bookstack_db
mysqldump -u bookstack -p'change-this-password' bookstackapp > $BACKUP_DIR/db.sql
cp -r /opt/wiki/bookstack $BACKUP_DIR/files
find /opt/backups -maxdepth 1 -type d -mtime +14 -exec rm -rf {} ;
For Wiki.js, swap the dump line for pg_dump against the Postgres container. Copy the backup folder off the VPS, to another server or object storage. A backup that lives on the same disk as the wiki does not help when the disk fails. Test a restore at least once by bringing the stack up on a spare directory and checking that pages load.
Which one should you pick?
If your notes are docs with a clear order, BookStack gets you writing faster and keeps the structure tidy as the collection grows. If your notes are a mix of pages, diagrams, and scripts, or you want Git history and an API, Wiki.js fits better. Either way, the install bookstack docker vps path and the Wiki.js path both take under an hour, and both run happily on a small VPS for years. Start with one, import a few real pages, and use it for a week before you move your whole notes collection in.
Once the wiki is live, the habit matters more than the tool. Write the fix down the next time you solve a server problem, and link new pages to the ones they belong with. Six months from now, that habit is the real payoff.