docs: clarify host path mapping and volume configuration
This commit is contained in:
@@ -2,11 +2,6 @@
|
||||
|
||||
A headless Docker container that uses `obsidian-headless` to keep a local vault directory synchronized with Obsidian Sync.
|
||||
|
||||
## Architecture
|
||||
- **Base Image:** Node.js 20 Slim
|
||||
- **Sync Engine:** `obsidian-headless` (Official CLI)
|
||||
- **Mode:** Continuous Sync (Watches for changes and pushes/pulls in real-time)
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. **Clone the repo:**
|
||||
@@ -15,30 +10,31 @@ A headless Docker container that uses `obsidian-headless` to keep a local vault
|
||||
cd obsidian-sync-server
|
||||
```
|
||||
|
||||
2. **Configure Environment:**
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# Edit .env with your vault name, E2EE password, and device name
|
||||
nano .env
|
||||
```
|
||||
2. **Configure the Host Path:**
|
||||
- Copy the example env: `cp .env.example .env`
|
||||
- Open `.env` and set `VAULT_HOST_PATH` to the **absolute path** of the folder on your computer where you want the notes to live.
|
||||
- *Correct:* `/home/user/documents/my-vault`
|
||||
- *Incorrect:* `./vault` (relative paths can be unpredictable in docker-compose)
|
||||
|
||||
3. **Launch:**
|
||||
3. **Set Sync Credentials:**
|
||||
- Fill in `OBSIDIAN_VAULT_NAME` and `OBSIDIAN_SYNC_PASSWORD` (your E2EE key).
|
||||
|
||||
4. **Launch:**
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
4. **First-Time Login:**
|
||||
The `obsidian-headless` tool requires an initial login to your Obsidian account.
|
||||
5. **First-Time Login:**
|
||||
Because Obsidian Sync requires a secure login, you must authenticate the container once:
|
||||
```bash
|
||||
docker exec -it obsidian-sync-server ob login
|
||||
```
|
||||
Follow the on-screen instructions to authenticate. Once logged in, the container will automatically proceed to `sync-setup` and `sync --continuous`.
|
||||
Follow the instructions to log in. The session will be saved in the `./config` folder, so you won't have to do this again.
|
||||
|
||||
## Interaction
|
||||
Since this is a headless server, you interact with your vault by:
|
||||
- **Filesystem:** Accessing the `./vault` folder on your host machine.
|
||||
- **Local Obsidian:** Opening the `./vault` folder in your local Obsidian app.
|
||||
- **CLI:** Running commands via `docker exec obsidian-sync-server ob <command>`.
|
||||
## How it Works
|
||||
The container runs a continuous sync loop.
|
||||
- **Cloud $\rightarrow$ Host:** Changes in Obsidian Sync are immediately downloaded to your `VAULT_HOST_PATH`.
|
||||
- **Host $\rightarrow$ Cloud:** Any changes you make to the files in `VAULT_HOST_PATH` (via a local Obsidian app or text editor) are immediately pushed to the cloud.
|
||||
|
||||
## Environment Variables
|
||||
| Variable | Description |
|
||||
@@ -46,4 +42,4 @@ Since this is a headless server, you interact with your vault by:
|
||||
| `OBSIDIAN_VAULT_NAME` | The name of the remote vault you want to sync |
|
||||
| `OBSIDIAN_SYNC_PASSWORD` | Your end-to-end encryption password |
|
||||
| `OBSIDIAN_DEVICE_NAME` | The name this device will have in your Sync history |
|
||||
| `OBSIDIAN_SYNC_TOKEN` | (Optional) A session token to bypass interactive login |
|
||||
| `VAULT_HOST_PATH` | **Absolute path** to the vault folder on your host machine |
|
||||
|
||||
Reference in New Issue
Block a user