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:
- Shut down the Monkey Island (if it's running).
- Delete the data directory.
- Restart the Monkey Island.
- 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
-
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
. -
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/
-
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
-
Use your browser to navigate to
https://localhost:5000
(modify the host as necessary) and register a new user.
For Docker installations
-
Stop the Monkey Island:
sudo docker kill monkey-island monkey-mongo
-
Delete the MongoDB docker volume:
sudo docker volume rm monkey-db
-
Delete the Monkey Island container:
sudo docker rm monkey-island
-
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>
-
Restart the MongoDB container:
sudo docker run \ --name monkey-mongo \ --network=host \ --volume monkey-db:/data/db \ --detach \ mongo:6.0
-
Restart the Monkey Island container
sudo docker run \ --name monkey-island \ --network=host \ infectionmonkey/monkey-island:latest
-
Use your browser to navigate to
https://localhost:5000
(modify the host as necessary) and register a new user.
For Windows installations
-
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.
-
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. -
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.
-
Use your browser to navigate to
https://localhost:5000
(modify the host as necessary) and register a new user.
Updated 6 months ago