zed-industries/zed · error
error loading config
Error message
error loading config
What it means
Startup failure in the collab server binary: parsing the configuration from environment variables via envy::from_env::<Config>() panicked (expect "error loading config"), meaning a required env var is missing or has the wrong type. The server cannot start with an invalid configuration.
Source
Thrown at crates/collab/src/main.rs:56
);
}
let mut args = args().skip(1);
match args.next().as_deref() {
Some("version") => {
println!("collab v{} ({})", VERSION, REVISION.unwrap_or("unknown"));
}
Some("serve") => {
let mode = match args.next().as_deref() {
Some("collab") => ServiceMode::Collab,
Some("api") => ServiceMode::Api,
Some("all") => ServiceMode::All,
_ => {
return Err(anyhow!("usage: collab <version | serve <api|collab|all>>"))?;
}
};
let config = envy::from_env::<Config>().expect("error loading config");
init_tracing(&config);
init_panic_hook();
let mut app = Router::new()
.route("/", get(handle_root))
.route("/healthz", get(handle_liveness_probe))
.layer(Extension(mode));
let listener = TcpListener::bind(format!("0.0.0.0:{}", config.http_port))
.expect("failed to bind TCP listener");
let mut on_shutdown = None;
if mode.is_collab() || mode.is_api() {
setup_app_database(&config).await?;
let state = AppState::new(config, Executor::Production).await?;
View on GitHub (pinned to 9d272b0363)
Solutions
- Set all required COLLAB_* environment variables before starting the server
- Check that env values have the expected types (numbers, bools, URLs)
- Compare against the Config struct's field definitions for required keys
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/collab/src/main.rs:56 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20).
Data as JSON: /api/errors/3cb4e3e9209bd553.
Report an issue: GitHub.