Run OWASP WebGoat Safely and Learn Web Security Locally
Use a loopback-only Docker setup for WebGoat and WebWolf, create a practice account, work through lessons, and connect observations to defenses.
Run OWASP WebGoat Safely and Learn Web Security Locally
OWASP WebGoat is an intentionally vulnerable application designed to teach web security in a controlled lab. Run WebGoat and its companion app WebWolf in Docker with ports bound to 127.0.0.1, create a practice account, and study one lesson at a time by connecting the cause, request, and defense. Never expose this vulnerable server to the internet or send exercises to systems without permission.
This guide reflects WebGoat v2026.5 and official documentation checked on November 23, 2026. It focuses on Docker and does not claim that the container was run here. Official releases
What do WebGoat and WebWolf do?
WebGoat connects explanations with practice exercises for common application security flaws. Lessons cover many OWASP Top 10 topics and more. The purpose is training, demonstrations, and controlled evaluation of security tools; WebGoat is not a scanner that finds flaws in your production application. OWASP lessons, OWASP Developer Guide
WebWolf is a companion app that represents the attacker’s side of some lessons. It can host a file, show incoming requests, and provide JWT tools. WebGoat uses port 8080 and WebWolf uses 9090 in the default container. Starting with version 2026.3, mail features moved from WebWolf into WebGoat, so older tutorials may describe screens that have changed. WebWolf overview, release notes
Start a local Docker lab
You need Docker Engine or Docker Desktop running and a current browser. Pinning the verified v2026.5 image makes the lab easier to reproduce. These mappings bind the apps only to the computer’s loopback interface.
docker pull webgoat/webgoat:v2026.5
docker run -d --name webgoat -p 127.0.0.1:8080:8080 -p 127.0.0.1:9090:9090 webgoat/webgoat:v2026.5Open http://localhost:8080/WebGoat. The root URL / does not serve the app; include /WebGoat. Create a lab-only account on the login screen. When the lesson list appears, WebGoat is ready. Open http://localhost:9090/WebWolf when a lesson calls for it. Use the account created in WebGoat. Docker instructions, login and WebWolf guide
Check the container with docker ps and startup messages with docker logs -f webgoat. Startup can take a little time. Stop it with docker stop webgoat, then resume with docker start webgoat. Removing the container also removes its practice accounts and progress, so use docker rm -f webgoat only when you want a full reset. Container restart behavior
If host port 8080 or 9090 is occupied, change the host-side port only. For example, map WebGoat with -p 127.0.0.1:8081:8080 and open http://localhost:8081/WebGoat; keep the container-side port 8080. If Docker reports a name conflict, inspect docker ps -a. Resume an existing container, or remove it only if you can discard its saved state.
Learn and verify one lesson
Read the lesson goal first. Observe the request and response in browser developer tools or a local proxy, then form a hypothesis about which input or server state changes the result. Change one condition at a time inside the lesson’s permitted lab and check whether the response and lesson progress behave as expected. Finish by recording why the flaw occurs and how server-side validation, authorization checks, or safe output handling would prevent it. Being able to explain the path from input through server processing to response is a stronger check than changing strings at random.
As a hypothetical access-control example, note which user role and requested resource should affect authorization. Compare only requests allowed by the lesson, explain the difference, and connect it to checking permission on every server request. This illustrates a learning method; it is not a claim about a particular lesson screen or result. Lesson names and interfaces can change, so follow the installed version. Lesson list
For lessons that use WebWolf, confirm both apps point to the same local instance. Its file hosting and request-capture page simulate actions required by some exercises. Mail functionality moved into WebGoat in version 2026.3, so prefer the installed lesson’s guidance over older tutorials. WebWolf functions, release notes
Connect a local proxy carefully
For a first session, direct access through localhost is simpler. If you need to inspect traffic through a proxy, the WebGoat README documents custom host names. Add this line to your operating system’s hosts file and keep Docker ports bound to loopback:
127.0.0.1 www.webgoat.local www.webwolf.localStart the container with those host names:
docker run -d --name webgoat -p 127.0.0.1:8080:8080 -p 127.0.0.1:9090:9090 -e WEBGOAT_HOST=www.webgoat.local -e WEBWOLF_HOST=www.webwolf.local webgoat/webgoat:v2026.5Then visit http://www.webgoat.local:8080/WebGoat/ and inspect the local requests in your proxy. Do not bind either port to a public interface or 0.0.0.0. Check that the destination is your local lab before sending a request. WebGoat’s README warns that the vulnerable program can put the host at risk and recommends disconnecting from the internet while it runs. If a proxy is unnecessary for the learning goal, stay with the basic local setup. Proxy host configuration, security warning
Troubleshoot safely
For a connection error, check `docker ps` and review `docker logs webgoat` for startup or port errors.
If the app page is missing, include `/WebGoat`; WebWolf uses `/WebWolf`.
If the container name already exists, check whether it is stopped and resume it with `docker start webgoat`. Delete it only when you intend to lose its saved account and progress.
Source and JAR installations can require different Java versions and port settings. The v2026.5 release line uses Java 25; check the official instructions that match the installed release. [Latest releases](https://github.com/WebGoat/WebGoat/releases), [README](https://github.com/WebGoat/WebGoat/blob/main/README.md)
A lesson completion mark records practice progress; it does not certify that a real application is secure. For each exercise, record the preconditions and the corresponding server-side defense. Stop the container when finished and confirm its ports remain local. Practice only on systems you own or are explicitly authorized to test.
References
[OWASP WebGoat project and Docker quick start](https://owasp.org/projects/webgoat?tab=start)
[Official WebGoat README](https://github.com/WebGoat/WebGoat/blob/main/README.md)
[OWASP Developer Guide: WebGoat and WebWolf](https://devguide.owasp.org/en/07-training-education/01-vulnerable-apps/02-webgoat/)
[WebWolf overview](https://owasp.org/projects/webgoat?tab=webwolf)
[WebGoat releases](https://github.com/WebGoat/WebGoat/releases) and [release notes](https://github.com/WebGoat/WebGoat/blob/main/RELEASE_NOTES.md)