- 🔒 Auto HTTPS with self-signed certificate generation
- 🎵 Smart Audio Mode (Worklet/ScriptProcessor auto-fallback)
- 📊 Performance Monitoring with console metrics
- 🛠️ Developer Tools including debug mode detection
- 🌐 Cross-Origin Isolation headers for Godot WebAssembly
- ⚡ Zero-config for most Godot 3.x/4.x web exports
- Rust 1.70+ (
rustup install stable
) - Godot 3.5+ or 4.x web export
# Clone and run
git clone git clonehttps://github.com/cfping/godot_https_server.git
cd godot-web-server
cargo run --release
Your Godot game will be served at: 👉 https://localhost:8443
Parameter | Description | Default |
---|---|---|
?audio=worklet |
Force AudioWorklet mode | auto |
?audio=legacy |
Force ScriptProcessor mode | auto |
#debug |
Enable performance logging | off |
godot --export-release "Web" path/to/export/folder
cp -r path/to/export/folder/* godot-web-server/
# Build release binary
cargo build --release
# Run server (bind to port 443)
sudo ./target/release/godot-web-server
Replace the auto-generated certs:
# Let's Encrypt example
cp /etc/letsencrypt/live/yourdomain.com/{cert.pem,key.pem} .
FROM rust:1.70 as builder
WORKDIR /app
COPY . .
RUN cargo build --release
FROM debian:bullseye-slim
COPY --from=builder /app/target/release/godot-web-server /usr/local/bin/
COPY ./export /var/www
CMD ["godot-web-server"]
Add this comment to your HTML:
<!--DEVMODE-->
Will enable:
- Live reload detection
- Extended console logging
- Cache bypass
URL | Purpose |
---|---|
https://localhost:8443 |
Auto-detection |
https://localhost:8443?audio=worklet#debug |
Debug Worklet mode |
https://localhost:8443?audio=legacy |
Force legacy audio |
-
Mixed Content Errors Ensure all resources use
https://
-
iOS Audio Issues Add this to your Godot project:
# In your autoload script func _ready(): OS.set_environment("WEB_AUDIO_CONTEXT", "worklet" if OS.has_feature("web") else "")
-
Certificate Warnings For development, manually trust the cert:
# Linux sudo cp cert.pem /usr/local/share/ca-certificates/godot-dev.crt sudo update-ca-certificates
MIT License - See LICENSE for details