Configuration - houyhlouis/LLMOJ GitHub Wiki
Configuration overview and activation
English | įŽäŊ䏿 | Wiki home
This reference is checked against the installer, schemas, examples, consumers, and generators at 43a88bdd62fbf200889b36932fa921439a293190. The original field inventory covers project installation flags, backend/judge YAML, per-user AI settings, environment variables, frontend bootstrap settings, and infrastructure settings generated by the project. This revision also documents database registration settings in Site management. Individual problem/contest/problem-set content fields and every possible third-party directive are outside the server configuration inventory. Open-ended dictionaries are identified with links to their sources.
Where to configure
| Configuration entry | Contents |
|---|---|
| Installation | Installation entry points, every flag, and retries |
| Backend-Configuration | Backend YAML: accounts, security, database, mail, storage, contests, and presentation |
| Registration-Approval | Website registration policy, YAML fallback and delegated review |
| Two-Factor-Sign-In | Per-user authenticator codes and passkeys, recovery, and the two-factor.key file; no YAML setting |
| Judge-Configuration | Judge YAML, CPU/RAM resizing, service units, verification, and rollback |
| AI | Per-user AI models, search, permissions, and jobs |
| AI-Environment | AI directories, sandbox communication, key persistence, and environment |
| Environment | Runtime, installation, and build environment variables; maintenance tool arguments |
| Frontend-Configuration | Local frontend builds and optional CDN/bootstrap settings |
| Operations-Configuration | Nginx, MariaDB, Redis, MinIO, systemd, and post-install changes |
Distinguish four kinds of values
- Runtime defaults are actual fallbacks implemented in code. Backend and judge YAML generally do not fill missing fields from an example.
- Example values come from repository examples or upstream bootstrap demos, which may point to another site.
- Installer-generated values are calculated at first installation from paths, ports, CPUs, and RAM. Existing private configuration is normally retained on retries.
- Effective values come from actual instance files plus systemd units and drop-ins. The database registration policy can override its YAML default; AI settings are additionally stored per user.
Examples use /opt/LLMOJ. For a custom --prefix, substitute the actual instance path everywhere. Changing one environment variable does not relocate an installation.
Applying changes
| Changed setting | Activation |
|---|---|
config/backend.yaml |
Validate the complete YAML and restart libreoj-backend; refresh the browser to reload public preferences; a saved website registration override still takes precedence |
| Registration policy in Site management | An administrator saves or restores the server configuration in the website; effective immediately without restarting or rewriting YAML; see Registration approval |
config/judge.yaml |
Drain work and follow the judge maintenance procedure; slot, CPU, and directory changes also require generating and installing matching systemd units |
| systemd environment/resource limits/drop-ins | Run systemctl daemon-reload, then restart the affected service; reload alone does not restart its process |
config/nginx.conf |
Test with nginx -t, then reload; keep domains and storage signing URLs consistent |
| MariaDB/Redis/MinIO | Restart the corresponding service in a maintenance window and verify backend access and persistence |
| Frontend build settings or static assets | Rebuild/publish to the directory actually served by Nginx and refresh the browser |
| AI model/search settings and permissions | Save through the UI; jobs also recheck permissions while running, as described in the AI guide |
Installer flags describe initial installation. Re-running a completed installation with --judge-slots, --port, or --public-url is not a reconfiguration interface: installation metadata may reject different inputs and generators retain existing YAML. Do not delete installation state, secrets.json, the AI master key, or data to bypass this behavior.
Common changes
For more or fewer CPUs/RAM, use Judge resizing. For names, ports, domains, mail, upload limits, and service memory, see Operations. For models and Tavily/MCP, see AI.
Back up the database, object storage, configuration, and AI key state together. Source code alone cannot restore a site. Keep real secrets out of Wiki pages and GitHub. When a later version adds fields, recheck its schemas and environment-variable consumers.