
A Step-by-Step Guide to Deploying Velociraptor on Ubuntu for Advanced Endpoint Monitoring
In the world of cybersecurity, visibility is paramount. Digital Forensics and Incident Response (DFIR) teams need the ability to quickly query, investigate, and monitor endpoints across their entire network. This is where Velociraptor, a powerful open-source endpoint monitoring and digital forensics tool, comes into play. It allows you to collect and analyze system data at scale, making it an indispensable asset for threat hunting and incident response.
This guide provides a comprehensive walkthrough for installing and configuring a Velociraptor server on an Ubuntu system, giving you a centralized platform for managing and investigating your network’s endpoints.
Step 1: Preparing Your Ubuntu Environment
Before installing Velociraptor, you need to ensure your server has a few essential tools. The primary dependencies are wget
for downloading files and unzip
for extracting them.
Open your terminal and update your package list, then install these utilities with the following command:
sudo apt-get update && sudo apt-get install wget unzip -y
This ensures your system is ready for the next steps.
Step 2: Downloading the Velociraptor Binary
Velociraptor is distributed as a single, self-contained binary, which simplifies the installation process significantly. The latest version is always available on its official GitHub releases page.
Navigate to the releases page and find the appropriate binary for your system architecture. For a standard 64-bit Ubuntu server, you will need the
velociraptor-*-linux-amd64
file.Copy the link to the binary.
Use
wget
to download it directly to your server. For example:wget https://github.com/Velocidex/velociraptor/releases/download/v0.6.7/velociraptor-v0.6.7-linux-amd64
For easier use, rename the downloaded file to simply
velociraptor
and make it executable:mv velociraptor-v0.6.7-linux-amd64 velociraptor chmod +x velociraptor
You now have a functional Velociraptor executable ready for configuration.
Step 3: Generating the Server and Client Configuration Files
Velociraptor uses YAML files for configuration. The easiest way to create a robust configuration is by using the interactive generation tool. This process will create both the server configuration and a template for your clients.
Run the following command in your terminal:
./velociraptor config generate -i
The interactive prompt will guide you through several questions. For a standard setup, you can accept most defaults, but pay close attention to the following:
- Public IP Address: Ensure you enter the correct public IP or domain name for your server so clients can connect to it from anywhere.
- DNS Name: If you have a domain name pointing to your server, enter it here. This is crucial for TLS certificate generation.
- Datastore: For a simple setup, the default file-based datastore is sufficient.
This process will generate two critical files: server.config.yaml
and client.config.yaml
.
Security Tip: The configuration generation also creates a directory containing cryptographic keys. Treat these keys as highly sensitive information. Back them up in a secure location, as losing them will prevent you from being able to communicate with your deployed clients.
Step 4: Creating a Server User and Launching the Service
With the server configuration in place, you need to create an administrative user to access the web interface.
Use the following command to add a user. You will be prompted to set a password.
./velociraptor --config server.config.yaml user add <username>
Replace <username>
with your desired administrator username (e.g., admin
).
Now you are ready to start the server. To test your setup, run it directly in the foreground:
./velociraptor --config server.config.yaml frontend
If everything is configured correctly, the server will start. You can now access the Velociraptor web interface by navigating to https://<your_server_ip>:8889
in your web browser. Log in with the credentials you just created.
For a production environment, you should configure Velociraptor to run as a systemd service to ensure it starts automatically on boot and runs reliably in the background.
Step 5: Repackaging the Client for Deployment
The client.config.yaml
file generated earlier contains all the information a client needs to connect to your server, including connection details and public keys. To deploy this, you must package this configuration into an installer.
Velociraptor makes this easy by allowing you to repackage the original binary with your new client configuration. This creates a ready-to-deploy installer.
To create a Debian package (.deb
) for other Ubuntu/Debian clients, run:
./velociraptor --config client.config.yaml repack deb
This will output a .deb
file (e.g., velociraptor_0.6.7_amd64.deb
). This package is now ready to be distributed and installed on your endpoint machines. You can use the same command to create MSI packages for Windows or RPMs for Red Hat-based systems.
Step 6: Deploying the Client and Verifying Connection
The final step is to deploy your newly created client package to an endpoint. Copy the .deb
file to a client machine and install it using the dpkg
command:
sudo dpkg -i velociraptor_0.6.7_amd64.deb
Once installed, the Velociraptor service will automatically start on the client and attempt to connect back to your server.
To verify the connection, go back to your Velociraptor web UI. Click on the “Show All” button on the left sidebar. Your new client should appear in the list of connected endpoints within a few minutes. From here, you can click on the Client ID to start interacting with it, running queries, and collecting forensic data.
You now have a fully functional Velociraptor server, giving you powerful, centralized control and deep visibility into your managed endpoints for proactive threat hunting and rapid incident response.
Source: https://kifarunix.com/install-and-setup-velociraptor-on-ubuntu/