179 lines
4.4 KiB
Markdown
179 lines
4.4 KiB
Markdown
# Self-Hosted Obsidian Alternative: Wiki.js
|
|
|
|
This guide sets up **Wiki.js** as your always-on documentation vault that syncs with your existing workflow.
|
|
|
|
## What is Wiki.js?
|
|
|
|
- **Web-based** Obsidian alternative (always accessible)
|
|
- **Markdown native** (same format as Obsidian)
|
|
- **Git sync** (integrates with your Gitea!)
|
|
- **Self-hosted** in Docker via Portainer
|
|
- **FREE** and open source
|
|
|
|
## Why Wiki.js over other options?
|
|
|
|
| Feature | Wiki.js | Obsidian Publish | Other Wikis |
|
|
|---------|---------|------------------|-------------|
|
|
| Self-hosted | ✅ Yes | ❌ No | Varies |
|
|
| Markdown | ✅ Native | ✅ Yes | ⚠️ Partial |
|
|
| Git sync | ✅ Yes | ❌ No | ❌ Rare |
|
|
| Web editing | ✅ Yes | ✅ Yes | ✅ Yes |
|
|
| Free | ✅ Yes | ❌ $8/mo | Varies |
|
|
| Gitea integration | ✅ Yes | ❌ No | ❌ No |
|
|
|
|
## Prerequisites
|
|
|
|
- Docker VM with Portainer running
|
|
- At least 2GB RAM available
|
|
- (Optional) Gitea repository for sync
|
|
|
|
---
|
|
|
|
## Setup Instructions
|
|
|
|
### Step 1: Create the Stack in Portainer
|
|
|
|
1. **Open Portainer** (http://your-docker-vm:9000)
|
|
2. Go to **Stacks** → **Add stack**
|
|
3. **Name:** `wikijs-vault`
|
|
4. **Build method:** Web editor
|
|
5. **Copy-paste the YAML below:**
|
|
|
|
```yaml
|
|
version: '3.8'
|
|
|
|
services:
|
|
wikidb:
|
|
image: postgres:15-alpine
|
|
container_name: wikijs-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: wiki
|
|
POSTGRES_PASSWORD: wikijsrocks
|
|
POSTGRES_USER: wikijs
|
|
volumes:
|
|
- wikijs-db-data:/var/lib/postgresql/data
|
|
networks:
|
|
- wikijs-network
|
|
|
|
wiki:
|
|
image: ghcr.io/requarks/wiki:2
|
|
container_name: wikijs
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- wikidb
|
|
environment:
|
|
DB_TYPE: postgres
|
|
DB_HOST: wikidb
|
|
DB_PORT: 5432
|
|
DB_USER: wikijs
|
|
DB_PASS: wikijsrocks
|
|
DB_NAME: wiki
|
|
ports:
|
|
- "3001:3000"
|
|
volumes:
|
|
- wikijs-data:/wiki/data
|
|
networks:
|
|
- wikijs-network
|
|
|
|
networks:
|
|
wikijs-network:
|
|
|
|
volumes:
|
|
wikijs-db-data:
|
|
wikijs-data:
|
|
```
|
|
|
|
6. **Click "Deploy the stack"**
|
|
|
|
### Step 2: Initial Setup (2 minutes)
|
|
|
|
1. **Wait 30 seconds** for containers to start
|
|
2. **Open Wiki.js:** http://your-docker-vm-ip:3001
|
|
3. **Create admin account**
|
|
4. **Choose "Local" authentication** (or LDAP if you have it)
|
|
|
|
### Step 3: Configure Git Sync (Connect to Gitea)
|
|
|
|
This syncs your wiki with a Git repository (bidirectional!)
|
|
|
|
1. **In Wiki.js:** Administration → Git → Enable
|
|
2. **Set these values:**
|
|
- **Git URL:** `http://192.168.5.30:3000/impulsivefps/lemontropia-wiki.git`
|
|
- **Branch:** `main`
|
|
- **Username:** `impulsivefps`
|
|
- **Password/Token:** Your Gitea token
|
|
- **Sync Direction:** Bidirectional
|
|
3. **Click "Apply"**
|
|
|
|
### Step 4: Create Gitea Repository
|
|
|
|
1. **Open Gitea** (http://192.168.5.30:3000)
|
|
2. **New Repository:**
|
|
- Name: `lemontropia-wiki`
|
|
- Description: "Lemontropia Suite Documentation"
|
|
- Private: Yes
|
|
3. **Generate token** in Gitea settings for Wiki.js
|
|
|
|
---
|
|
|
|
## Using Your Wiki
|
|
|
|
### From Browser (Anywhere)
|
|
- **URL:** http://your-docker-vm:3001
|
|
- **Edit** directly in web interface
|
|
- **Markdown** support with live preview
|
|
- **Search** across all content
|
|
|
|
### From Obsidian Desktop
|
|
1. **Clone the repo:** `git clone http://192.168.5.30:3000/impulsivefps/lemontropia-wiki.git`
|
|
2. **Open folder** as vault in Obsidian
|
|
3. **Edit normally**
|
|
4. **Sync:** Git commit → Auto-syncs to Wiki.js!
|
|
|
|
### Best of Both Worlds
|
|
- **Quick edits** → Use web interface (always available)
|
|
- **Heavy writing** → Use Obsidian desktop + git
|
|
- **Mobile access** → Web interface works on phone/tablet
|
|
- **Offline work** → Obsidian desktop works offline, sync later
|
|
|
|
---
|
|
|
|
## Integration with Lemontropia Suite
|
|
|
|
Your app can now:
|
|
1. **Write** to Obsidian vault locally
|
|
2. **Git commit/push** → Syncs to Gitea
|
|
3. **Wiki.js pulls** → Documentation live on web
|
|
4. **Access anywhere** → http://docker-vm:3001
|
|
|
|
---
|
|
|
|
## Backup Strategy
|
|
|
|
Wiki.js data is stored in:
|
|
- **Docker volumes** (auto-backed up with VM)
|
|
- **Git repository** (in Gitea, already backed up)
|
|
|
|
Your docs are safe! 🎉
|
|
|
|
---
|
|
|
|
## Troubleshooting
|
|
|
|
### Can't access on port 3001?
|
|
Check firewall: `sudo ufw allow 3001/tcp`
|
|
|
|
### Git sync not working?
|
|
- Verify Gitea token has "repo" permissions
|
|
- Check URL format (http vs https)
|
|
- Review Wiki.js logs in Portainer
|
|
|
|
### Obsidian sync conflicts?
|
|
- Always pull before editing in Obsidian
|
|
- Use "Sync" button in Wiki.js before web edits
|
|
|
|
---
|
|
|
|
**Questions? The Lemontropia Suite docs will live here!** 🍋📚
|