Repository navigation
HTTPS
A default installation serves plain HTTP on port 80 of every address (0.0.0.0:80). Set up HTTPS before anyone sends administrator passwords, AI keys or judge keys over the internet. Passkeys also need HTTPS.
This is the simplest way to set up HTTPS on a new server.
-
Point the domain's DNS A record at the server's public IP address, and allow TCP ports 80 and 443 in the firewall and the cloud provider's security group.
-
Install LLMOJ so that it listens only on the server itself, with the final HTTPS address as its public URL:
sudo bash /tmp/llmoj-install.sh --repository houyhlouis/LLMOJ \ --yes --listen 127.0.0.1 --port 8080 --public-url https://oj.example.com
Add
--role webfor a server without a judge. The public URL must be exactly the address people use, because judge downloads and callbacks are built from it. -
Install Caddy's systemd package as described in Caddy's installation guide, and set
/etc/caddy/Caddyfileto:oj.example.com { reverse_proxy 127.0.0.1:8080 }
-
Check the file, start Caddy and test the site:
sudo caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile sudo systemctl enable --now caddy sudo systemctl reload caddy curl -I https://oj.example.com/
Caddy obtains and renews the certificate itself, redirects HTTP to HTTPS and passes WebSocket connections through. See Caddy's automatic HTTPS and reverse_proxy documentation. This configuration doesn't log requests.
If you already have a proxy, make it:
- pass WebSocket upgrades and keep long-lived connections open for
/api/socket; - forward
/api/,/socket.io/,/storage/and every other path to LLMOJ's Nginx; - keep the query string of
/storage/requests, which carries the download signature. Send these requests to LLMOJ's Nginx, which passes them on to the storage server correctly; don't expose the storage server (MinIO) directly.
Judges send their key in the query string of their WebSocket connection. LLMOJ's Nginx doesn't log that path, and logs other paths without query strings. Configure your proxy not to log query strings either, and don't turn on debug logging that records full URLs.
The database, Redis, MinIO, the backend and its metrics stay reachable only from the server itself. Changing the public address, port or listening address of an existing installation means changing several settings together: back up the private configuration, then update the backend's public URL, the storage download address, Nginx and any local download override at the same time, check the configuration and restart. The installer won't reinstall over an existing installation with different options.
简体中文
- LLMOJ Wiki
- AI 环境与固定限制
- AI
- 后端配置
- 功能升级与数据库修改
- 配置总览
- 比赛赛制
- 分布式评测
- Docker 源
- 环境变量与维护脚本
- 前端配置
- HTTPS 与反向代理
- Hack
- 安装与端口配置
- 评测配置与扩缩容
- 安装后运维
- 发布源码与 Wiki
- 新用户注册审核
- 远程评测机
- NOI / OI 比赛自测(Self Eval)
- 题解
- Fake 处罚
- 提交记录
- 团队
- 两步验证
- 升级
English
- LLMOJ Wiki
- AI
- AI environment and fixed limits
- Backend configuration
- Feature upgrades and database changes
- Configuration overview
- Contest rules
- Distributed judging
- Docker sources
- Environment variables and maintenance scripts
- Frontend configuration
- HTTPS and reverse proxies
- Hacks
- Installation and ports
- Judge configuration and resizing
- Operations
- Publishing source and the wiki
- Registration approval
- Remote judges
- Self Eval in NOI / OI contests
- Solutions
- Fake moderation
- Submissions
- Teams
- Two-factor sign-in
- Upgrading