Files
obsidian-livesync/README.md
striker 5b4628049e Initial Obsidian LiveSync (CouchDB) deployment
- couchdb:3, bridge, 127.0.0.1:5984, journald
- couchdb-config/local.ini с CORS для Obsidian (app://obsidian.md)
- max_http_request_size 4 ГБ для больших vault-ов
- .env и data/ исключены из git
2026-05-08 04:50:18 +03:00

41 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Obsidian LiveSync — str-u-01
Self-hosted CouchDB для плагина Obsidian LiveSync (`vrtmrz/obsidian-livesync`).
## Стек
- **Image**: `couchdb:3`
- **Network**: bridge, биндинг `127.0.0.1:5984`
- **Публичный доступ**: nginx reverse-proxy на `obs.striker.su` с LE-сертификатом
- **Volume**: `./data:/opt/couchdb/data` (БД, в git не попадает)
- **Config**: `couchdb-config/local.ini` (CORS для Obsidian, max_http_request_size 4 ГБ)
## Деплой
```bash
ssh striker@str-u-01.striker.su
cd /opt/docker/sites/obsidian-livesync
git pull
docker compose pull
docker compose up -d
```
## Первый запуск
1. Скопировать `.env.example``.env`, прописать сильный пароль для `COUCHDB_PASSWORD`
2. `docker compose up -d`
3. Создать системные БД CouchDB (нужно один раз):
```bash
for db in _users _replicator _global_changes; do
curl -X PUT -u "$COUCHDB_USER:$COUCHDB_PASSWORD" http://127.0.0.1:5984/$db
done
```
4. В Obsidian → Settings → Community plugins → Self-hosted LiveSync:
- URI: `https://obs.striker.su`
- Username/Password: те же что в `.env`
- Database name: любое имя (по vault-у)
## Доступ
- API: https://obs.striker.su (CouchDB REST)
- Fauxton UI: https://obs.striker.su/_utils/
- Локально на сервере: http://127.0.0.1:5984