DVWA Docker Install Guide: Ubuntu, RHEL, Windows & Login
DVWA Docker Install Guide for Linux & Windows
Official-source setup • Updated August 4, 2026

DVWA Docker Install Guide for Ubuntu, RHEL and Windows

Install Damn Vulnerable Web Application in a controlled local lab. This guide uses the official DVWA repository, Docker Compose, the safe localhost binding, the current database setup flow, and the documented default login.

DVWA is a deliberately insecure PHP and MariaDB application for legal web-security training. It is useful because it gives students, developers and defenders a predictable target on a computer they control. The application should never be treated like an ordinary development site or exposed to the public internet.

Fast answer: install Docker, clone the official digininja/DVWA repository, run docker compose up -d, open http://localhost:4280/setup.php, create the database, and sign in with admin / password.

How to Install DVWA Quickly with Docker Compose

The official repository provides a Compose configuration that starts the web application and its MariaDB database together. It publishes the application on 127.0.0.1:4280, which means the site is reachable from the same computer but not from other devices by default. That loopback binding is an important safety control, not an inconvenience to remove.

Copy a verified quick-start workflow

Run these commands in a terminal on the computer where you will open the browser. The configuration check catches malformed Compose changes before the containers start, and the commit command records the exact source revision used by your lab.

Open local setup

Command tools ready

docker version
docker compose version

git clone https://github.com/digininja/DVWA.git
cd DVWA
git rev-parse HEAD

docker compose config
docker compose up -d
docker compose ps

1. Confirm the services

Run docker compose ps. Wait until the web and database services are running before opening the setup page.

2. Create the database

Open setup.php and select Create / Reset Database.

3. Sign in

Open login.php and enter admin / password.

4. Stop after use

Run docker compose down. Use down -v only when a complete database reset is intended.

DVWA Docker installation workflow using the official repository and localhost-only access

What Is DVWA, and Why Do People Call It OWASP DVWA?

DVWA stands for Damn Vulnerable Web Application. It is an intentionally insecure web application with multiple difficulty levels and source-view features that help learners connect browser behavior to server-side implementation decisions. The official OWASP Vulnerable Web Applications Directory describes it as a PHP and MariaDB application for legal training in a controlled environment.

The phrase OWASP DVWA is a common search term, but the project relationship should be stated accurately. DVWA is maintained in the digininja/DVWA GitHub repository. OWASP lists the application in its Vulnerable Web Applications Directory; OWASP does not maintain the DVWA source repository.

Best use

Controlled training, secure-coding demonstrations, classroom exercises and defensive tool validation on systems you own.

What it teaches

Input handling, output encoding, authentication, session behavior, file operations, server configuration and defensive verification.

What it does not replace

A complete secure-development curriculum, production penetration test, API-security program or current application verification standard.

Where it belongs

Localhost, an isolated disposable VM or a supervised classroom network with synthetic data and explicit authorization.

Safety Rules Before You Start DVWA

DVWA is designed to contain weaknesses. Its safety depends on the boundary around it. A normal web application may be hardened for shared networks; DVWA deliberately is not.

ControlWhy it mattersRecommended practice
Network bindingPublic or LAN exposure creates an avoidable vulnerable serviceKeep 127.0.0.1:4280:80
DataTraining modules can display, store or log supplied valuesUse synthetic accounts and sample data only
Host separationA vulnerable lab should not share a sensitive serverUse a workstation or disposable VM
AuthorizationTraining does not grant permission to test other systemsUse only assets you own or are authorized to test
Session lifecycleThe Compose file can restart services automaticallyRun docker compose down after each session
CredentialsThe documented login is intentionally weakNever reuse real passwords or secrets
Do not remove the loopback address just to access DVWA from another computer. A supervised class that genuinely needs shared access should use an isolated private network, a temporary host, explicit firewall rules and a shutdown plan. Public exposure is not an acceptable shortcut.

Official DVWA Download, Current Release and Source Options

The official README says that the only supported version is the latest source from the official GitHub repository. On August 4, 2026, the latest tagged release shown on the official Releases page is DVWA 2.5, released January 29, 2025. That release added an OpenAPI and vulnerable-API module, while the repository's master branch may include later changes.

SourceBest useRecommendation
Official repositoryCurrent supported source and documentationPreferred starting point
Official GitHub ZIPInstallation without GitUseful on Windows
Tagged releasesRepeatable version selection and release notesLatest tag verified: 2.5
Official Compose fileReview services, volumes and port bindingInspect before changing
Issue trackerKnown setup problems and recent reportsCheck before opening a new issue
Unofficial public DVWA siteRemote practiceAvoid; use a local lab
Old ISO or vulnerable VM collectionLegacy workshopsReview carefully; may be outdated

For a personal lab, the current repository is usually the simplest choice. For a course or repeatable workshop, choose a tag or commit and record it with git rev-parse HEAD. This makes troubleshooting easier because every participant starts from the same source revision.

Install DVWA on Ubuntu, RHEL and Windows

If Docker and Docker Compose already work, skip directly to cloning or downloading DVWA. Otherwise, use the installation method documented by Docker for the operating system rather than relying on an old third-party script.

Ubuntu: Install Docker Engine and DVWA

Docker's current Ubuntu documentation supports maintained 64-bit Ubuntu releases and warns that published container ports can bypass some host firewall rules. DVWA's loopback binding reduces that exposure, but you should still review the Compose configuration before starting it.

sudo apt update
sudo apt install -y ca-certificates curl git
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

sudo tee /etc/apt/sources.list.d/docker.sources > /dev/null <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF

sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
sudo docker run --rm hello-world

git clone https://github.com/digininja/DVWA.git
cd DVWA
git rev-parse HEAD
sudo docker compose config
sudo docker compose up -d
sudo docker compose ps

Official reference: Install Docker Engine on Ubuntu. If Docker is already installed through another source, review Docker's conflicting-package guidance before replacing it.

RHEL: Install Docker Engine and DVWA

Use a maintained Red Hat Enterprise Linux release supported by Docker's current documentation. Review any existing Podman compatibility packages or older Docker packages before installing Docker Engine from Docker's repository.

sudo dnf -y install dnf-plugins-core git
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
sudo docker run --rm hello-world

git clone https://github.com/digininja/DVWA.git
cd DVWA
git rev-parse HEAD
sudo docker compose config
sudo docker compose up -d
sudo docker compose ps

Official reference: Install Docker Engine on RHEL.

Windows 10 or Windows 11: Docker Desktop and PowerShell

Docker Desktop supports Windows 10 and Windows 11 when its current system requirements are met. The WSL 2 backend is the default and meets the needs of most users. Start Docker Desktop and confirm that Linux containers are active before running the commands below.

wsl --version
wsl --update

docker version
docker compose version

Invoke-WebRequest -Uri https://github.com/digininja/DVWA/archive/refs/heads/master.zip -OutFile DVWA-master.zip
Expand-Archive -Path .\DVWA-master.zip -DestinationPath . -Force
Set-Location .\DVWA-master

docker compose config
docker compose up -d
docker compose ps
Start-Process http://localhost:4280/setup.php

Official references: Install Docker Desktop on Windows and Docker Desktop WSL 2 backend.

Kali Linux and other Debian-based systems

DVWA's official README includes troubleshooting notes for Debian-based distributions, including Kali. For a clean installation, use Docker's supported packages for the underlying distribution where possible. Do not mix several Docker or container-engine package sources without understanding which daemon and Compose plugin your terminal is using.

Cross-platform DVWA Docker setup on Ubuntu RHEL and Windows using the same official source

DVWA Database Setup, Browser URLs and Default Login

Starting the containers does not automatically create the application tables and sample data. Complete the setup page before expecting the documented login to work.

Default account

admin / password

  1. Wait for both services to start and confirm them with docker compose ps.
  2. Open /setup.php and select Create / Reset Database.
  3. Allow the setup process to finish and follow the redirect, or open /login.php.
  4. Enter the lowercase username admin and password password.
  5. Confirm that the module menu, security-level control and source-view features are available.
  6. Use only synthetic lab data and stop the containers after the session.
Why the login may fail: the documented credentials depend on the database being initialized. If admin / password is rejected on a fresh lab, return to /setup.php and create or reset the database before changing anything else.

Use a Tag or Commit for Repeatable DVWA Classes

Cloning the master branch gives you the latest supported source, but a course taught over several weeks benefits from a fixed revision. Otherwise, two learners may receive different files if the repository changes between installations.

ApproachAdvantagesTrade-off
Current master branchLatest supported source and recent fixesMay change between installations
Tagged release 2.5Stable, named release with published notesGood for repeatable workshops
Recorded commitExact source revision for every learnerBest reproducibility
# Record the exact current revision
git rev-parse HEAD
git status --short

# Show available tags
git tag --sort=-version:refname | head

# Optional: use the 2.5 release for a repeatable lab
git checkout 2.5

docker compose config
docker compose pull
docker compose up -d

Store the commit or tag in the workshop instructions together with the Docker versions and the date the commands were verified. Do not assume that an old exported command sheet will remain accurate forever.

DVWA Start, Stop, Logs, Update and Reset Commands

Run these commands from the directory containing compose.yml. On Linux, keep sudo unless your account is intentionally configured for Docker access; membership in the Docker group is effectively high privilege on the host.

# Validate and start
docker compose config
docker compose up -d
docker compose ps

# Review recent logs
docker compose logs --tail=150

# Stop without deleting the database volume
docker compose down

# Update the current branch and refresh images
git pull --ff-only
docker compose pull
docker compose up -d

# Completely reset the disposable lab
docker compose down -v
docker compose up -d

docker compose down -v deletes the named database volume. Use it only when no lab data needs to be preserved. The reset is useful for a disposable training environment, but it is not a normal production database procedure.

DVWA Troubleshooting: Common Problems and Exact Checks

localhost:4280 does not open

Confirm Docker is running, validate the Compose file, check service state and review recent logs. The web application may take a short time to become ready while MariaDB initializes.

docker version
docker compose version
docker compose config
docker compose ps
docker compose logs --tail=150

# Linux: check the local listening port
sudo ss -ltnp | grep ':4280' || true

# Windows PowerShell: check the local listening port
Get-NetTCPConnection -LocalPort 4280 -ErrorAction SilentlyContinue

Port 4280 is already in use

Change only the host-side port and preserve the loopback address. For example, change 127.0.0.1:4280:80 to 127.0.0.1:8806:80, run docker compose up -d, and open http://localhost:8806.

The setup page loads, but database creation fails

Review the database service in docker compose ps and inspect its logs. On a disposable lab with nothing to preserve, a full volume reset can remove stale or incomplete database state.

The default login is rejected

Use lowercase admin and password. Return to /setup.php, create or reset the database, then retry in a private browser window if old localhost cookies are interfering.

Docker permission is denied on Linux

Use sudo docker ... as shown above. Docker documents an optional non-root configuration, but adding a user to the Docker group grants powerful host access. Review the official Linux post-installation guidance before making that change.

Another device cannot connect

This is the expected behavior of the safe default. The official configuration uses 127.0.0.1. Do not publish the deliberately vulnerable application to the internet. Use an isolated classroom network only when shared access is an explicit and supervised requirement.

A clean reset does not solve the problem

Record the operating system, Docker version, Compose version, Git commit, output of docker compose ps and relevant logs. Compare the issue against the official issue tracker before opening a new report.

How to Use DVWA as a Safe Learning Lab

A strong exercise should end with a defensive lesson, not merely an unexpected browser result. Keep every test inside the DVWA environment and use a repeatable workflow that connects behavior, source code, mitigation and evidence.

  1. Record normal behavior. Note the page, request method, inputs, status code and expected response.
  2. Change one controlled variable. Avoid broad automated activity and remain inside the selected module.
  3. Compare security levels. Observe how the implementation changes between the available levels.
  4. Read the source view. Identify the missing or improved server-side control.
  5. Describe the root cause. Distinguish weak validation, unsafe interpretation, missing authorization, insecure configuration or another underlying problem.
  6. Write the prevention. Explain the secure design or coding control that should replace the vulnerable behavior.
  7. Define useful evidence. Identify the minimum request, response, identity and timing fields a defender would need without copying secrets into logs.
  8. Reset and retest. Confirm the corrected behavior and record the result.
DVWA is a teaching target, not a complete security standard. Use it to understand individual concepts, then use current requirements and testing guidance to verify real applications.

The current released OWASP Top 10 is the 2025 edition. DVWA remains useful for classic web-security concepts, but its module list should not be presented as a complete implementation of every modern Top 10 category. For broader practice, compare it with OWASP Juice Shop and review the OWASP Top 10 with practical examples.

Defensive DVWA learning workflow connecting controlled web tests to root-cause analysis and verification

DVWA Installation and Safety Checklist

CheckExpected evidenceStatus
Official sourceRepository URL is github.com/digininja/DVWARequired
Recorded revisionGit tag or commit saved for the labRecommended
Docker readinessdocker version and docker compose version succeedRequired
Safe port bindingCompose retains 127.0.0.1:4280:80Required
Configuration validationdocker compose config completes without errorRequired
Healthy servicesWeb and database services appear in docker compose psRequired
Database initializationCreate / Reset Database completes through setup.phpRequired
Loginadmin / password works after setupRequired
Data hygieneOnly synthetic values are usedRequired
Shutdowndocker compose down is run after the sessionRequired

Primary Sources Used for This Guide

Frequently Asked Questions About DVWA Installation and Login

What is DVWA, and is it an OWASP project?

DVWA stands for Damn Vulnerable Web Application. It is an intentionally insecure PHP and MariaDB training application maintained in the digininja/DVWA GitHub repository. It is listed in the OWASP Vulnerable Web Applications Directory, but it is not maintained as an OWASP project.

What is the fastest safe way to install DVWA?

Install Docker and Docker Compose, clone the official digininja/DVWA repository, run docker compose up -d from the DVWA directory, and open http://localhost:4280/setup.php. Keep the official 127.0.0.1 binding so the lab remains local to the computer.

Where should I download DVWA?

Use the official digininja/DVWA GitHub repository or its GitHub ZIP. The project README states that the supported version is the latest source from that repository. Avoid unofficial mirrors and old repackaged virtual machines unless you have independently reviewed them.

What is the latest tagged DVWA release?

The latest tagged release visible on the official GitHub Releases page on August 4, 2026 is DVWA 2.5, released January 29, 2025. The master branch may contain fixes or changes made after that tag, so record the commit when you need a repeatable class or workshop.

How do I run DVWA with Docker Compose?

From the official DVWA repository directory, run docker compose config, docker compose up -d, and docker compose ps. Open http://localhost:4280/setup.php, create or reset the database, and then sign in through http://localhost:4280/login.php.

What URL opens DVWA after Docker starts?

Open http://localhost:4280 on the same computer that runs Docker. Use http://localhost:4280/setup.php for initial database setup and http://localhost:4280/login.php for direct sign-in after setup is complete.

How do I install DVWA on Ubuntu?

Install Docker Engine and the Docker Compose plugin using Docker's official Ubuntu repository instructions, install Git, clone the official DVWA repository, enter the DVWA directory, and run sudo docker compose up -d. Then open localhost:4280 on the same machine.

How do I install DVWA on RHEL?

Install Docker Engine, the Docker Compose plugin, and Git using Docker's official RHEL repository instructions. Start Docker, clone the official DVWA repository, run sudo docker compose up -d from the DVWA folder, and open localhost:4280.

How do I install DVWA on Windows?

Install and start Docker Desktop in Linux-container mode, normally with the WSL 2 backend. Download the official repository ZIP or clone it with Git, open PowerShell in the extracted DVWA folder, run docker compose up -d, and open localhost:4280/setup.php.

What is the DVWA default login?

The default DVWA username is admin and the default password is password. First create or reset the database from setup.php, then sign in through login.php. Use these credentials only inside the disposable local lab.

Why does localhost:4280 not open?

Confirm Docker is running, run docker compose ps, and review docker compose logs --tail=150. Check whether another process already uses port 4280. The official compose file binds the site to 127.0.0.1, so another computer will not be able to reach it by default.

How do I reset or remove DVWA?

Run docker compose down to remove the containers and network while keeping the database volume. Run docker compose down -v only when you intentionally want to delete the disposable database and perform a complete reset. Start again with docker compose up -d.

Connect controlled lab lessons to production security

DVWA helps teams understand individual web-security failures in a disposable environment. Production programs also need asset inventory, secure design requirements, testing, runtime visibility, incident evidence and controlled response across real applications and APIs.

DVWA, OWASP VWAD and Docker guidance reviewed August 4, 2026. Use DVWA only on systems you own or are explicitly authorized to test, keep it on localhost or an isolated lab network, and recheck official documentation before reusing saved commands.