ruvnet/ruflo · error · Error

Config manager is disabled

Error message

Config manager is disabled

What it means

ConfigManager.set() persists runtime config overrides to the DB-backed config collection. It refuses to write unless the config-manager feature is enabled: the ConfigManagerEnabled getter (config.ts:40) requires server env ENABLE_CONFIG_MANAGER === "true" exactly, and the app not running in test mode. The guard exists because self-hosted deployments treat config as read-only env vars; DB-backed overrides are opt-in.

Source

Thrown at ruflo/src/ruvocal/src/lib/server/config.ts:101

	}

	async updateSemaphore() {
		await this.semaphoreCollection?.updateOne(
			{ key: Semaphores.CONFIG_UPDATE },
			{
				$set: {
					updatedAt: new Date(),
				},
				$setOnInsert: {
					createdAt: new Date(),
				},
			},
			{ upsert: true }
		);
	}

	async set(key: ConfigKey, value: string) {
		if (!this.ConfigManagerEnabled) throw new Error("Config manager is disabled");
		await this.configCollection?.updateOne({ key }, { $set: { value } }, { upsert: true });
		this.keysFromDB[key] = value;
		await this.updateSemaphore();
	}

	async delete(key: ConfigKey) {
		if (!this.ConfigManagerEnabled) throw new Error("Config manager is disabled");
		await this.configCollection?.deleteOne({ key });
		delete this.keysFromDB[key];
		await this.updateSemaphore();
	}

	async clear() {
		if (!this.ConfigManagerEnabled) throw new Error("Config manager is disabled");
		await this.configCollection?.deleteMany({});
		this.keysFromDB = {};
		await this.updateSemaphore();
	}

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Set ENABLE_CONFIG_MANAGER=true in the server env (.env) and restart the app
  2. Check for exact lowercase spelling and no quotes/whitespace in the value
  3. If writes must stay disabled, use config.get() only and remove code paths that call set/delete/clear
  4. Ensure MONGODB_URL is set and collections initialized, since set() writes to collections.config

Example fix

// before
await config.set("PUBLIC_APP_NAME", "My Chat"); // throws: Config manager is disabled

// after
if (config.ConfigManagerEnabled) {
	await config.set("PUBLIC_APP_NAME", "My Chat");
} else {
	// env-only deployment: change the variable in .env and restart instead
	throw new Error("Set ENABLE_CONFIG_MANAGER=true to allow runtime config writes");
}
Defensive patterns

Strategy: validation

Validate before calling

import { config } from "$lib/server/config";

if (config.ConfigManagerEnabled) {
	await config.set(key, value);
} else {
	// read-only deployment: persist elsewhere or reject the operation
	throw error(403, "Runtime config writes are disabled (ENABLE_CONFIG_MANAGER!=true)");
}

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: Awaiting config.set(key, value) from server code (admin/settings routes) when ENABLE_CONFIG_MANAGER is unset, empty, or not the exact lowercase string "true", or when MODE is "test". Reads via config.get() still work (they fall back to env), only writes throw.

Common situations: Self-hosted chat-ui/ruvocal deploy without ENABLE_CONFIG_MANAGER=true trying to use runtime config writes; .env.local missing the flag; setting "True"/"1"/"yes" instead of "true"; admin UI calling set() on a deployment where DB config was never enabled.

Related errors


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/370b75b6aa6c44cb. Report an issue: GitHub.