The RasnuCloud Agent is a secure, lightweight, open-source daemon written in Go. It is installed on user servers to securely bridge the gap between your server and the RasnuCloud AI-driven management dashboard.
To guarantee 100% transparency and trust, this agent is fully open-source. We believe that you should never have to install "black-box" binaries on your root servers. You can audit every line of this code, compile it yourself, and verify exactly how it interacts with your system.
The RasnuCloud Agent is designed with a strict, defense-in-depth security model:
- Outbound-Only WebSockets: The agent never opens incoming ports. It connects securely outbound to the RasnuCloud Reverb WebSocket server.
- No Persistent Root Backdoors: The agent does not create SSH keys or persistent hidden user accounts. It strictly listens for cryptographically signed WebSocket events.
- Zero Configuration in Code: The agent uses an environment file (
/etc/rasnucloud-agent/agent.env) locked down withchmod 600. No secrets are ever passed via command-line arguments that could be read byps aux. - Transparent Execution Pipeline: When a command is received, it is executed via Go's native
os/execpackage. The standard output (STDOUT) and standard error (STDERR) are streamed back in real-time. No hidden background processes are spawned.
This agent has been engineered with several safeguards to protect your host OS:
- Automated Secret Redaction: The execution pipeline actively scans for and scrubs credentials (like
mysql -p,redis -a, orPASSWORD=environment variables) before logs are streamed or saved to disk. - Anti-DDoS Concurrency Limits: A strict semaphore limits the agent to
10maximum concurrent commands, ensuring that a malicious or accidental API flood can never crash your server's CPU or RAM. - Read-Only Database Protections: When managing databases, the agent actively inspects queries and blocks destructive actions (
DROP,DELETE,TRUNCATE) if the session is flagged as read-only. - Intelligent Stream Batching: Raw terminal outputs are heavily buffered and batched in 50ms intervals to prevent WebSocket saturation on high-output commands.
- Self-Healing Connections: The agent employs exponential backoff, active Ping/Pong heartbeats, and graceful shutdown handling to survive temporary network outages.
The agent is designed to manage every aspect of your server autonomously while providing real-time feedback to the control plane.
When you open the terminal in the RasnuCloud dashboard, the agent spawns a native Pseudo-Terminal (PTY). It supports real-time resizing (client-TerminalResize) and interactive input (client-TerminalInput), giving you a flawless SSH-like experience directly in your browser.
The agent can securely execute root-level commands safely. It has native handlers for:
- Systemd Services: Instantly start, stop, or restart services (
nginx,docker,mysql, etc.) with built-in validation to prevent command injection. - UFW Firewall: Programmatically open/close ports, delete rules, or apply strict web-server templates.
- Process Management: Safely kill runaway processes via verified PIDs.
The agent natively connects to MySQL and PostgreSQL to execute queries, trigger asynchronous SQL dumps (backups), and restore databases from files.
A lightweight background engine parses /proc/net/dev, top, and systemctl to securely transmit CPU, RAM, Disk, Swap, and Network I/O metrics back to the dashboard every 15 seconds.
If you prefer not to use our pre-compiled binaries, you can easily compile the agent yourself.
- Go 1.21 or higher
# Clone the repository
git clone https://github.com/rasnu/rasnucloud-agent.git
cd rasnucloud-agent
# Download dependencies
go mod tidy
# Build for Linux AMD64 (Standard Servers)
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o rasnucloud-agent-amd64 .
# Build for Linux ARM64 (AWS Graviton, Raspberry Pi, Mac M1/M2/M3)
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o rasnucloud-agent-arm64 .We maintain a rigorous test suite to ensure the stability of the execution pipeline, metric collection, and WebSocket logic. To run the automated tests locally:
# Run all tests with standard output
go test ./...
# Run tests with verbose output and coverage
go test -v -cover ./...Project: RasnuCloud Copyright © 2026 Rasnu LLC (rasnu.com). All rights reserved.
This agent is open-sourced under the MIT License to ensure complete transparency for our infrastructure management community.