DNS Mapping Commands
graft map
Section titled “graft map”Automatically map all service domains to Cloudflare DNS records.
graft mapWhat it does:
- Parses
graft-compose.ymlto extract all TraefikHost()rules. - Detects the server’s public IP address.
- Prompts for Cloudflare API credentials (saved securely for future use).
- Synchronizes DNS records by pointing them to your server’s public IP.
How to Get Your Cloudflare API Token
Section titled “How to Get Your Cloudflare API Token”To use Zero-Config DNS, you need an API Token with specific permissions. Do not use your Global API Key.
Steps to create a token:
- Log in to the Cloudflare Dashboard.
- Go to My Profile > API Tokens.
- Click Create Token.
- Use the Edit zone DNS template.
- Permissions: Ensure it has
Zone - DNS - Edit. - Zone Resources: Select
Include - Specific zoneorInclude - All zones. - Copy the generated token and keep it safe. Graft will prompt for this the first time you run
graft map.
graft map service <service-name>
Section titled “graft map service <service-name>”Map DNS records for a specific service only.
graft map service backend