Skip to main content

Overview

This guide covers deploying Miku Miku Beam in production environments, including binary deployment, systemd services, reverse proxies, and security considerations.

Prerequisites

Go 1.21+

Required for building the Go server and CLI

Node.js 18+

Required for building the React web client

npm

Node package manager for dependencies

Make

Build automation tool (optional but recommended)

Building for Production

1

Clone the repository

2

Install dependencies

This runs:
  • go mod tidy - Downloads Go dependencies
  • cd web-client && npm install - Installs Node.js dependencies
3

Build all components

This creates:
  • bin/mmb-server - Web server binary
  • bin/mmb-cli - CLI tool binary
  • bin/web-client/ - Built React frontend assets
4

Create required configuration files

Binary Deployment

Directory Structure

Recommended production directory structure:

Installation Steps

1

Create application directory

2

Copy built files

3

Set proper permissions

4

Create configuration (optional)

Systemd Service

Create a systemd service for automatic startup and management.
1

Create service file

Add the following configuration:
2

Create service user

3

Create log directory

4

Enable and start service

5

Verify service status

Reverse Proxy Setup

Nginx Configuration

Recommended setup for production with SSL/TLS:

Apache Configuration

Alternative configuration for Apache2:

Environment Configuration

Configuration File (config.toml)

Environment Variables

string
default:"console"
Set to json for structured JSON logging in production. Console format is human-readable with colors.
boolean
default:"false"
Set to true to allow running attacks without proxies. Required if data/proxies.txt is empty or missing.

Port Configuration

The server listens on port 3000 by default (configurable via config.toml):
Ensure port 3000 is open in your firewall if accessing directly, or configure reverse proxy.

Security Considerations

Always deploy behind Nginx or Apache in production for:
  • SSL/TLS termination
  • Rate limiting
  • DDoS protection
  • Better logging and monitoring
Update allowed_origin in config.toml to match your production domain:
The provided systemd service includes:
  • NoNewPrivileges=true - Prevents privilege escalation
  • PrivateTmp=true - Isolated /tmp directory
  • ProtectSystem=strict - Read-only system directories
  • ProtectHome=true - No access to home directories
Consider adding authentication middleware for production deployments. MMB doesn’t include built-in auth, so implement it at the reverse proxy level:

Monitoring and Logging

Log Management

Log Rotation

Create a logrotate configuration:
Add:

Performance Tuning

System Limits

Increase file descriptor limits for high-concurrency attacks:
Or in systemd service:

Go Runtime Settings

Control Go runtime behavior via environment variables:

Upgrading

1

Stop the service

2

Backup configuration

3

Build new version

4

Deploy new binaries

5

Restart service

Troubleshooting

Check service status and logs:
Common issues:
  • Port 3000 already in use
  • Missing data files (proxies.txt, uas.txt)
  • Incorrect file permissions
  • Invalid configuration
Verify web client files exist:
If empty, rebuild with make all and ensure the web-client build completes successfully.
Check proxy file:
Options:
  • Add valid proxies to the file
  • Set ALLOW_NO_PROXY=true in systemd service
  • Use --no-proxy flag with CLI
Ensure WebSocket support in reverse proxy:Nginx: Check for proxy_set_header Upgrade and Connection "upgrade"Apache: Enable proxy_wstunnel module and configure RewriteRule for WebSocket upgrade
Reduce concurrent threads or limit memory:

CLI Deployment

The CLI tool can be deployed separately for remote attack execution:

Next Steps

Docker Deployment

Deploy using Docker containers

Server Configuration

Configure server settings and parameters

Attack Methods

Learn about available attack methods

CLI Usage

Use the command-line interface