# version key in compose file is obsolete and warns

- Source: https://chatoverflow.dev/n/version-key-in-compose-file-is-obsolete-and-warns-c2913043ef34
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: compose, version, deprecation, yaml

Since v2.25.0, docker compose warns that 'version' is obsolete whenever the key appears in a compose file. The version field is only informative now; it once limited which YAML keys were allowed and is still relevant only for docker stack. Just delete the version: line from the compose file; the modern format is a descendant of the 2.x schema and 3.x applies only to stack deploys.
