Skip to main content

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
Enable and start:

Headless-Specific Configuration

Environment Variables

string
required
API key for authenticating API requests from AI clients.Also accepts: ABV_API_KEY
string
Password for Web UI login. If not set, uses API_KEY.Also accepts: ABV_WEB_PASSWORD
string
default:"AllExceptHealth"
Authentication mode in headless:
  • AllExceptHealth: Auth required except /health (default in headless)
  • Strict: Auth required for all endpoints
  • Off: No authentication (dangerous!)
  • Auto: Automatically determined
Also accepts: ABV_AUTH_MODE
boolean
default:"false"
  • true: Bind to 127.0.0.1 (localhost only)
  • false: Bind to 0.0.0.0 (all network interfaces)
In Docker/headless mode, defaults to false to allow LAN access.
integer
default:"8045"
Port for the Web UI and API endpoints.
integer
default:"104857600"
Maximum request body size (bytes). Default: 100MB for large image uploads.
string
default:"/app/dist"
Path to frontend static files. Pre-configured in Docker images.
string
Public URL for OAuth callbacks when behind reverse proxy.Example: https://antigravity.example.com
string
default:"info"
Logging verbosity: debug, info, warn, error
string
default:"info"
Rust-specific logging. Overrides LOG_LEVEL for Rust components.

Code Reference

Headless mode initialization is in src-tauri/src/lib.rs:109-289:

Web UI Access

In headless mode, access the management interface at:
Or from another device on the network (if ABV_BIND_LOCAL_ONLY=false):

Web UI Features

1

Account Management

Add, edit, and remove Google accounts via OAuth flow
2

Quota Monitoring

Real-time quota tracking and account health status
3

API Configuration

Configure proxy settings, model routing, and API keys
4

Logs and Monitoring

View API request logs, token usage, and system status
5

Settings

Configure security, IP whitelisting, and advanced options

Security Considerations

Headless mode forces auth_mode to AllExceptHealth if it was Off or Auto.

Authentication Flow

  1. Web UI Login: Uses WEB_PASSWORD (or API_KEY if not set)
  2. API Requests: Use API_KEY in Authorization header
  3. 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

Health Check Endpoint

Response:
Use this for monitoring tools like Prometheus, Uptime Kuma, or Nagios.

OAuth in Headless Mode

OAuth callbacks work in headless mode through the Web UI’s built-in OAuth handler.

Standard OAuth Flow

  1. Access Web UI at http://your-server:8045
  2. Navigate to Accounts → Add Account → OAuth
  3. Copy the generated authorization URL
  4. Open URL in any browser (can be on different device)
  5. Complete Google OAuth authorization
  6. Browser redirects to callback URL
  7. Web UI automatically completes the flow

Behind Reverse Proxy

If behind a reverse proxy, set the public URL:
This ensures OAuth callbacks redirect to your public domain instead of 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 handles Ctrl+C for clean shutdown:

Performance Tuning

Resource Limits

For systemd services:
/etc/systemd/system/antigravity-manager.service

Concurrency Settings

Adjust in gui_config.json:

Troubleshooting

  1. Check ABV_BIND_LOCAL_ONLY is false:
  2. Verify firewall allows port 8045:
  3. Test from server:
  1. Ensure admin server is running:
  2. If behind reverse proxy, set ABV_PUBLIC_URL
  3. Check firewall allows callback port
  1. Check for excessive logging:
  2. Review background tasks in logs:
  3. Smart scheduler is disabled by default (v4.1.24+)
  1. Check systemd status:
  2. Review recent logs:
  3. 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