Added updated seafile stack config and files

This commit is contained in:
Rishi Ghan
2025-12-30 00:19:22 -05:00
parent a4892011d1
commit aec2f32707
9 changed files with 467 additions and 55 deletions

View File

@@ -1,31 +1,46 @@
# Seafile Stack
# Seafile Pro Stack
Seafile 13 Pro with SeaDoc, SeaSearch, Notification Server, and Metadata Server.
Seafile Pro 13.0.6 with SeaDoc, SeaSearch, Notification Server, and Metadata Server.
## Services
## Important Notes
| Service | Port | Description |
|---------|------|-------------|
| seafile | 8098:80 | Main Seafile server |
| seadoc | 8888:80 | Document collaboration |
| notification-server | 8083:8083 | Real-time notifications |
| seafile-md-server | 8084:8084 | Metadata server |
| seasearch | 4080:4080 | Full-text search |
| seafile-mysql | - | MariaDB database |
| seafile-redis | - | Redis cache |
This stack uses Seafile's official multi-file compose setup. It cannot be deployed via Portainer's git-based stack deployment due to the `COMPOSE_FILE` variable combining multiple yml files.
## Configuration Files
**Deployment method:** Run from command line with `docker compose up -d`
Copy these to `/mnt/user/appdata/seafile/` before deploying:
## Files
- `seahub_settings.py` - Seahub configuration
- `seafile.conf` - Seafile server configuration
- `.env` - All configuration variables
- `seafile-server.yml` - Main Seafile + MariaDB + Redis
- `seadoc.yml` - SeaDoc server
- `seasearch.yml` - SeaSearch server
- `notification-server.yml` - Notification server
- `md-server.yml` - Metadata server
- `seahub_settings.py` - Seahub Python config (mounted into container)
## NGINX Proxy Manager Setup
## Deployment
### fileserver.rishighan.com
```bash
cd /mnt/user/appdata/seafile
docker compose up -d
```
Create HTTPS proxy with this Advanced config:
## Volumes
All data stored in `/mnt/user/appdata/seafile/`:
- `data/` - Seafile data and file storage
- `db-data/` - MariaDB database
- `seadoc-data/` - SeaDoc data
- `seasearch-data/` - SeaSearch index
## External Dependencies
- **OnlyOffice** - Running in documents stack at `https://office.rishighan.com`
- **NPM Proxy Hosts:**
- `fileserver.rishighan.com``192.168.1.75:8098`
- `notification.rishighan.com``192.168.1.75:8083`
## NPM Advanced Config for fileserver.rishighan.com
```nginx
location / {
@@ -67,41 +82,22 @@ location /socket.io {
}
```
### notification.rishighan.com
## OnlyOffice JWT
Create separate HTTPS proxy pointing to `192.168.1.75:8083`
The JWT secret must match between `seahub_settings.py` and OnlyOffice's `/etc/onlyoffice/documentserver/local.json`. Check with:
## Migration from VM
1. Stop Seafile on VM:
```bash
ssh rishi@192.168.1.112
cd /opt/seafile && docker compose down
docker exec onlyoffice cat /etc/onlyoffice/documentserver/local.json | grep -A2 '"secret"'
```
2. Create directories:
```bash
mkdir -p /mnt/user/appdata/seafile/{data,db-data,seadoc-data,seasearch-data}
```
## Troubleshooting
3. Copy data:
```bash
rsync -avP rishi@192.168.1.112:~/seafile/data/ /mnt/user/appdata/seafile/data/
rsync -avP rishi@192.168.1.112:~/seafile/db-data/ /mnt/user/appdata/seafile/db-data/
```
### "Commit is missing" errors
The seafile data wasn't fully transferred. Re-rsync with proper permissions from source.
4. Copy config files:
```bash
cp seahub_settings.py /mnt/user/appdata/seafile/
cp seafile.conf /mnt/user/appdata/seafile/
```
### OnlyOffice "document security token" error
JWT secret mismatch. Update `ONLYOFFICE_JWT_SECRET` in `seahub_settings.py` to match OnlyOffice config.
5. Update NPM proxies to point to 192.168.1.75 instead of 192.168.1.112
6. Deploy stack via Portainer
## Notes
- Notifications only work for shared library events between users
- SeaDoc requires the `/sdoc-server/` and `/socket.io` proxy locations
- WebDAV is enabled on port 8080 at `/seafdav`
### Search returns 500 error
Check if SeaSearch is accessible: `docker exec seafile curl -s http://seafile-seasearch:4080`
Check database for missing .ibd files in mysql logs.