Database considerations for deploying TYPO3 with Docker

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

External or managed database service

✅ Yes

Managed externally

✅ Recommended

Scalable, secure, ideal for production. Offloads maintenance.

MariaDB/MySQL in separate container

✅ Yes

Docker volume or bind mount

✅ Yes

Flexible and common. Requires backup strategy and network setup.

SQLite inside TYPO3 container

❌ 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

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