DVWA Docker Install Guide for Ubuntu, RHEL, Windows and Login
DVWA Docker Install Guide for Ubuntu, RHEL and Windows
Damn Vulnerable Web Application quick start

DVWA Docker Install Guide: Ubuntu, RHEL, Windows, Setup and Login

A complete, beginner-friendly DVWA tutorial with exact commands for Linux and Windows, one-click copying, browser setup, default login details, reset steps, and practical troubleshooting.

DVWA is a deliberately insecure PHP and MariaDB website for legal, local security practice. A first-time reader can use this page to understand the app, start it, create its database, sign in, and return later for the exact start, stop, log, and reset commands.

What is DVWA?

DVWA means Damn Vulnerable Web Application. It is a small training website that intentionally includes weaknesses such as SQL injection, cross-site scripting, command injection, weak authentication, and unsafe file handling. You run it on your own computer, use it only with permission, and compare how the same feature behaves at different security levels.

DVWA is maintained in the digininja GitHub repository and is listed in the OWASP Vulnerable Web Applications Directory. The Docker Compose files in that repository provide the most direct current setup.

Fastest methodOfficial repository plus Docker Compose
Access and first stepsBrowser setup: 127.0.0.1:4280/setup.php • First login: admin / password after database creation

Download, install, run and test DVWA

DVWA is an intentionally vulnerable PHP and MariaDB training site. The quickest reliable path is to install Docker, download the official repository, start its Compose stack, open the setup page, create the database, and then sign in.

Use only a local, isolated training machine. The commands bind the lab to your computer wherever the project supports a localhost binding. Do not publish these applications to the Internet.
Setup pagehttp://127.0.0.1:4280/setup.php
Login after setuphttp://127.0.0.1:4280/login.php — admin / password

Ubuntu: complete Bash installation

Open a Bash terminal and paste the full block. It installs every required package, downloads the current project or image, starts the lab, tests the web service, and prints the browser address.

Ubuntu — copy all commandsBash; run from a normal user account
Copy the whole block into the named terminal.

RHEL, Rocky Linux or AlmaLinux: complete Bash installation

Open Bash and paste the full block. These commands use and the Docker RHEL repository.

RHEL-family Linux — copy all commandsBash; RHEL 8/9, Rocky Linux or AlmaLinux
Copy the whole block into the named terminal.

Windows 10 or 11: complete cmd.exe installation

Open Command Prompt as Administrator. The first block installs Docker Desktop. If Windows requests a restart, restart, reopen , and paste the same block again.

Windows — copy all commandscmd.exe, not PowerShell
Copy the whole block into the named terminal.

Download and runtime alternatives

Download DVWA with wget instead of GitUse after installing wget and unzip
Copy the whole block into the named terminal.
Optional Podman Compose pathDocker Compose is the primary project-documented path
Copy the whole block into the named terminal.

pip: DVWA does not require Python or pip. Installing unrelated Python packages does not help this Docker setup.

DVWA local web security training environment

Your first five minutes inside DVWA

After login, start at DVWA Security and choose Low only for the first guided pass. Open one module, submit a harmless sample input, and watch how the application responds. Then increase the security level and compare the result. The value is not memorizing payloads; it is seeing how validation, authorization, session handling, and output encoding change observable behavior.

For repeatable learning, keep a short notebook with the page, request parameters, response status, visible result, and the defensive control that would prevent the weakness in a real application.

Keep the lab on your own computer or an isolated training network. These applications are intentionally insecure and should never be published on an Internet-facing server.

Troubleshooting that actually helps

ProblemWhat to checkFix
Port 4280 does not openContainer status and logsRun and inside the DVWA folder.
Database setup returns an errorDatabase container readinessWait 20 seconds, refresh setup.php, and run Create / Reset Database again.
Login failsDatabase initialization and credentialsConfirm the database was created, then use / .
Compose command is missingDocker Compose pluginRun ; reinstall Docker Compose if no version is shown.
Web application request and response security testing

How Ammune helps with production risks represented by DVWA

DVWA turns classic web weaknesses into visible request and response behavior. In production, the same patterns often appear through API endpoints, JSON parameters, tokens, object identifiers, and data-rich responses.

Runtime API visibility

Build an inventory from observed traffic and show which endpoints, methods, parameters, and response fields are actually in use.

Request and response context

Inspect both sides of an API transaction so analysts can see the input, returned data, status, identity context, and related behavior.

Operational response

Turn suspicious API activity into risk-ranked, SIEM-ready evidence that can support monitoring, investigation, and carefully controlled enforcement.

Training weaknessProduction API riskHow Ammune can help
SQL injection and command injectionUntrusted API input reaches a query, shell, or interpreter.Inspect request parameters and payloads, correlate suspicious patterns with endpoint behavior, and create evidence for monitoring or enforcement.
Weak authentication and session handlingStolen or abused credentials and tokens are reused across API calls.Track abnormal identity, token, endpoint, and behavior combinations and surface unusual authentication sequences.
XSS and unsafe outputUntrusted content is returned to browsers or downstream clients.Inspect response content and highlight unexpected executable content or sensitive data returned by an endpoint.
File and parameter abuseUnexpected files, fields, or values reach a sensitive function.Compare observed traffic with learned endpoint behavior and expose unusual methods, parameters, content types, or schema changes.

Related Ammune guidance: API runtime visibility API behavior analytics API security testing vs runtime monitoring OWASP Juice Shop Docker installation and login guide

A training lab demonstrates a weakness in isolation. Ammune is designed for production API environments, where protection depends on real traffic context, API behavior, identity, sensitive response data, and a safe deployment policy. No single control replaces secure coding, authorization design, egress controls, or incident response.

Verified project sources

The tutorial above is complete; these links are included for release history, project ownership, and future verification—not because you need to leave this page to finish the installation.

Frequently asked questions

Why is DVWA intentionally insecure?

It is a controlled teaching target designed to make common web weaknesses visible so learners can compare vulnerable behavior with safer implementation choices.

Is DVWA an OWASP-maintained project?

DVWA is maintained in the digininja repository and is listed in the OWASP Vulnerable Web Applications Directory; it is not maintained as an OWASP project.

Which DVWA security level should a beginner use?

Start with Low to understand the lesson, then repeat it at Medium and High to see how added controls change the request and response.

What should I record while using DVWA?

Record the endpoint, parameters, request method, response status, returned data and the security level so the lesson can be compared accurately.

What production lesson does DVWA teach?

Input validation, output encoding, authentication, file handling and command execution controls must be designed into the application and monitored at runtime.

Can Ammune replace secure coding?

No. Ammune adds production API visibility, behavior analysis and runtime evidence, but secure coding, authorization and incident response remain essential.

Apply the lessons from DVWA to real API traffic

Ammune helps security, DevSecOps, and SOC teams discover APIs, inspect requests and responses, identify abuse and data exposure, and turn runtime evidence into practical investigation or enforcement workflows.

© 2026 Ammune Security. Run deliberately vulnerable applications only in isolated, authorized training environments.