Classic TYPO3 demo installation using Docker only
Warning
This setup is intended for local testing and learning.
This guide shows how to set up a TYPO3 demo site using basic Docker commands — without Docker Compose or DDEV.
By building the environment step by step, you’ll learn how Docker actually works: how containers run, how they talk to each other, how volumes persist data, and how services like TYPO3 and MariaDB connect via networking. This hands-on setup is ideal for those who want to understand the fundamentals of containerized TYPO3 — not just use a prebuilt stack.
This is a local development setup, not a production deployment.
This setup runs TYPO3 in Classic mode using the image martinhelmich/typo3 along with a MariaDB container.
Tip
New to Docker? Start here: Docker Get Started Guide.
Quick start
To quickly launch TYPO3 in classic mode with Docker:
mkdir -p fileadmin typo3conf typo3temp
# On Linux and WSL during development: Ensure TYPO3 can write to these directories
# chmod -R 777 fileadmin typo3conf typo3temp
docker network create typo3-demo-net
docker run -d --name typo3db --network typo3-demo-net \
-e MYSQL_ROOT_PASSWORD=secret \
-e MYSQL_DATABASE=db \
-e MYSQL_USER=db \
-e MYSQL_PASSWORD=db \
mariadb:latest
docker run -d -p 8080:80 --name typo3-demo --network typo3-demo-net \
-v "$(pwd)/fileadmin:/var/www/html/fileadmin" \
-v "$(pwd)/typo3conf:/var/www/html/typo3conf" \
-v "$(pwd)/typo3temp:/var/www/html/typo3temp" \
-e TYPO3_CONTEXT=Development/Docker \
-e PHP_DISPLAY_ERRORS=1 \
martinhelmich/typo3
If you are working on Linux or WSL, see Solving file permission issues.
Then open:
http://localhost:8080
Use these database settings in the TYPO3 installer:
- Database Host:
typo3db
- Username:
db
- Password:
db
- Database Name:
db
Prerequisites for using TYPO3 in Docker locally
- Docker installed. See https://docs.docker.com/get-docker/.
- Basic knowledge of Docker.
- A web browser to access TYPO3.
Step-by-step Docker setup
1. Prepare a project directory
Create a local project directory and subfolders for TYPO3's writable directories:
2. Create a user-defined Docker network
docker network create typo3-demo-net
3. Start the MariaDB database container
4. Start the TYPO3 container with mounted writable directories
docker run -d -p 8080:80 --name typo3-demo --network typo3-demo-net \
-v "$(pwd)/fileadmin:/var/www/html/fileadmin" \
-v "$(pwd)/typo3conf:/var/www/html/typo3conf" \
-v "$(pwd)/typo3temp:/var/www/html/typo3temp" \
-e TYPO3_CONTEXT=Development/Docker \
-e PHP_DISPLAY_ERRORS=1 \
martinhelmich/typo3
If you are working on Linux or WSL, see Solving file permission issues.
5. Access TYPO3 in your browser
Open:
http://localhost:8080
Use these database settings:
- Database Host:
typo3db
- Username:
db
- Password:
db
- Database Name:
db
6. Project directory structure after setup
-
fileadmin/
-
typo3conf/
-
typo3temp/
Note
All writable TYPO3 content is now persisted on your local machine. TYPO3 Core files are reset when the container stops. You can inspect them by accessing the TYPO3 container shell.
7. Stopping and restarting the containers
To stop TYPO3, run:
docker stop typo3-demo
To stop and remove the database:
docker stop typo3db
To restart the database:
docker run -d --name typo3db --network typo3-demo-net \
-e MYSQL_ROOT_PASSWORD=secret \
-e MYSQL_DATABASE=db \
-e MYSQL_USER=db \
-e MYSQL_PASSWORD=db \
mariadb:latest
Then restart TYPO3:
docker run -d -p 8080:80 --name typo3-demo --network typo3-demo-net \
-v "$(pwd)/fileadmin:/var/www/html/fileadmin" \
-v "$(pwd)/typo3conf:/var/www/html/typo3conf" \
-v "$(pwd)/typo3temp:/var/www/html/typo3temp" \
-e TYPO3_CONTEXT=Development/Docker \
-e PHP_DISPLAY_ERRORS=1 \
martinhelmich/typo3
Resetting the environment
To reset your TYPO3 demo environment completely, run the following script.
Caution
This will delete all data and containers. Make sure you no longer need any files or database contents before proceeding.
# Stop and remove containers
docker stop typo3-demo typo3db || true
docker rm typo3-demo typo3db || true
# Remove the Docker network
docker network rm typo3-demo-net || true
# Remove project folders
rm -rf fileadmin typo3conf typo3temp uploads
# Optionally remove Docker images (uncomment if desired)
# docker rmi martinhelmich/typo3
# docker rmi mariadb
After this cleanup, you can repeat the setup instructions to start fresh with a clean environment.
Helpful Docker commands
Accessing the TYPO3 container shell
While the container is running in detached mode, you can open an interactive shell in the container to inspect files, check logs, or run TYPO3 console commands.
docker exec -it typo3-demo /bin/bash
This opens an interactive bash shell inside the running TYPO3 container.
Type exit
to leave the container shell.
Running TYPO3 console commands
TYPO3 provides a command-line interface (CLI) via the typo3/
script.
To run console commands in the running container, use:
docker exec -it typo3-demo /var/www/html/typo3/sysext/core/bin/typo3
For example, to list available commands:
docker exec -it typo3-demo /var/www/html/typo3/sysext/core/bin/typo3 list
Flush all caches:
docker exec -it typo3-demo /var/www/html/typo3/sysext/core/bin/typo3 cache:flush
Solving file permission issues
Depending on your host operating system, TYPO3 may not be able to write
to mounted folders like fileadmin/
, typo3conf/
, or typo3temp/
.
Symptoms include:
- TYPO3 installer shows errors saving config
- HTTP 500 errors
- Cache or extension data not persisting
On Linux or WSL: File ownership and permission tips
Linux containers often run with a web server user like www-
(UID 33).
Your local files may need matching ownership or permissions:
# Quick fix for local development (not recommended for production)
# chmod -R 777 fileadmin typo3conf typo3temp
# Safer alternative: match the container's web server user (usually UID 33 for www-data)
sudo chown -R 33:33 fileadmin typo3conf typo3temp
macOS and Windows Docker file permission issues
If you are using Docker Desktop, you usually do not need to change permissions. Docker handles this automatically in most cases.
If you still run into issues, try restarting Docker and ensure file sharing is enabled for the folder you're working in.
Selecting TYPO3 versions in the Docker container
By default, the martinhelmich/
image runs the latest available TYPO3
LTS release (at the time of writing 13.
) when using the latest
tag.
To run a specific TYPO3 version, use the corresponding image tag in your
docker run
command. For example:
docker run -d -p 8080:80 --name typo3-demo \
--network typo3-demo-net \
-v "$(pwd)/fileadmin:/var/www/html/fileadmin" \
-v "$(pwd)/typo3conf:/var/www/html/typo3conf" \
-v "$(pwd)/typo3temp:/var/www/html/typo3temp" \
-v "$(pwd)/uploads:/var/www/html/uploads" \
martinhelmich/typo3:12.4
Check https://hub.docker.com/r/martinhelmich/typo3/tags for the full list of available versions.
Considerations for production
This guide demonstrates a quick and temporary setup for local development and testing purposes only.
It should not be used in production environments as is.