Find the writer before buying more storage

An application can write to standard output, a file inside its container, or a mounted directory. Those are different storage paths. Docker’s json-file driver records container stdout and stderr with a timestamp and stream label. Its rotation settings do not limit an application’s own file logs. First identify the active driver for each service and where the application writes.

For a development VPS, dependency downloads and image layers may grow at the same time as logs. Separate these categories in the disk inventory. If logs dominate, increasing disk size without retention merely delays the same incident. Keep enough free space for deployment and database maintenance while correcting the cause.

Configure both size and retained-file count

The official json-file documentation checked on 4 November 2026 gives max-size a default of -1, meaning unlimited. max-file is effective only when max-size is set. A retained-file count alone therefore does not establish a useful capacity boundary.

For a service using this driver, an illustrative option pair is max-size=10m and max-file=3. These are planning values, not a recommendation for every application. In daemon.json, log-opts values must be strings, including "max-file": "3". Merge reviewed settings with the existing configuration rather than replacing the entire daemon file. Retention should cover the incident-investigation window without treating local disk as a permanent archive.

Existing containers need a separate rollout

Docker documents that daemon changes require a restart and apply to newly created containers. Existing containers do not automatically adopt the new logging configuration. A successful daemon restart is therefore not proof that the running application has bounded logs.

Inventory affected containers, preserve their declared configuration and confirm that persistent application data lives in an appropriate volume or backup. Schedule recreation through the deployment mechanism you already use. Recheck the resulting container’s actual driver and options, then observe rotation under a controlled workload. Do not remove a container before understanding whether it holds otherwise unpreserved data.

Rotation is not permission to edit daemon files

Docker warns against manipulating json-file storage with external tools because those files are designed for exclusive daemon access. Do not build a routine around manually truncating an internal Docker path or guessing its filename. Use the documented logging configuration and ordinary application logging controls.

Also decide what must never be logged: authorization headers, private request bodies and secrets. A small retention window reduces stored volume but does not make sensitive logging acceptable. When diagnostics must be retained elsewhere, budget that destination and verify that operators can actually retrieve the required event.

Translate the policy into a VPS budget

As a rough planning illustration, ten containers with three files of about 10 MB each suggest roughly 300 MB of retained log payload. This is arithmetic, not a hard filesystem quota or a measured Docker overhead figure. Include application file logs, image layers, writable layers, volumes, filesystem overhead and recovery staging separately.

The current catalog includes Vultr’s Dallas vhp-2c-4gb-intel variant with 2 vCPUs, 4096 MB RAM and 100 GB disk. Its observed 4 November 2026 quote is USD 24 for a one-month service period; tax and renewal are unknown, and optional backups and other extras are excluded. This is a storage-budget example, not a tested Docker capacity or stock guarantee. Use the configuration catalog to compare candidates only after estimating retained data.