-
-
Notifications
You must be signed in to change notification settings - Fork 48
4. Installation and Setup
Welcome to the Installation and Setup Guide for Nightingale! This guide walks you through building and running the Nightingale Docker image. It also provides additional Docker tips and tricks to help you maximize the potential of this powerful open-source tool.
Before you begin, ensure the following tools are installed on your system:
-
Clone the Repository
Clone the Nightingale repository using the following command:
git clone --depth 1 https://github.com/RAJANAGORI/Nightingale.git
The
--depth 1
option ensures only the latest commit is cloned, speeding up the process and saving space. -
Navigate to the Repository
Change your current directory to the Nightingale folder:
cd Nightingale
-
Build the Docker Image
Build the Docker image with the following command:
docker build -t rajanagori/nightingale:stable .
This command creates an image tagged as
rajanagori/nightingale:stable
. The.
at the end specifies the current directory containing theDockerfile
.
-
Clone the Repository
Follow the same cloning step as described above.
-
Navigate to the ARM64 Directory
Change to the directory for ARM architecture:
cd Nightingale/architecture/arm64/v8
-
Build the ARM64 Image
Use the following command to build the Docker image for ARM architecture:
docker buildx build --platform linux/arm64 -t rajanagori/nightingale:arm64 .
This command uses
buildx
to build an image compatible with ARM64 systems.
If you prefer not to build the image yourself, pre-built images are available for both AMD and ARM64 architectures.
-
Pull the Stable Release
Use the following command to pull the pre-built image:
docker pull ghcr.io/rajanagori/nightingale:stable
-
Run the Container
Start the container interactively:
docker run -ti --hostname nightingale ghcr.io/rajanagori/nightingale:stable /bin/bash
This command gives you terminal access to the container. The
--hostname
flag sets the container’s hostname tonightingale
. -
Access the Container via Browser
To access the terminal in a browser, run:
docker run -it -p 8080:7681 -d ghcr.io/rajanagori/nightingale:stable ttyd -p 7681 bash
Open http://localhost:8080 in your browser.
After logging in, activate Python and Go modules:
activate python activate go
-
Run MobSF
To use MobSF alongside Nightingale:
docker run -it -p 8080:7681 -p 8081:8081 -d ghcr.io/rajanagori/nightingale:stable ttyd -p 7681 bash cd /home/tools_mobile_vapt/Mobile-Security-Framework-MobSF/ source venv/bin/activate ./run 0.0.0.0:8081 &
Ports 8080 and 8081 on the host map to 7681 and 8081 in the container.
-
Bind Host Directories to the Container
Use the following command to mount a host directory into the container:
docker run -it -p 8080:7681 -p 8081:8081 -v /<your_host_directory>:/<your_container_directory> -d ghcr.io/rajanagori/nightingale:stable ttyd -p 7681 bash
Follow the same steps as above, replacing the stable
tag with arm64
.
If you prefer not to run Nightingale by creating Docker image in the local, you can download our pre-compiled Go binaries optimized for your platform and setup the Nightingale locally using our build images directly.
We ship one binary per OS/architecture:
-
nightingale-go-linux-amd64
→ Linux on Intel/AMD (x86_64) -
nightingale-go-linux-arm64
→ Linux on ARM (Raspberry Pi) -
nightingale-go-mac-amd64
→ macOS on Intel Macs -
nightingale-go-mac-arm64
→ macOS on Apple Silicon (M1/M2/M3) -
nightingale-go-win-amd64.exe
→ Windows on Intel/AMD (x86_64)
-
Make it executable & move into your PATH:
mv nightingale-go-{OS}-{ARCH} nightingale chmod +x nightingale sudo mv nightingale /usr/local/bin/nightingale
To secure Nightingale’s web UI on localhost
, generate a self-signed cert:
mkdir -p nginx/certs
openssl req -x509 -nodes -newkey rsa:4096 \
-days 365 \
-keyout nginx/certs/selfsigned.key \
-out nginx/certs/selfsigned.crt \
-subj "/C=US/ST=State/L=City/O=MyOrg/OU=Dev/CN=localhost"
openssl req -x509 -nodes -newkey rsa:4096 -days 365 -keyout selfsigned.key -out selfsigned.crt -subj "/C=US/ST=State/L=City/O=MyOrg/OU=Dev/CN=localhost"
-
Private key:
selfsigned.key
-
Certificate:
selfsigned.crt
- Customize the
-subj
fields (C
,ST
,L
,O
,OU
,CN
) to match your org or domain.
see the .env file in the docker compose folder
- .env.arm64.example // for arm64
- .env.amd64.example // for amd64
docker-compose --env-file .env.amd64 -f docker-compose.yml up -d
docker-compose --env-file .env.arm64 -f docker-compose.yml up -d
This command starts Nightingale with the generated TLS certificate. You can access it via http://nightingale
.
Once you have accessed the terminal via localhost:8080
, you can use the activate
command to enable additional tools.
To view the available options, type the following command:
activate --help
Usage: /usr/local/bin/activate [option]
Options:
zsh Activate Zsh
metasploit Activate Metasploit
python Activate Python modules
go Activate Go modules
--help Display this help message
--list List available tools
- To activate Zsh:
Run the following command:
activate zsh
This will install and activate Zsh for your container.
- To activate Metasploit:
Run the following command:
activate metasploit
Understanding environment variables is crucial for configuring and running Nightingale effectively. Below is a list of common environment variables and their purposes:
-
TZ
: Sets the timezone for the container. -
DOCKER_REGISTRY
: Specifies the Docker registry to pull images from. -
USERNAME
: Sets the username for the Github Account. -
TOKEN
: Sets the token for the Github Account. -
COMMIT_HASH
: Sets the commit hash for the Github Account. -
TOOLS_WEB_VAPT
: Sets the directory for web vulnerability assessment tools. -
BINARIES
: Sets the directory for binaries. -
GREP_PATTERNS
: Sets the directory for Grep patterns. -
TOOLS_OSINT
: Sets the directory for OSINT tools. -
TOOLS_MOBILE_VAPT
: Sets the directory for mobile vulnerability assessment tools. -
TOOLS_NETWORK_VAPT
: Sets the directory for network vulnerability assessment tools. -
TOOLS_RED_TEAMING
: Sets the directory for red teaming tools. -
TOOLS_FORENSICS
: Sets the directory for forensics tools. -
WORDLIST
: Sets the directory for wordlists. -
METASPLOIT_CONFIG
: Sets the directory for Metasploit configuration. -
METASPLOIT_TOOL
: Sets the directory for Metasploit tools. -
SHELLS
: Sets the directory for shells.
Make sure to set these variables appropriately to ensure optimal performance and functionality of Nightingale.
-
List Running Containers
docker ps
-
Stop a Running Container
docker stop <container_id>
-
Remove a Container
docker rm <container_id>
-
View Logs
docker logs <container_id>
-
Access a Running Container’s Shell
docker exec -it <container_id> /bin/bash
-
Stop and Remove All Containers
docker stop $(docker ps -q)docker rm $(docker ps -a -q)
-
Persistent Data Using Volumes
docker run -ti -v <host_dir>:<container_dir> ghcr.io/rajanagori/nightingale:stable /bin/bash
-
Run Containers in Detached Mode
docker run -d -p <host_port>:<container_port> ghcr.io/rajanagori/nightingale:stable /bin/bash
-
Set Environment Variables
docker run -e <ENV_VAR>=<value> -p <host_port>:<container_port> ghcr.io/rajanagori/nightingale:stable /bin/bash
-
Access Host Network
docker run --network host -p <host_port>:<container_port> ghcr.io/rajanagori/nightingale:stable /bin/bash
-
Auto-Remove Containers
docker run --rm -p <host_port>:<container_port> ghcr.io/rajanagori/nightingale:stable /bin/bash
-
Assign a Name to Containers
docker run --name <container_name> -p <host_port>:<container_port> ghcr.io/rajanagori/nightingale:stable /bin/bash
This guide should make it easier to install, configure, and get started with Nightingale. Feel free to contribute or raise issues on the GitHub repository.
Happy testing!