nikivdev/code · error
No proxy targets configured. Add [[proxies]] to flow.toml
Error message
No proxy targets configured. Add [[proxies]] to flow.toml
What it means
The `proxy` subcommand requires at least one [[proxies]] target entry in the project's flow.toml. load_project_config succeeded but `config.proxies` was empty (or absent), so there is nothing to proxy. This is a deliberate configuration guard, not a runtime failure.
Source
Thrown at src/main.rs:1049
.map(|d| d.join("flow").join("flow.toml"))
.filter(|p| p.exists());
if let Some(path) = global {
flowd::config::load(&path)
} else {
bail!("No flow.toml found in current directory or global config");
}
}
};
match cmd.action {
ProxyAction::Start(opts) => {
// Load config
let config = load_project_config()?;
let proxy_config = config.proxy.unwrap_or_default();
let targets = config.proxies;
if targets.is_empty() {
bail!("No proxy targets configured. Add [[proxies]] to flow.toml");
}
// Override listen if provided
let proxy_config = if let Some(listen) = opts.listen {
proxy::ProxyConfig {
listen,
..proxy_config
}
} else {
proxy_config
};
// Start server
let rt = tokio::runtime::Runtime::new()?;
rt.block_on(proxy::start(proxy_config, targets))?;
}
ProxyAction::Trace(opts) => {
proxy::trace_last(opts.count)?;View on GitHub (pinned to a747e741ae)
Solutions
- Add at least one [[proxies]] entry with target/host fields to flow.toml.
- Verify the TOML key is exactly [[proxies]] (plural, double brackets for array-of-tables).
- Confirm you are running `f proxy` from the project root so load_project_config finds the right flow.toml.
Example fix
// before (flow.toml) [proxy] listen = "127.0.0.1:8080" // after [proxy] listen = "127.0.0.1:8080" [[proxies]] from = "api.example.com" to = "http://localhost:3000"
Defensive patterns
Strategy: validation
Validate before calling
let config = load_project_config()?;
if config.proxies.as_ref().map_or(true, |p| p.is_empty()) {
eprintln!("flow.toml has no [[proxies]] entries; `f proxy` will fail");
} Prevention
- Keep a [[proxies]] block in the project's flow.toml template.
- Lint flow.toml in CI: parse it and assert required keys (proxies non-empty) for proxy-enabled projects.
- Remember the key must be the plural array-of-tables [[proxies]].
When it happens
Trigger: Running `f proxy` (proxy_command via main) when flow.toml has no [[proxies]] table/array entries, or flow.toml is missing entirely and no proxies were declared.
Common situations: Fresh project where the user only set [proxy] listen options but forgot the [[proxies]] targets; typos in the TOML key (e.g. [[proxy]] singular) that silently parse as a different field.
Related errors
- expected [{}] to be a table in global flow config
- No bootstrap secrets configured. Add cloudflare.bootstrap_se
- No [cloudflare] or [storage] env keys configured in flow.tom
- No flow.toml found in current directory or global config
- No profile selected.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/f8351d411ce42d80.
Report an issue: GitHub.