Classic TYPO3 demo installation using Docker only

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.

Quick start

To quickly launch TYPO3 in classic mode with Docker:

 /projects/typo3demo/$
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
Copied!
 /projects/typo3demo/$
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
Copied!
 /projects/typo3demo/$
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
Copied!

If you are working on Linux or WSL, see Solving file permission issues.

Then open:

http://localhost:8080
Copied!

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

Step-by-step Docker setup

1. Prepare a project directory

Create a local project directory and subfolders for TYPO3's writable directories:

 /projects/$
mkdir -p typo3demo
cd typo3demo
mkdir -p fileadmin typo3conf typo3temp
# On Linux and WSL during development: Ensure TYPO3 can write to these directories
# chmod -R 777 fileadmin typo3conf typo3temp
Copied!

2. Create a user-defined Docker network

 /projects/typo3demo/$
docker network create typo3-demo-net
Copied!

3. Start the MariaDB database container

 /projects/typo3demo/$
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
Copied!

4. Start the TYPO3 container with mounted writable directories

 /projects/typo3demo/$
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
Copied!

If you are working on Linux or WSL, see Solving file permission issues.

5. Access TYPO3 in your browser

Open:

http://localhost:8080
Copied!

Use these database settings:

  • Database Host: typo3db
  • Username: db
  • Password: db
  • Database Name: db

6. Project directory structure after setup

  • fileadmin/
  • typo3conf/
  • typo3temp/

7. Stopping and restarting the containers

To stop TYPO3, run:

docker stop typo3-demo
Copied!

To stop and remove the database:

 /projects/typo3demo/$
docker stop typo3db
Copied!

To restart the database:

 /projects/typo3demo/$
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
Copied!

Then restart TYPO3:

 /projects/typo3demo/$
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
Copied!

Resetting the environment

To reset your TYPO3 demo environment completely, run the following script.

 /Projects/typo3site/$
# 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
Copied!

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.

 /projects/typo3demo/$
docker exec -it typo3-demo /bin/bash
Copied!

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/sysext/core/bin/typo3 script.

To run console commands in the running container, use:

 /projects/typo3demo/$
docker exec -it typo3-demo /var/www/html/typo3/sysext/core/bin/typo3
Copied!

For example, to list available commands:

 /projects/typo3demo/$
docker exec -it typo3-demo /var/www/html/typo3/sysext/core/bin/typo3 list
Copied!

Flush all caches:

 /projects/typo3demo/$
docker exec -it typo3-demo /var/www/html/typo3/sysext/core/bin/typo3 cache:flush
Copied!

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-data (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
Copied!

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/typo3 image runs the latest available TYPO3 LTS release (at the time of writing 13.4.*) when using the latest tag.

To run a specific TYPO3 version, use the corresponding image tag in your docker run command. For example:

Run TYPO3 version 12.4
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
Copied!

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.