WARNING This site is for the unreleased, still under development 3.0 version of Wiki.js. Go to the current 2.5 version instead.

Docker

ALPHA RELEASE
During the alpha release period, docker images are tagged as 3.0.0-alpha and 3.0.0-alpha.X where X is the build number and are only available on the ghcr.io registry.

Using the Docker Image

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.

# 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 always built these architectures:

  • linux/amd64 (Intel / AMD cpus)
  • linux/arm64 (Apple silicon, recent 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_SSLWhether 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_ENABLEWhether 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 on3443
HTTPS_PROVIDERProvider to use to provision the SSL certificate.letsencrypt
LOG_FORMATLogging format
Accepted values: default, json
default
LOG_LEVELSeverity level for logging
Accepted values: debug, info, warn, error
info
PORTHTTP Port to listen on3000

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.

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.