# Autopause could not be set up, so the server will not pause while idle

The itzg/minecraft-server image could not start its autopause service, so the server keeps running with nobody online instead of pausing.

- Code: `autopause_failed`
- Severity: warning
- Category: Startup
- Server types: Every server type
- Page: https://failures.perland.online/failures/autopause_failed/

## Example log

```text
2026-11-06T07:30:02.417Z [init] Autopause functionality enabled
2026-11-06T07:30:19.884Z [Autopause loop] Failed to start knockd daemon.
2026-11-06T07:30:19.885Z [Autopause loop] Autopause failed to initialize. This log entry will be printed every 30 minutes.
```

## Log lines this page covers

- `Autopause failed to initialize. This log entry will be printed every 30 minutes.`

## What it means

Autopause in the itzg/minecraft-server Docker image (`ENABLE_AUTOPAUSE`) freezes the server while nobody is online. To notice a player coming back while the server is frozen, it runs a small helper, `knockd`, that watches the container's network traffic for connections to the game port.

When that helper cannot start, autopause gives up and prints this line, again every 30 minutes. The server itself is fine and players can join as usual; it simply keeps running, and using CPU and memory, while nobody plays.

## Why it happens

- **The network interface autopause watches does not exist.** It watches `eth0` by default (`AUTOPAUSE_KNOCK_INTERFACE`); with host networking or an unusual network setup the container's interface has another name.
- **The container may not watch network traffic.** `knockd` needs the permission to capture packets, which some hosts and rootless container setups do not grant.
- **The image's helper failed for another reason,** which its own lines just before this one usually say.

## How to fix

1. Read the lines just above the warning: they usually say why `knockd` stopped.
2. If the container uses host networking or another network setup, set `AUTOPAUSE_KNOCK_INTERFACE` to the interface the container really has (`ip link` inside the container lists them).
3. Check that the container runs with its default capabilities; a setup that drops them, or a rootless runtime, can stop `knockd` from capturing traffic.
4. If autopause is not needed, turn it off with `ENABLE_AUTOPAUSE=false` and the warning goes away.

## In Perland

The issue appears in the server's Diagnosis tab as a warning. Perland's idle pause relies on this autopause, so this server stays awake while idle instead of pausing; Perland's idle stop, which does not need autopause, still puts it to sleep after the stop time when one is set. Nothing in the panel changes this: send the excerpt to your hosting operator.

## References

- [Docker Minecraft Server: Autopause](https://docker-minecraft-server.readthedocs.io/en/latest/misc/autopause-autostop/autopause/)
