Install using Docker

Docker is the recommended way to run Wiki.js.

This site is for the unstable beta release of Wiki.js 3.0. You should NOT install this in production. View the latest stable release instead.

Using the Docker Image

Wiki.js requires a PostgreSQL database. See the Docker Compose section below for an example with a database.

A Wiki.js docker image is available on the following registries:

  • GitHub Packages: ghcr.io/requarks/wiki
  • Docker Hub: requarks/wiki

Tags

Images are tagged to major, major.minor and major.minor.patch versions.

It's recommended to use the major version, unless you have a specific requirement to pin your deployment to specific version.

Alpha Phase Warning

Note that Wiki.js 3.x is in alpha and images are currently tagged as `3.0.0-alpha`. The tags below won't work until the beta phase has started.

# recommended
ghcr.io/requarks/wiki:3

# using a specific version:
ghcr.io/requarks/wiki:3.0
ghcr.io/requarks/wiki:3.0.1
Warning

While the "latest" tag is available, it's NOT RECOMMENDED to use it as it can break your deployment if the next major version has breaking changes.

All images are built for these architectures:

  • linux/amd64 (Intel / AMD CPUs)
  • linux/arm64 (Apple silicon, Gravitron, Raspberry Pi, etc.)

Environment Variables

✅ = Required
✴️ = Recommended

EnvDescriptionRequiredDefault
ADMIN_EMAILEmail address to use to create the root administrator account. 
Has no effect if the root administrator account is already created.
✴️admin@example.com
ADMIN_PASSInitial password to use to create the root administrator account.
Has no effect if the root administrator account is already created.
✴️12345678
CONFIG_FILEPath to the config file./config.yml
DATABASE_URLDatabase Connection String (overrides all DB_ prefixed env vars if set)
DB_HOSTDatabase Hostname / IP Address
DB_NAMEDatabase Name
DB_PASSDatabase Password
DB_PASS_FILEPath to the mapped file containing the database password. (overrides DB_PASS if set)
DB_PORTDatabase Port5432
DB_SCHEMADatabase Schemawiki
DB_SSL
Whether to use SSL to connect to the database.
Accepted values: 0, 1, true, false
false
DB_SSL_CADatabase CA certificate content, as a single line string (without spaces or new lines), without the prefix and suffix lines.
DB_USERDatabase Username
HTTPS_ENABLE
Whether to enable the HTTPS server.
Accepted values: 0, 1, true, false
false
HTTPS_LE_DOMAINLet's Encrypt - Initial domain to provision.‍
HTTPS_LE_EMAILLet's Encrypt - Email address to use when provisioning certificates.‍
HTTPS_PORTHTTPS Port to listen on‍3443
HTTPS_PROVIDER
Provider to use to provision the SSL certificate.
Accepted values: letsencrypt, custom
letsencrypt
LOG_FORMAT
Logging format
Accepted values: default, json
default
LOG_LEVEL
Severity level for logging
Accepted values: debug, info, warn, error
info
PORT
HTTP Port to listen on
3000

Example

Assuming you have a PostgreSQL container named db on the same network (replace the values with your own!):

docker run -d -p 8080:3000 --name wiki --restart unless-stopped -e "ADMIN_EMAIL=user@example.com" -e "ADMIN_PASS=SuperSecret123" -e "DB_HOST=db" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" ghcr.io/requarks/wiki:3

Once the container is started, browse to http://YOUR-IP-ADDRESS:8080 and login using the admin email and password you provided in the command above.

User Mode

By default, the Wiki.js docker image runs as the user wiki. Some deployments require the container to run as root. Simply add the -u root parameter when creating the container to do so.

This is however not a secure way to run containers. Make sure you understand the security implications before doing so.

Upgrading

Upgrading is simply a matter of recreating the container with the latest image version:

# Stop and remove container named "wiki"
docker stop wiki
docker rm wiki

# Pull latest image of Wiki.js
docker pull ghcr.io/requarks/wiki:3

# Create new container of Wiki.js based on latest image
docker run -d -p 8080:3000 --name wiki --restart unless-stopped -e "DB_HOST=db" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" ghcr.io/requarks/wiki:3

Using Docker Compose

Here's a full example of a Docker Compose file for Wiki.js, using PostgreSQL, listening on port 80 (replace the values of ADMIN_EMAIL and ADMIN_PASS with your own!):

version: "3"
services:

  db:
    image: postgres:16
    environment:
      POSTGRES_DB: wiki
      POSTGRES_PASSWORD: wikijsrocks
      POSTGRES_USER: wikijs
    logging:
      driver: "none"
    restart: unless-stopped
    volumes:
      - db-data:/var/lib/postgresql/data

  wiki:
    image: ghcr.io/requarks/wiki:3
    depends_on:
      - db
    environment:
      ADMIN_EMAIL: user@example.com
      ADMIN_PASS: SuperSecret123
      DB_HOST: db
      DB_USER: wikijs
      DB_PASS: wikijsrocks
      DB_NAME: wiki
    restart: unless-stopped
    ports:
      - "80:3000"

volumes:
  db-data:

DB_HOST should match the service name (in this case, db). If container_name is specified for the service, its value should be used instead.

See the reference above for all available environment variables.

Once both containers are started, browse to http://YOUR-IP-ADDRESS and login using the admin email and password you provided above.

Upgrading

The following commands will pull the latest image and recreate the containers defined in the docker-compose file:

docker compose pull wiki
docker compose up --force-recreate -d