Legacy .env deployments

The current official Docker Compose deployment no longer requires a .env file.

For a new installation:

  • Download the current docker-compose.yml.

  • Store application settings in config/config.json.

  • Keep persisted data in the Compose deployment directory under ./data.

Follow ​Docker Compose [Recommended] and ​Configuration instead of copying the legacy template from this page.

Existing installations

An older deployment may still depend on .env for its image tag, port, database credentials, and host paths. Do not delete that file or replace its Compose file without first backing up the database, uploaded files, and configuration.

Use the documentation that matches the installed AFFiNE release, then follow ​Backup and Restore and ​Upgrade when migrating to the current layout.