-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
This page covers how to install and run Rosemary for the first time, from downloading the binaries to connecting your first agent.
Server:
- Linux, Windows, or macOS
- Root or Administrator privileges (required for kernel-level interception)
- Ports 1024, 1080, 1081, 5300 available (all configurable)
Agent:
- Linux, Windows, macOS, FreeBSD, or OpenBSD
- No root required
- Outbound access to the server on port 1024
go install github.com/blue0x1/rosemary/rosemary@latest
go install github.com/blue0x1/rosemary/agent@latestBinaries will be placed in ~/go/bin/. To use with sudo, copy to system path:
sudo cp ~/go/bin/rosemary /usr/local/bin/Pre-built binaries are available in the dist/ directory of the repository for all supported platforms.
Naming format:
rosemary-<os>-<arch>
agent-<os>-<arch>
Examples:
rosemary-linux-amd64
rosemary-windows-amd64.exe
agent-linux-amd64
agent-windows-amd64.exe
agent-darwin-arm64
Both the server and agent share a 32-byte AES-256 key encoded as base64url. Generate one with:
openssl rand -base64 32 | tr '+/' '-_' | tr -d '='Keep this key secret. Any agent that knows the key can connect to your server.
Linux / macOS (requires root):
sudo rosemaryOR with specified key
sudo rosemary -key <your-base64-key>Windows (requires Administrator):
rosemary-windows-amd64.exe
OR with specified key
rosemary-windows-amd64.exe -key <your-base64-key>
The server starts on the following default ports:
| Service | Port |
|---|---|
| Web dashboard and REST API | 1024 |
| TCP transparent proxy | 1080 |
| UDP transparent proxy | 1081 |
| DNS proxy | 5300 |
Open the dashboard at:
http://<server-ip>:1024
The default login uses the AES key as the password.
Copy the agent binary to the remote host and run:
./agent-linux-amd64 -s <server-ip>:1024 -k <your-base64-key>The agent will:
- Connect to the server over WebSocket
- Authenticate using the shared key
- Discover its local subnets and internet status
- Register with the server
- Begin forwarding traffic
Once registered, the server installs interception rules for the agent subnets and all matching traffic is transparently tunneled.
Add the -b flag to daemonize the agent:
./agent-linux-amd64 -s <server-ip>:1024 -k <your-base64-key> -bOn Unix this uses setsid to detach from the terminal. On Windows it uses a detached process.
Instead of passing flags each time, create a JSON config file.
Server config (server.json):
{
"http_port": 1024,
"tcp_port": 1080,
"udp_port": 1081,
"dns_port": 5300,
"key": "<your-base64-key>",
"session_idle_minutes": 30,
"ws_path": "/ws"
}sudo rosemary -c server.jsonAgent config (agent.json):
{
"key": "<your-base64-key>",
"server_addr": "<server-ip>:1024",
"mode": "agent"
}./agent-linux-amd64 -c agent.jsonOnce the agent connects, open the dashboard at http://<server-ip>:1024. You should see the agent appear in the graph or table view with its hostname, OS, username, and discovered subnets.
From the server REPL you can also run:
agents
This lists all connected agents with their IDs, hostnames, and subnets.
If the agent cannot reach the server (e.g. behind a strict firewall), use bind mode. The agent listens on a local port and the server connects to it.
On the remote host:
./agent-linux-amd64 -m agent-bind -p 4444 -k <your-base64-key>From the server REPL:
connect <remote-ip>:4444
| Page | Description |
|---|---|
| Architecture | How the tunneling and interception works in depth |
| Agent | All agent modes and CLI flags |
| Server | Proxy listeners, REPL commands, iptables rules |
| Configuration | Full reference for all config fields |
| Security | Key management, auth, and hardening |
Use only on systems you own or have explicit written permission to test. Unauthorized use is prohibited.