Overview
Headless mode allows Antigravity Manager to run on servers without a graphical desktop environment. It provides full functionality through a Web-based interface and API endpoints.Headless mode is automatically enabled when using Docker or running with the
--headless flag.Headless vs Desktop Mode
Headless Mode
- Web-based management UI
- API-first design
- No GUI dependencies
- Perfect for servers/containers
- Lower resource usage
Desktop Mode
- Native desktop application
- System tray integration
- Tauri-based GUI
- Local OAuth callbacks
- Auto-update support
Running Headless Mode
Direct Binary Execution
With Environment Variables
Systemd Service (Linux)
Create a systemd service for automatic startup:/etc/systemd/system/antigravity-manager.service
Headless-Specific Configuration
Environment Variables
API key for authenticating API requests from AI clients.Also accepts:
ABV_API_KEYPassword for Web UI login. If not set, uses
API_KEY.Also accepts: ABV_WEB_PASSWORDAuthentication mode in headless:
AllExceptHealth: Auth required except/health(default in headless)Strict: Auth required for all endpointsOff: No authentication (dangerous!)Auto: Automatically determined
ABV_AUTH_MODEtrue: Bind to127.0.0.1(localhost only)false: Bind to0.0.0.0(all network interfaces)
false to allow LAN access.Port for the Web UI and API endpoints.
Maximum request body size (bytes). Default: 100MB for large image uploads.
Path to frontend static files. Pre-configured in Docker images.
Public URL for OAuth callbacks when behind reverse proxy.Example:
https://antigravity.example.comLogging verbosity:
debug, info, warn, errorRust-specific logging. Overrides
LOG_LEVEL for Rust components.Code Reference
Headless mode initialization is insrc-tauri/src/lib.rs:109-289:
Web UI Access
In headless mode, access the management interface at:ABV_BIND_LOCAL_ONLY=false):
Web UI Features
Security Considerations
Authentication Flow
- Web UI Login: Uses
WEB_PASSWORD(orAPI_KEYif not set) - API Requests: Use
API_KEYinAuthorizationheader - Health Endpoint: Always accessible at
/health(no auth)
Firewall Configuration
Logging and Monitoring
Log Locations
- Application Data:
~/.antigravity_tools/ - Logs:
~/.antigravity_tools/logs/(if configured) - Configuration:
~/.antigravity_tools/gui_config.json
View Logs
- Systemd Service
- Docker Container
- Direct Execution
Health Check Endpoint
OAuth in Headless Mode
OAuth callbacks work in headless mode through the Web UI’s built-in OAuth handler.
Standard OAuth Flow
- Access Web UI at
http://your-server:8045 - Navigate to Accounts → Add Account → OAuth
- Copy the generated authorization URL
- Open URL in any browser (can be on different device)
- Complete Google OAuth authorization
- Browser redirects to callback URL
- Web UI automatically completes the flow
Behind Reverse Proxy
If behind a reverse proxy, set the public URL:localhost:8045.
Headless-Specific Features
Automatic Admin Server
Headless mode automatically starts the admin server on port 8045 to serve the Web UI:No Tray Icon
Headless mode automatically disables system tray:Graceful Shutdown
Headless mode handlesCtrl+C for clean shutdown:
Performance Tuning
Resource Limits
For systemd services:/etc/systemd/system/antigravity-manager.service
Concurrency Settings
Adjust ingui_config.json:
Troubleshooting
Cannot access Web UI from other devices
Cannot access Web UI from other devices
-
Check
ABV_BIND_LOCAL_ONLYisfalse: -
Verify firewall allows port 8045:
-
Test from server:
OAuth callbacks fail
OAuth callbacks fail
-
Ensure admin server is running:
-
If behind reverse proxy, set
ABV_PUBLIC_URL - Check firewall allows callback port
High CPU usage
High CPU usage
-
Check for excessive logging:
-
Review background tasks in logs:
- Smart scheduler is disabled by default (v4.1.24+)
Service won't start
Service won't start
-
Check systemd status:
-
Review recent logs:
-
Verify binary path and permissions:
Next Steps
Reverse Proxy Setup
Add HTTPS and custom domain with Nginx or Caddy
API Integration
Connect Claude CLI, OpenCode, and other clients
Security Best Practices
Configure IP whitelisting, rate limiting, and authentication
Monitoring
Set up Prometheus, Grafana, or other monitoring tools