nikivdev/code · error

No URL configured in [cloudflare]. Add 'url = "https://..."'

Error message

No URL configured in [cloudflare]. Add 'url = "https://..."' or use --url.

What it means

No [host] config is present, so the checker falls back to the [cloudflare] section. That section exists but has no `url` key, so there is no URL to probe and the CLI bails with a hint naming both fixes.

Source

Thrown at src/deploy.rs:3144

    // Determine URL to check
    let url = if let Some(url) = custom_url {
        url
    } else if let Some(config) = config {
        // Try host domain first
        if let Some(host) = &config.host {
            if let Some(domain) = &host.domain {
                let scheme = if host.ssl { "https" } else { "http" };
                format!("{}://{}", scheme, domain)
            } else {
                bail!("No domain configured. Use --url to specify a URL to check.");
            }
        } else if let Some(cf) = &config.cloudflare {
            // Use configured URL if present
            if let Some(cf_url) = &cf.url {
                cf_url.clone()
            } else {
                bail!(
                    "No URL configured in [cloudflare]. Add 'url = \"https://...\"' or use --url."
                );
            }
        } else {
            bail!("No deployment config found. Use --url to specify a URL to check.");
        }
    } else {
        bail!("No flow.toml found. Use --url to specify a URL to check.");
    };

    println!("Checking health: {}", url);
    let start = Instant::now();

    // Use curl for simplicity (available everywhere)
    let output = Command::new("curl")
        .args([
            "-sS",
            "-o",

View on GitHub (pinned to a747e741ae)

Solutions

  1. Add `url = "https://your-app.example.com"` under [cloudflare] in flow.toml
  2. Pass --url https://... to the check command
  3. Add a [host] section with `domain` so the URL is built from it

Example fix

// before (flow.toml)
[cloudflare]
api_token = "..."

// after
[cloudflare]
api_token = "..."
url = "https://my-app.example.com"
Defensive patterns

Strategy: validation

Validate before calling

// check before running
if config.host.is_none() {
    let cf = config.cloudflare.as_ref().expect("cloudflare section");
    assert!(cf.url.is_some(), "[cloudflare].url must be set or use --url");
}

Type guard

fn cf_url_configured(cfg: &Config) -> bool {
    cfg.cloudflare.as_ref().is_some_and(|c| c.url.is_some())
}

Prevention

When it happens

Trigger: flow.toml contains [cloudflare] but omits `url`, no [host].domain exists, and no --url flag is passed to the health check.

Common situations: Users set up Cloudflare deployment (worker/tunnel keys) but assume the URL is inferred; the URL must be explicit after a manual deploy.

Related errors


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/381a425ea5e38093. Report an issue: GitHub.