Wiki.js
lastmod 2024-11-20created 2024-11-202 edits
A modern and powerful wiki app built on Node.js
How to set up a self-hosted wiki for your startup
Commercial wiki tools such as Confluence and Notion are feature-rich, but costs rise sharply as the number of users grows. Most commercial wikis charge about $5 per user per month, so costs grow significantly for large teams. With a self-hosted solution, costs are fixed regardless of headcount, which saves money. Based on over 3 years of experience running a self-hosted wiki, Wiki.js is recommended
Why choose Wiki.js:
- Wiki.js can be installed simply with Docker Compose, and the default setup runs stably on just 4GB RAM, 2 vCPU
- To enhance search, you can add Elasticsearch, which requires at least 8GB RAM, 2 vCPU
- In real production use, it runs stably even with over 1,000 pages and over 400 users
Cost comparison:
- Estimated cost of running Wiki.js on AWS EC2:
- t4g.medium instance: 2 vCPU, 4GB RAM, \(16/month (\)10 reserved)
- t4g.large instance: 2 vCPU, 8GB RAM, \(33/month (\)21 reserved)
For stable operation in production, the following setup is recommended:
- Set up a custom domain such as wiki.yourcompany.com
- Distribute traffic through DNS settings and a load balancer
- Set up Google SSO (reference link)
- Restrict self-registration to the company domain (e.g., yourcompany.com)
- Set up hourly AMI backups of the EC2 instance
Dockerfile
services:
db:
image: postgres:16.4
expose:
- 5432
ports:
- 5432:5432
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: wiki
POSTGRES_PASSWORD: pass # Change this to a strong password
POSTGRES_USER: root
wiki:
image: requarks/wiki:2.5
depends_on:
- db
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: root
DB_PASS: pass # Change this to a strong password
DB_NAME: wiki
restart: unless-stopped
ports:
- "80:3000"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.23
container_name: elasticsearch
restart: unless-stopped
ports:
- 127.0.0.1:9200:9200
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
- xpack.license.self_generated.type=basic
volumes:
db-data:
See also
Favorite site
Pages that link here