# ContainerNetwork AutoFix

ContainerNetwork AutoFix is a Docker utility that automatically recreates containers that depend on a master container's network via --net=container when the master restarts, preventing connectivity loss after VPN or. It is open source and self-hosted, installable on Docker Hub and Unraid.

Canonical page: https://ourlocalhost.com/app/2200/containernetwork-autofix

## Description

ContainerNetwork AutoFix is a Docker utility that automatically recreates containers that depend on a master container's network via --net=container when the master restarts, preventing connectivity loss after VPN or proxy updates on Unraid and other Docker hosts.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

39/100 (Low), based on 4 of 5 factors.
- Maintained: 33 (last commit 400 days ago)
- Popular: 24 (15 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Security check: 75 (no serious findings)

## Links

- Docker Hub: https://hub.docker.com/r/buxxdev/containernetwork-autofix
- GitHub: https://github.com/buxxdev/containernetwork-autofix
- Unraid: https://ca.unraid.net/apps/containernetwork-autofix-0k3462903rhpad?q=ContainerNetwork-AutoFix

## Common questions

### How do I make CNAF monitor a container other than the default GluetunVPN container?

Set the MASTER_CONTAINER environment variable to the exact name of the master container you want to monitor. The default is GluetunVPN if you do not override it.

### Will dependent containers that were stopped remain stopped when the master container restarts?

Yes, CNAF preserves the running or stopped state of dependent containers when it recreates them after the master container restarts.

### What host file must CNAF be given so it can manage Docker containers?

It needs the Docker socket mounted at /var/run/docker.sock. On Unraid it also expects the Unraid template and Docker manager script directories to be mounted.

### How can I stop CNAF logs from growing indefinitely?

Set MAX_LOG_LINES to the maximum number of log lines to keep. CNAF performs automatic log rotation based on that limit.

### Are passwords or API keys written to the CNAF log?

The changelog states that passwords and API keys are masked in the log file.

---
Source: Our Local Host (https://ourlocalhost.com/app/2200/containernetwork-autofix), the self-hosted and open-source app directory.
