← All templates · Notes and wikis
Deploy Wiki.js in one click
A wiki for a team or a project: pages in Markdown or a visual editor, search, permissions and sign-in providers
A self-hosted alternative to Confluence and GitBook.
What is Wiki.js?
Wiki.js is an open-source wiki for team and project documentation, the kind people run in place of Confluence. Developers write pages in Markdown with a live preview, while others use the visual editor and never see syntax. Every change is tracked: two versions of a page can be compared, an older one restored, and even a deleted page brought back. Groups and page rules decide who may read or edit which paths.
Teams self-host Wiki.js to keep their docs on their own server, with no price per user. Its standout trait is Git sync: each page can be written to a Git repository as a file, and edits made there come back into the wiki. The catch: development has moved to Wiki.js 3.0, still a beta its README marks not for production, so the stable 2.5 line gets maintenance releases.
Hosting Wiki.js on Pethost
- You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
- New project opens at Wiki.js. You fill in what it asks for and click Create project: Email, Admin password.
- In a minute or two Wiki.js is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
- It is a project like any other: you or your agent can change it, roll it back or restore it.
Questions about Wiki.js
Is Wiki.js free and open source?
Yes. Wiki.js is free software under the AGPL-3.0 licence, with its full source on GitHub. Its development is paid for by donations from community backers.
Does Wiki.js support LDAP and SSO?
Yes. Wiki.js signs people in with LDAP or Active Directory, SAML 2.0, OpenID Connect, Okta, Azure AD, Keycloak, Google, GitHub and more, several at once, and an admin can make two-factor authentication mandatory for everyone.
Which databases does Wiki.js support?
PostgreSQL is the one its docs recommend, and the only one the next major version will support. Wiki.js 2.5 also runs on MySQL, MariaDB, MS SQL Server and SQLite, though SQLite is not recommended for production.
Can a Wiki.js wiki be private?
Yes. Visitors without an account see only what the Guests group allows, so a wiki can be public, private or a mix, and new users get no access until an admin or self-registration puts them in a group.
Does Wiki.js have an API?
Yes. Wiki.js has a GraphQL API at /graphql that can read and change everything in the wiki, called with tokens made under API Access in the Administration Area.
How much memory and disk does Wiki.js need?
Wiki.js is light: about 300 MB with Postgres, and thousands of pages with their uploads take a few gigabytes. On Pethost the Starter plan is enough for it, with room for other apps beside it.
Wiki.js Docker Compose file
The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.
Containers: wiki (ghcr.io/requarks/wiki:2.5.315), postgres (postgres:17-alpine).
Volumes, in the nightly backup: content, db.
services:
wiki:
image: ghcr.io/requarks/wiki:2.5.315
restart: unless-stopped
environment:
DB_TYPE: postgres
DB_HOST: postgres
DB_PORT: "5432"
DB_USER: wiki
DB_PASS: ${POSTGRES_PASSWORD}
DB_NAME: wiki
SITE_URL: ${URL}
ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
# Wiki.js opens its setup page to whoever comes first. On the first start it runs once on
# port 3001, which nobody reaches, is set up there with the email and password given, and only
# then starts on 3000.
entrypoint: ["/bin/sh", "-c"]
command:
- |
installed=$$(node -e "
const { Client } = require('pg');
const db = new Client({ host: 'postgres', user: process.env.DB_USER, password: process.env.DB_PASS, database: process.env.DB_NAME });
db.connect().then(() => db.query('select count(*) from settings')).then((r) => console.log(r.rows[0].count > 0 ? 'yes' : 'no'), () => console.log('no')).then(() => process.exit(0));
")
if [ "$$installed" = no ]; then
sed 's/^port: 3000/port: 3001/' config.yml > /tmp/setup.yml
CONFIG_FILE=/tmp/setup.yml node server &
setup=$$!
node -e "
const body = JSON.stringify({ adminEmail: process.env.ADMIN_EMAIL, adminPassword: process.env.ADMIN_PASSWORD, adminPasswordConfirm: process.env.ADMIN_PASSWORD, siteUrl: process.env.SITE_URL, telemetry: false });
(async () => {
for (let i = 0; i < 180; i++) {
try {
const answer = await fetch('http://127.0.0.1:3001/finalize', { method: 'POST', headers: { 'content-type': 'application/json' }, body });
console.log('setup:', await answer.text());
return;
} catch { await new Promise((done) => setTimeout(done, 1000)); }
}
})();
"
sleep 3
kill $$setup
wait $$setup
fi
exec node server
volumes:
- content:/wiki/data/content
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: wiki
POSTGRES_USER: wiki
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U wiki -d wiki"]
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
volumes:
content:
db:
More in Notes and wikis
- MemosShort Markdown notes on a private timeline
- HedgeDocMarkdown notes you write together in real time
- Obsidian LiveSyncA CouchDB server that syncs your Obsidian vaults with Self-hosted LiveSync
- BookStackA wiki organised as shelves, books, chapters and pages
- DocmostA collaborative wiki and docs, with spaces, real-time editing and diagrams
- EtherpadDocuments edited together in real time: each author in their own colour, with chat, history and plugins