Operations 7 min read

How to Install and Deploy Wiki.js Using Docker Compose

This article introduces the open‑source Wiki.js platform, explains its features, and provides a step‑by‑step guide to install it on Linux using Docker Compose, including Docker‑compose installation, configuration files, container management, and optional HTTPS setup with Caddy.

IT Services Circle
IT Services Circle
IT Services Circle
How to Install and Deploy Wiki.js Using Docker Compose

Wiki.js is a lightweight, feature‑rich open‑source wiki system built with Node.js, PostgreSQL, Vue.js and Docker. It offers Markdown editing, comments, image uploads, tags, global search, collaborative editing, version history, user management and Google Analytics, and it supports full Chinese localization.

1. Introduction

The author compares a personal blog to a diary and a wiki to a notebook, emphasizing that a wiki helps organize knowledge points with clear categories and links, eventually forming an encyclopedia‑like knowledge base.

2. Installation

The quickest and most portable method is a Docker‑Compose deployment. First, install Docker‑Compose:

curl -L https://get.daocloud.io/docker/compose/releases/download/v2.4.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

After installation, the docker-compose command is available system‑wide.

Next, create a docker-compose.yml file with the following content:

version: "3"
services:
  db:
    container_name: pg
    image: postgres:11-alpine
    environment:
      POSTGRES_DB: wiki
      POSTGRES_PASSWORD: wikijsrocks
      POSTGRES_USER: wikijs
    logging:
      driver: "none"
    restart: unless-stopped
    volumes:
      - db-data:/var/lib/postgresql/data

  wiki:
    container_name: wiki
    image: ghcr.io/requarks/wiki:2
    depends_on:
      - db
    environment:
      DB_TYPE: postgres
      DB_HOST: db
      DB_PORT: 5432
      DB_USER: wikijs
      DB_PASS: wikijsrocks
      DB_NAME: wiki
    restart: unless-stopped
    ports:
      - "8001:3000"

volumes:
  db-data:

Run the composition:

docker-compose up -d – start the containers in detached mode.

docker ps – verify that the pg and wiki containers are running.

docker-compose down – stop and remove the containers.

3. Optional HTTPS with Caddy

To expose the wiki over HTTPS, the author recommends using the Caddy server. The Caddyfile is simple:

example.com {
    reverse_proxy 127.0.0.1:8001
}

Start Caddy with caddy start and visit the configured domain to see the Wiki.js initialization page.

4. Pros and Cons

First load can be slow.

Custom themes are not yet supported.

Chinese search is not native; it requires Elasticsearch or a PostgreSQL plugin for Chinese tokenization.

Some UI strings remain untranslated.

Despite these drawbacks, Wiki.js provides most of the functionality the author expects from a personal wiki and is far easier than building a wiki from scratch.

5. Conclusion

Deploying Wiki.js with Docker Compose and optionally securing it with Caddy gives you a powerful, self‑hosted knowledge network that can grow with your learning and projects.

DockerDeploymentNode.jsPostgreSQLDocker ComposeCaddyWiki.js
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.