clockworklabs/SpacetimeDB · error · anyhow::Error
Nickname conflicts with saved configuration for server : ://
Error message
Nickname {} conflicts with saved configuration for server {}: {}://{} What it means
`spacetime server edit <server> --nickname <new>` rejects the rename because the requested nickname already resolves to a different saved server. Nicknames and hosts share one lookup namespace (`find_server`), so a nickname equal to another entry's host is also a conflict.
Solutions
- Choose a nickname that is not used as any server's nickname or host
- Rename or remove the conflicting server first
Example fix
# before spacetime server edit maincloud --nickname local # error: Nickname local conflicts with saved configuration for server ... # after spacetime server edit maincloud --nickname cloud-prod
Defensive patterns
Strategy: validation
Validate before calling
// ensure the candidate nickname does not resolve to another server
if let Ok(other) = config.find_server(new_nick) {
if other.host != target.host {
anyhow::bail!("nickname already in use by {}", other.nick_or_host());
}
} Try / catch
Catch the 'Nickname ... conflicts with saved configuration' bail and prompt the operator for a different nickname instead of aborting.
Prevention
- Run `spacetime server list` before renaming to see taken names
- Keep nicknames clearly distinct from host strings since they share a namespace
When it happens
Trigger: Calling edit_server with a new_nickname that find_server resolves to another server entry — either that server's nickname or its host.
Common situations: Renaming a server to a name already in use; trying to set a nickname that duplicates another server's host string.
Related errors
- Host conflicts with saved configuration for server : ://
- Server already configured for host
- Server not specified and no default server configured.
- database is a required field in publish config
- Database ' ' is not in the config file. If you want to run…
AI-assisted analysis of clockworklabs/SpacetimeDB@6dee26c6ef (2026-08-20).
Data as JSON: /api/errors/c4425a7ccab0a6af.
Report an issue: GitHub.
Appendix: source
Thrown at crates/cli/src/config.rs:379
///
/// Implements `spacetime server edit`.
///
/// Returns `Err` if no such server exists.
/// On success, returns `(old_nickname, old_host, hold_protocol)`,
/// with `Some` for each field that was changed.
pub fn edit_server(
&mut self,
server: &str,
new_nickname: Option<&str>,
new_host: Option<&str>,
new_protocol: Option<&str>,
) -> anyhow::Result<(Option<String>, Option<String>, Option<String>)> {
// Check if the new nickname or host name would introduce ambiguities between
// server configurations.
if let Some(new_nick) = new_nickname
&& let Ok(other_server) = self.find_server(new_nick)
{
anyhow::bail!(
"Nickname {} conflicts with saved configuration for server {}: {}://{}",
new_nick,
other_server.nick_or_host(),
other_server.protocol,
other_server.host
);
}
if let Some(new_host) = new_host
&& let Ok(other_server) = self.find_server(new_host)
{
anyhow::bail!(
"Host {} conflicts with saved configuration for server {}: {}://{}",
new_host,
other_server.nick_or_host(),
other_server.protocol,
other_server.host
);
}View on GitHub (pinned to 6dee26c6ef)