Status: 🧪 Testing
The Forge adapter uses the Laravel Forge API to create sites on Forge-managed servers.
- createSubdomain: Creates a new site via Forge API with the subdomain and document root
- removeSubdomain: Deletes the site via Forge API
- pauseSubdomain / resumeSubdomain: Currently log warnings only. The operator UI still shows the buttons, but the Forge adapter does not yet toggle site availability.
- addDomain: Adds a domain alias to the Forge site via REST API. HTTP status is validated — 4xx/5xx responses propagate as exceptions with the Forge error message.
- removeDomain: Finds and removes the alias by domain name via Forge API. Idempotent — no error if the site or alias doesn't exist.
SSL is handled automatically by Forge via Let's Encrypt.
- A server managed by Laravel Forge
- Forge API token with site management permissions
- Forge Server ID
- Wildcard DNS:
*.yourdomain.com→ your Forge server IP
| Field | Description | Example |
|---|---|---|
api_token |
Forge API bearer token | eyJ0eXAi... |
server_id |
Forge server ID (visible in Forge dashboard URL) | 123456 |
- Log in to forge.laravel.com
- Go to Account → API Tokens
- Create a new token with site management permissions
- Copy the token — it won't be shown again
The Server ID is in the Forge dashboard URL when viewing your server:
https://forge.laravel.com/servers/123456 → ID is 123456
- 401 Unauthorized: Your API token is invalid or expired
- 403 Forbidden: Token doesn't have site management permissions
- 404 Not Found: Server ID is incorrect
- SSL not provisioning: Forge handles this automatically, but DNS must resolve first
- Forge API rate limits apply (60 requests/minute)
- Site creation can take 10-30 seconds
- Custom Nginx configuration templates may conflict with Forge defaults