# Self-hosted LiveSync — Environment Variables
# Copy this file to .env and fill in your values.
# NEVER commit .env to version control.

# =============================================================================
# REQUIRED — CouchDB credentials
# =============================================================================

# Admin username for CouchDB
COUCHDB_USER=admin

# Admin password — use a strong random password (min 16 chars recommended)
COUCHDB_PASSWORD=change_me_use_a_strong_password

# Name of the database the Obsidian plugin will use
COUCHDB_DATABASE=obsidiannotes

# Host port CouchDB is exposed on (default: 5984)
# For tunnel-only deployments you can set this to 127.0.0.1:5984 to block external access
COUCHDB_PORT=5984

# =============================================================================
# PROFILE: caddy  (--profile caddy)
# =============================================================================

# Your public domain pointing to this server (A record)
# Example: couchdb.yourdomain.com
COUCHDB_DOMAIN=couchdb.yourdomain.com

# Email for Let's Encrypt TLS certificate notifications
ACME_EMAIL=you@yourdomain.com

# =============================================================================
# PROFILE: tailscale  (--profile tailscale)
# =============================================================================

# Tailscale OAuth key (not a regular auth key — must be OAuth for persistent use)
# Generate at: https://login.tailscale.com/admin/settings/oauth
# Scopes needed: devices:write
TS_AUTHKEY=tskey-auth-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Hostname this node will have on your tailnet (becomes <hostname>.<tailnet>.ts.net)
TS_HOSTNAME=livesync

# =============================================================================
# PROFILE: cloudflare  (--profile cloudflare)
# =============================================================================

# Tunnel token from Cloudflare Zero Trust dashboard
# Create at: https://one.dash.cloudflare.com/ → Networks → Tunnels → Create tunnel
# Copy the token from the "Install connector" step
CF_TUNNEL_TOKEN=eyJhIjoixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
