Important
Before going any further, make sure you meet all the requirements.
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.
Warning
Note that Wiki.js 3.x is in beta and images are currently tagged as
3.0.0-beta. The tags below won't work until the beta phase has started.
# -----------------------------
# BETA VERSION
# -----------------------------
ghcr.io/requarks/wiki:3.0.0-beta
# or using a specific version:
ghcr.io/requarks/wiki:3.0.0-beta.550
# -----------------------------
# NOT YET WORKING (read above)
# -----------------------------
#ghcr.io/requarks/wiki:3
# or using a specific version:
#ghcr.io/requarks/wiki:3.0
#ghcr.io/requarks/wiki:3.0.1
Caution
DO NOT use the
latesttag as it may break your installation when a new major version with breaking changes is released!
All images are built for these architectures:
✅ = Required, ✴️ = Recommended
| Env | Description | Required | Default Value |
|---|---|---|---|
ADMIN_EMAIL |
Email address to use to create the root administrator account. Has no effect if the root administrator account is already created. |
✴️ | [email protected] |
ADMIN_PASS |
Initial password to use to create the root administrator account. Has no effect if the root administrator account is already created. |
✴️ | 12345678 |
CONFIG_FILE |
Path to the config file | ./config.yml |
|
DATABASE_URL |
Database Connection String (overrides all DB_ prefixed env vars if set) |
||
DB_HOST |
Database Hostname / IP Address | ✅ | |
DB_NAME |
Database Name | ✅ | |
DB_USER |
Database Username | ✅ | |
DB_PASS |
Database Password | ✅ | |
DB_PASS_FILE |
Path to the mapped file containing the database password. (overrides DB_PASS if set) |
||
DB_PORT |
Database Port | 5432 |
|
DB_SCHEMA |
Database Schema | wiki |
|
DB_SSL |
Whether to use SSL to connect to the database. Accepted values: 0, 1, true, false |
false |
|
DB_SSL_CA |
Database CA certificate content, as a single line string (without spaces or new lines), without the prefix and suffix lines. | ||
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 |
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 "[email protected]" -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.0.0-beta
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.
Here's a full example of a Docker Compose file for Wiki.js listening on port 80: (replace the values of ADMIN_EMAIL and ADMIN_PASS with your own):
services:
db:
image: postgres:18
environment:
POSTGRES_DB: wiki
POSTGRES_PASSWORD: wikijsrocks
POSTGRES_USER: wikijs
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql
wiki:
image: ghcr.io/requarks/wiki:3.0.0-beta
depends_on:
- db
environment:
ADMIN_EMAIL: [email protected]
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.
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.
This guide provides an easy, no docker knowledge required, step-by-step instructions to install Wiki.js on a fresh Ubuntu server using containers.
sudo apt -qqy update
sudo apt -qqy upgrade
# Add Docker's official GPG key:
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw --force enable
~/wiki, replace in the commands below if different).cd ~/wiki
openssl rand -base64 32 > .db-secret
compose.yaml (under the same folder) with the following contents:
Important
Replace
[email protected]andSuperSecret123in the code below with your email address and a temporary password that you'll change on first login.
services:
db:
image: postgres:18
environment:
POSTGRES_DB: wiki
POSTGRES_USER: wiki
POSTGRES_PASSWORD_FILE: /etc/wiki/.db-secret
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql
- ./.db-secret:/etc/wiki/.db-secret:ro
wiki:
image: ghcr.io/requarks/wiki:3.0.0-beta
depends_on:
- db
environment:
ADMIN_EMAIL: [email protected]
ADMIN_PASS: SuperSecret123
DB_HOST: db
DB_NAME: wiki
DB_USER: wiki
DB_PASS_FILE: /etc/wiki/.db-secret
restart: unless-stopped
volumes:
- ./.db-secret:/etc/wiki/.db-secret:ro
ports:
- "80:3000"
volumes:
db-data:
sudo docker compose up -d
On your browser, navigate to your server IP / domain name (e.g. http://your-server-ip/).
Note
It can take a few minutes for the containers to download and initialize. Wait a few minutes and try again if the site doesn't load.
By default, your wiki is accessible over unencrypted HTTP. This section adds automatic HTTPS using Caddy, a web server that obtains and renews free SSL certificates from Let's Encrypt for you.
Important
You need a domain name (e.g.
wiki.example.com) with a DNS A record pointing to your server's public IP address.
Verify that your domain resolves to your server. From your local machine, run:
ping wiki.example.com
The IP shown must match your server's public IP. If it doesn't, wait a few minutes for DNS changes to propagate and try again. The ping doesn't need to succeed (it might not) but it should show the correct IP.
Create a new file named Caddyfile (under the same folder as compose.yaml) with the following contents:
Important
Replace
wiki.example.comwith your domain name and[email protected]with your email address. Let's Encrypt uses this address to notify you of any certificate issues.
Do NOT modify anything on thereverse_proxyline (line 6).
{
email user@example.com
}
wiki.example.com {
reverse_proxy wiki:3000
}
Edit your compose.yaml file to match the following:
Warning
Note that the
portssection was removed from thewikiservice. Caddy now handles all incoming traffic, so the wiki container must no longer claim port 80 for itself.
services:
db:
image: postgres:18
environment:
POSTGRES_DB: wiki
POSTGRES_USER: wiki
POSTGRES_PASSWORD_FILE: /etc/wiki/.db-secret
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql
- ./.db-secret:/etc/wiki/.db-secret:ro
wiki:
image: ghcr.io/requarks/wiki:3.0.0-beta
depends_on:
- db
environment:
ADMIN_EMAIL: [email protected]
ADMIN_PASS: SuperSecret123
DB_HOST: db
DB_NAME: wiki
DB_USER: wiki
DB_PASS_FILE: /etc/wiki/.db-secret
restart: unless-stopped
volumes:
- ./.db-secret:/etc/wiki/.db-secret:ro
caddy:
image: caddy:2
depends_on:
- wiki
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data
- caddy-config:/config
volumes:
db-data:
caddy-data:
caddy-config:
Apply the changes:
cd ~/wiki
sudo docker compose up -d
Your wiki is now available at https://wiki.example.com/. Visitors using http:// are redirected to https:// automatically.
Tip
Certificates renew automatically in the background, roughly a month before they expire. There is nothing to schedule or maintain.
If the site doesn't load over HTTPS, check what Caddy is doing:
sudo docker compose logs caddy
Common causes:
ping check from step 1.sudo ufw status) and that your hosting provider isn't blocking it.Tip
It's highly recommended to use containers, even if you're not familiar with Docker. See the Guided Ubuntu Install section for an easy, no docker knowledge required, guide to install Wiki.js on a Ubuntu machine.
Coming soon | Not available during beta phase
Coming soon | Not available during beta phase
Status
This image is officially maintained by the Wiki.js team.
See the Wiki.js page on PikaPods
Status
- Only the 2.x image available at the moment.
- This image is maintained by PikaPods.