# Configuration Likwid is configured through environment variables and database settings. ## Environment Variables ### Backend | Variable | Required | Default | Description | |----------|----------|---------|-------------| | `DATABASE_URL` | Yes | - | PostgreSQL connection string | | `JWT_SECRET` | Yes | - | Secret for signing JWT tokens | | `SERVER_HOST` | No | `127.0.0.1` | Bind address | | `SERVER_PORT` | No | `3000` | HTTP port | | `DEMO_MODE` | No | `false` | Enable demo features | | `RUST_LOG` | No | `info` | Log level (trace, debug, info, warn, error) | ### Frontend | Variable | Required | Default | Description | |----------|----------|---------|-------------| | `API_BASE` | No | `http://localhost:3000` | Backend API URL | | `PUBLIC_API_BASE` | No | Same as API_BASE | Public-facing API URL | | `INTERNAL_API_BASE` | No | - | Server-side API URL (e.g. `http://backend:3000` in container deployments) | ## Instance Settings Managed via the Admin panel or API: ### General - **Instance Name** - Display name for your Likwid instance - **Instance Description** - Brief description - **Registration** - Open, invite-only, or closed - **Email Verification** - Required or optional ### Features - **Community Creation** - Who can create communities - **Public Read Access** - Allow anonymous browsing - **Federation** - Enable cross-instance communication ### Plugins - **Active Voting Methods** - Which methods are available - **Default Voting Method** - Instance-wide default - **Active Integrations** - GitLab, Matrix, etc. ## Community Settings Each community can configure: ```json { "voting_method": "schulze", "delegation_enabled": true, "require_read_before_vote": true, "min_discussion_days": 3, "quorum_percentage": 25, "transparency_level": "full" } ``` ### Voting Method Options - `approval` - Approval voting - `ranked_choice` - Instant runoff - `schulze` - Condorcet method - `star` - Score then automatic runoff - `quadratic` - Voice credit allocation ### Transparency Levels - `full` - All votes visible after closing - `anonymous` - Only totals visible - `private` - Results only, no breakdown ## API Configuration ### Rate Limiting Configure in backend settings: - Requests per minute per IP - Requests per minute per user - Burst allowance ### CORS By default, CORS allows all origins in development. For production: ``` CORS_ALLOWED_ORIGINS=https://likwid.example.org ``` ## Logging ### Log Levels - `trace` - Very detailed debugging - `debug` - Debugging information - `info` - Normal operation - `warn` - Warning conditions - `error` - Error conditions ### Log Format Logs are output in JSON format for easy parsing: ```json {"timestamp":"2026-01-27T12:00:00Z","level":"INFO","message":"Server started","port":3000} ```