# ── Haven Docker Compose ───────────────────────────────── # Quick start: docker compose up -d # Stop: docker compose down # View logs: docker compose logs -f haven # Update: docker compose pull && docker compose up -d --force-recreate # Shell: docker compose exec haven sh # ───────────────────────────────────────────────────────── services: haven: image: ghcr.io/ancsemi/haven:latest # build: . # Uncomment to build from source instead of using the pre-built image container_name: haven ports: - "${PORT:-3000}:${PORT:-3000}" # Main HTTPS port - "${REDIRECT_PORT:-3001}:${REDIRECT_PORT:-3001}" # HTTP → HTTPS redirect # ── Voice relay (Settings → Large Server Setup) ── # Uncomment both lines when you switch the relay on, and use the same # port the setup page shows. It needs UDP and TCP. # - "40000:40000/udp" # - "40000:40000/tcp" volumes: - haven_data:/data # ── Or use a local folder instead (good for NAS / Synology): ── # - ./haven-data:/data environment: - PORT=${PORT:-3000} - HOST=0.0.0.0 # - SERVER_NAME=My Haven # Name shown in the UI # - ADMIN_USERNAME=admin # First account to register becomes admin # - GIPHY_API_KEY= # Optional: enable GIF search (GIPHY) # - KLIPY_API_KEY= # Optional: enable GIF search (KLIPY) # - PREFERRED_GIF_SEARCH= # Optional: klipy, giphy, or tenor # - VAPID_EMAIL=mailto:you@example # Optional: email for push notifications # - TURN_URL=turn:your-server:3478 # Optional: TURN relay for voice over internet # - TURN_SECRET=your-secret # Shared secret (coturn --use-auth-secret) # - OIDC_CLIENT_SECRET=client-secret # The client secret as defined by your OIDC provider. # Full text search tokenizer. Controls how message text is matched. # Takes effect on restart; changing it triggers a one time reindex. # trigram Matches text anywhere inside words, so apple finds apple, # applesauce and pineapple. Most flexible for partial matches. # Largest index (about 3 to 4x the message text) and needs # queries of at least 3 characters. # unicode61 Whole word and prefix matching, so apple finds apple and # apple* but not applesauce. Smallest and fastest, best ranking. # porter Like unicode61 plus English stemming, so run also finds # running and ran. Small index, English focused, no substrings. # Default is unicode61, the closest match to how Discord search behaves. # - HAVEN_SEARCH_TOKENIZER=unicode61 # ── External media storage (optional) ── # When true, attachments, avatars, emoji, stickers, badges and sounds are # kept in an S3-compatible bucket (Garage, MinIO, RustFS, SeaweedFS, AWS) # instead of /data/uploads. The database, certs and .env stay in /data. # Haven refuses to start if the bucket cannot be reached. # - HAVEN_EXTERNAL_STORAGE=true # - HAVEN_S3_ENDPOINT=http://garage:3900 # - HAVEN_S3_BUCKET=haven-media # - HAVEN_S3_REGION=garage # AWS: us-east-1 etc. # - HAVEN_S3_ACCESS_KEY= # - HAVEN_S3_SECRET_KEY= # - HAVEN_S3_PREFIX= # optional key prefix # - HAVEN_S3_FORCE_PATH_STYLE=true # Garage/MinIO/RustFS need this # Keep serving files still in /data/uploads while migrating # (docker compose exec haven node scripts/migrate-uploads-to-s3.js). # - HAVEN_S3_LOCAL_FALLBACK=true # Uncomment to load settings from a .env file: # env_file: .env restart: unless-stopped volumes: haven_data: