How to install and configure WebGoat in Ubuntu Server 16.04 / Ubuntu 18.04

First update the repository and upgrade system

    sudo apt-get update
    sudo apt-get upgrade

Now install the Java runtime environment in Ubuntu Server

    sudo apt-get install default-jre

Check the version of JRE

    java -version

Now download WebGoat from:


Now if the java version you have installed is 8 or less then use the below command to run webgoat

    java -jar webgoat-server-8.0.0.M21.jar

Or if your java version is 9 or higher then 9 then use the below command to run it :

   java --add-modules java.xml.bind -jar webgoat-server-8.0.0.M21.jar

Now open up browser and navigate to WebGoat


we can also start WebGoat with a shell script
 java --add-modules java.xml.bind -jar webgoat-server-8.0.0.M21.jar  

    chmod +x