Dokploy/dokploy · error · Error

INNGEST_BASE_URL is required to list deployment jobs

Error message

INNGEST_BASE_URL is required to list deployment jobs

What it means

Thrown when docker.createNetwork fails while materializing a network row in Docker. The Docker API error (name conflict, invalid driver, bad IPAM config) is wrapped in a TRPCError with code BAD_REQUEST and the original message is forwarded. The cause chain preserves the underlying Docker error.

Source

Thrown at apps/api/src/service.ts:217

				failedReason,
				state,
			});
		}
	}

	return rows.sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0));
}

/** Fetch deployment jobs for a server: events → runs → rows (correct model: runs = jobs) */
export const fetchDeploymentJobs = async (
	serverId: string,
): Promise<DeploymentJobRow[]> => {
	if (!signingKey) {
		logger.warn("INNGEST_SIGNING_KEY not set, returning empty jobs list");
		return [];
	}
	if (!baseUrl) {
		throw new Error("INNGEST_BASE_URL is required to list deployment jobs");
	}

	const events = await fetchInngestEvents();

	const requestedForServer = events.filter(
		(e) =>
			e.name === "deployment/requested" &&
			(e.data as Record<string, unknown>)?.serverId === serverId,
	);
	// Limit to avoid too many run fetches
	const toFetch = requestedForServer.slice(0, 50);
	const runsByEventId = new Map<string, InngestRun[]>();

	await Promise.all(
		toFetch.map(async (ev) => {
			const runs = await fetchInngestRunsForEvent(ev.id);
			runsByEventId.set(ev.id, runs);
		}),

View on GitHub (pinned to 546686ea35)

Solutions

  1. Check whether a Docker network with the same name already exists (docker network ls) and remove it or reuse it before creating
  2. Validate IPAM subnet/gateway values (CIDR format, no overlap with existing networks) before calling create
  3. Verify the requested driver is installed and supported on the target Docker daemon (overlay needs Swarm, macvlan needs kernel support)
  4. If the remote serverId points to another daemon, confirm connectivity to that daemon before creating

Example fix

// before
await createDockerNetworkFromRow(row);
// after
const exists = await docker.listNetworks({ name: row.name });
if (exists.length === 0) {
  await createDockerNetworkFromRow(row);
}
Defensive patterns

Strategy: validation

Validate before calling

const docker = await getRemoteDocker(row.serverId ?? null);
const existing = await docker.listNetworks({ name: row.name });
if (existing.length > 0) {
  // reuse or remove before creating
}

Type guard

const isDockerError = (e: unknown): e is { statusCode: number; message: string } =>
  typeof e === 'object' && e !== null && 'statusCode' in e;

Try / catch

try { await createDockerNetworkFromRow(row); } catch (e) { if (e instanceof TRPCError) console.error(e.cause); throw e; }

Prevention

When it happens

Trigger: Calling createDockerNetworkFromRow (directly or via created/recreateNetwork) when a Docker network with the same name already exists, the driver (e.g. macvlan/overlay) is unavailable on the host, or the IPAM config (subnet/gateway) is malformed or overlaps an existing network.

Common situations: Recreating a network after the DB row survived but the Docker network also survived; single-host docker installs that don't support overlay; subnet colliding with the default bridge or another compose network.

Related errors


AI-assisted analysis of Dokploy/dokploy@546686ea35 (2026-08-27). Data as JSON: /api/errors/2b82cd4b72964f13. Report an issue: GitHub.