louislam/dockge · error · Error
Failed to down, please check the terminal output for more in
Error message
Failed to down, please check the terminal output for more information.
What it means
Stack.down() runs 'docker compose down' (without --remove-orphans) and throws this Error when it exits non-zero; cause is shown in the compose terminal. down stops and removes containers/networks defined by the compose project.
Source
Thrown at backend/stack.ts:452
throw new Error("Failed to stop, please check the terminal output for more information.");
}
return exitCode;
}
async restart(socket: DockgeSocket) : Promise<number> {
const terminalName = getComposeTerminalName(socket.endpoint, this.name);
let exitCode = await Terminal.exec(this.server, socket, terminalName, "docker", this.getComposeOptions("restart"), this.path);
if (exitCode !== 0) {
throw new Error("Failed to restart, please check the terminal output for more information.");
}
return exitCode;
}
async down(socket: DockgeSocket) : Promise<number> {
const terminalName = getComposeTerminalName(socket.endpoint, this.name);
let exitCode = await Terminal.exec(this.server, socket, terminalName, "docker", this.getComposeOptions("down"), this.path);
if (exitCode !== 0) {
throw new Error("Failed to down, please check the terminal output for more information.");
}
return exitCode;
}
async update(socket: DockgeSocket) {
const terminalName = getComposeTerminalName(socket.endpoint, this.name);
let exitCode = await Terminal.exec(this.server, socket, terminalName, "docker", this.getComposeOptions("pull"), this.path);
if (exitCode !== 0) {
throw new Error("Failed to pull, please check the terminal output for more information.");
}
// If the stack is not running, we don't need to restart it
await this.updateStatus();
log.debug("update", "Status: " + this.status);
if (this.status !== RUNNING) {
return exitCode;
}
View on GitHub (pinned to f809ae192b)
Solutions
- Read the compose terminal output for the exact error
- Check docker daemon health (docker info / systemctl status docker)
- Detach foreign containers from the project network or remove the network manually (docker network rm)
- Force-remove stuck containers (docker rm -f) then retry down
- Free disk space if the host is full — teardown writes/removes metadata
Example fix
// before
await stack.down(socket);
// after
try {
await stack.down(socket);
} catch (e) {
log.error("down", `Down failed for '${stack.name}'; inspect terminal, then clean up networks/containers manually if needed`);
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
function daemonReachable(): boolean {
try { execSync("docker info"); return true; } catch { return false; }
}
if (!daemonReachable()) {
throw new Error("Docker daemon unreachable — down will fail");
}
await stack.down(socket); Type guard
function downOk(exitCode: number | undefined): boolean {
return exitCode === 0;
} Try / catch
try {
await stack.down(socket);
} catch (e) {
log.error("down", "Down failed — read terminal output; detach foreign network users, rm -f stuck containers, then retry");
throw e;
} Prevention
- Don't attach external containers to stack networks
- Keep disk space available for teardown operations
- Check daemon health before bulk down operations
- Prefer Dockge's delete (down --remove-orphans) over manual cleanup
When it happens
Trigger: compose down exits non-zero: daemon unreachable, containers in dead state, network removal failure (network in use by containers outside the project), compose project metadata missing.
Common situations: Host OOM or disk full during teardown; externally-created network attached to project containers; daemon restarting; mixing manual docker commands with Dockge leaving orphaned attachments.
Related errors
- Failed to deploy, please check the terminal output for more
- Failed to delete, please check the terminal output for more
- Failed to start, please check the terminal output for more i
- Failed to stop, please check the terminal output for more in
- Failed to restart, please check the terminal output for more
AI-assisted analysis of louislam/dockge@f809ae192b (2026-08-31).
Data as JSON: /api/errors/aacc7f2ffcd53127.
Report an issue: GitHub.