Overview
DVWA can be installed using several methods depending on your platform and preferences. This guide covers all installation options.Quick Start with Docker (Recommended)
The fastest and easiest way to get DVWA running is with Docker:Prerequisites
Install Docker and Docker Compose:Or download the ZIP file and extract it.
- Docker Desktop (Windows/Mac)
- Docker Engine (Linux)
Docker handles all dependencies automatically including PHP, Apache, and MariaDB. No manual configuration required!
Installation Methods by Platform
Choose the installation method that best fits your environment:Docker
Recommended for all platforms. Automated setup with containers.
XAMPP
Cross-platform stack for Windows, Mac, and Linux.
Linux Manual
Full control with Apache and MariaDB on Linux.
System Requirements
For Docker Installation
- Docker 20.10 or later
- Docker Compose v2.0 or later
- 2GB RAM minimum
- 1GB free disk space
For Manual Installation
- PHP 7.3 or later (8.x recommended)
- Apache 2.4 or later
- MariaDB 10.3+ or MySQL 5.7+ (MariaDB strongly recommended)
- 1GB RAM minimum
Required PHP Modules
For manual installations, ensure these PHP modules are installed:php-mysqli- MySQL database supportphp-gd- Image processing (required for file upload module)libapache2-mod-php- PHP integration with Apache
Database Considerations
MariaDB vs MySQL
We strongly recommend MariaDB over MySQL. MariaDB works out of the box, while MySQL requires additional configuration for PHP compatibility.
Why MariaDB?
- Drop-in replacement for MySQL
- Better PHP compatibility
- Actively maintained
- Used by default in most Linux distributions
Post-Installation Steps
After installing DVWA through any method:Configure DVWA
Copy the configuration template:Edit
config/config.inc.php with your database credentials.Set up the Database
- Access DVWA in your web browser
- Click Setup DVWA in the main menu
- Click Create / Reset Database
- Wait for the database initialization to complete
Optional: API Module Setup
The API vulnerability module requires additional setup:Install Composer
Download and install Composer:Install API Dependencies
Automated Installation Script
An unofficial automated installation script is available for Debian-based systems. Review the script before running it.
One-liner Installation
Verification
After installation, verify DVWA is working:- Access the login page at your configured URL
- Log in with admin/password
- Run database setup if not already done
- Access a vulnerability module like SQL Injection
- View source code to confirm installation is complete
Security Reminder
Next Steps
Once installed, configure DVWA for your needs:Configuration Guide
Configure database, security levels, and optional features
Quick Start
Learn how to use DVWA effectively
Security Levels
Understand the four security levels
Troubleshooting
Solve common installation problems
