This guide uses Docker Compose to run Wiki.js with the official Docker image.
For Docker installation, see Docker.
Wiki.js provides an official Docker image: requarks/wiki
Create docker-compose.yml with Wiki.js and PostgreSQL:
cat <<'YAML' > docker-compose.yml
services:
db:
image: postgres:15
restart: unless-stopped
environment:
POSTGRES_DB: wikijs
POSTGRES_USER: wikijs
POSTGRES_PASSWORD: change-me-to-secure-password
volumes:
- db_data:/var/lib/postgresql/data
wiki:
image: requarks/wiki:2
restart: unless-stopped
depends_on:
- db
ports:
- "8080:3000"
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: wikijs
DB_PASS: change-me-to-secure-password
DB_NAME: wikijs
volumes:
- wiki_data:/var/wiki/data
volumes:
db_data:
wiki_data:
YAML
Important: Replace passwords with strong, unique values before starting.
docker compose up -d
Open http://YOUR-SERVER:8080 and complete the Wiki.js setup wizard.
You’ll need to provide:
For production deployments:
2 tag| Tag | Description |
|---|---|
latest, 2, 2.5 |
Current stable version |
2.4 |
Version 2.4 (ARMv7/ARM64 included) |
canary-* |
Development builds |
Note: Since version 2.4, ARMv7 and ARM64 images are part of the main tags.
| Variable | Description |
|---|---|
DB_TYPE |
Database type (postgres, mysql, mariadb) |
DB_HOST |
Database host |
DB_PORT |
Database port |
DB_USER |
Database user |
DB_PASS |
Database password |
DB_NAME |
Database name |
See Wiki.js Configuration for detailed configuration options.
Running containers in production? We help with:
Need help? office@linux-server-admin.com or Contact Us