Factory reset

This guide shows you how to factory reset your Infection Monkey installation. This is useful if you forgot your credentials to access Monkey Island or want a fresh start.

When the Monkey Island starts for the first time, it creates a data directory where it stores all of its data if one does not already exist. Performing a factory reset involves the following steps:

  1. Shut down the Monkey Island (if it's running).
  2. Delete the data directory.
  3. Restart the Monkey Island.
  4. Access the Monkey Island and register a new user.

📘

Factory resent deletes all data

Performing a factory reset will delete all of the data that Infection Monkey has collected and generated, including the Monkey Island user account, reports, and configurations.

For AppImage (Linux) installations

  1. Stop the Monkey Island.

    If the Monkey Island is in installed as a systemd service, run:

    $ sudo systemd stop infection-monkey.service
    

    Otherwise, navigate to the terminal where you started the Monkey Island and enter <CTRL>+C.

  2. Locate and delete the data directory.

    By default, the data directory is located at$HOME/.monkey_island/. To remove it, run the following command:

    rm -r $HOME/.monkey_island/
    
  3. Restart the Monkey Island.

    If the Monkey Island is installed as a systemd service, run:

    sudo systemd start infection-monkey.service
    

    Otherwise, navigate to the directory where the Monkey Island AppImage is and start it with:

    ./InfectionMonkey-<VERSION>.AppImage
    
  4. Use your browser to navigate to https://localhost:5000 (modify the host as necessary) and register a new user.

For Docker installations

  1. Stop the Monkey Island:

    sudo docker kill monkey-island monkey-mongo
    
  2. Delete the MongoDB docker volume:

    sudo docker volume rm monkey-db
    
  3. Delete the Monkey Island container:

    sudo docker rm monkey-island
    
  4. Remove any other volumes that may be associated with Infection Monkey. You can discover other volumes with the command:

    sudo docker volume ls
    

    You can remove the volumes with the command:

    sudo docker volume rm <VOLUME_NAME>
    
  5. Restart the MongoDB container:

    sudo docker run \
        --name monkey-mongo \
        --network=host \
        --volume monkey-db:/data/db \
        --detach \
        mongo:6.0
    
  6. Restart the Monkey Island container

    sudo docker run \
        --name monkey-island \
        --network=host \
        infectionmonkey/monkey-island:latest
    
  7. Use your browser to navigate to https://localhost:5000 (modify the host as necessary) and register a new user.

For Windows installations

  1. Stop Monkey Island. Locate the command window that Monkey Island started in. Click the x at the top right corner of the window to shut down Monkey Island.

  2. Locate and delete the data directory.

    By default, the data directory is located at %AppData%\monkey_island\.
    Remove the directory entirely by using the File Explorer.

  3. Restart the Monkey Island.

    Locate the Infection Monkey icon on your desktop and double-click it, or search "MonkeyIsland" in the Start menu and click the Infection Monkey icon.

  4. Use your browser to navigate to https://localhost:5000 (modify the host as necessary) and register a new user.