Database considerations for deploying TYPO3 with Docker
Warning
This section is experimental and under active development. Content is incomplete and may change as best practices evolve.
Want to help improve this section? TYPO3 documentation contributions are welcome! If you have deployment experience, examples, or corrections, please consider submitting a pull request or opening an issue on GitHub.
TYPO3 requires a relational database in order to store content, configuration, and extension data. When running TYPO3 in a Docker container on a server, there are several database deployment options — each with different levels of complexity and production readiness.
The table below provides a quick comparison. You can click on each setup type to jump to a more detailed explanation.
Setup type |
Suitable for production? |
Persistence strategy |
Backup required? |
Notes |
---|---|---|---|---|
✅ Yes |
Managed externally |
✅ Recommended |
Scalable, secure, ideal for production. Offloads maintenance. | |
✅ Yes |
Docker volume or bind mount |
✅ Yes |
Flexible and common. Requires backup strategy and network setup. | |
❌ No |
None or bind mount |
⚠️ Manual |
Simple but fragile. Not recommended beyond test/demo use. |
External or managed database service
You can connect your TYPO3 container to an external or managed database, such as one provided by your hosting environment or an infrastructure platform.
Benefits:
- No need to manage the database container yourself
- Professional-grade storage, backup, and monitoring
- Excellent for production scalability and reliability
But remember:
- Pass credentials securely using environment variables or secrets
- Ensure network access is reliable and secure
This approach is ideal if you already have database infrastructure in place or want to reduce operational complexity by offloading maintenance.
MariaDB/MySQL in separate container
Running the database in a separate container is a popular, flexible solution. Containers provide modular services and work well with Docker Compose, Swarm, or Kubernetes.
Important considerations:
- Use Docker volumes for persistence
- Ensure the TYPO3 container can reach the database on the network
- Handle startup timing to avoid connection errors
- Schedule regular database backups
See also
- Docker Compose: https://docs.docker.com/compose/
- MariaDB in Docker: https://hub.docker.com/_/mariadb
- MySQL in Docker: https://hub.docker.com/_/mysql
SQLite inside TYPO3 container
A simple solution is to use SQLite and include the database file inside a TYPO3 Docker container. This works for quick tests, demos, or very small-scale sites.
Drawbacks:
- No real persistence unless explicitly mounted
- Fragile: data is lost on rebuild unless carefully managed
- Not suitable for production
See also
- SQLite official documentation: https://www.sqlite.org/docs.html