> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/sammwyy/mikuMikuBeam/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install and configure Miku Miku Beam on your system

## Prerequisites

Before installing Miku Miku Beam, ensure you have the following tools installed:

<CardGroup cols={3}>
  <Card title="Go" icon="golang">
    Version 1.21 or above
  </Card>

  <Card title="Node.js" icon="node">
    Version 18 or above
  </Card>

  <Card title="npm" icon="npm">
    Node Package Manager
  </Card>
</CardGroup>

<Note>
  The project uses Go 1.24.5 in the source code. Any Go version 1.21+ should work, but newer versions are recommended.
</Note>

## Installation steps

<Steps>
  <Step title="Clone the repository">
    Clone the Miku Miku Beam repository from GitHub:

    ```bash theme={null}
    git clone https://github.com/sammwyy/mikumikubeam.git
    cd mikumikubeam
    ```
  </Step>

  <Step title="Install dependencies">
    Use the Makefile to install both Go and Node.js dependencies:

    ```bash theme={null}
    make prepare
    ```

    This command runs:

    * `go mod tidy` - Downloads all Go module dependencies
    * `npm install` - Installs Node.js packages for the web client

    <Note>
      If you encounter "module not found" errors, ensure you're in the project root directory and have internet connectivity.
    </Note>
  </Step>

  <Step title="Create required data files">
    Create the `data` directory and required configuration files:

    ```bash theme={null}
    mkdir -p data
    touch data/proxies.txt
    touch data/uas.txt
    ```

    #### Proxies file (`data/proxies.txt`)

    Add one proxy per line in any of these formats:

    ```text theme={null}
    # With authentication
    http://user:password@proxy.example.com:8080
    socks5://user:password@proxy.example.com:1080

    # Without authentication
    http://proxy.example.com:8080
    socks5://proxy.example.com:1080

    # Shorthand (defaults to http protocol)
    proxy.example.com:8080

    # Port defaults to 8080 if omitted
    proxy.example.com
    ```

    <Warning>
      If no proxies are configured, you must use the `--no-proxy` flag in CLI or set `ALLOW_NO_PROXY=true` for the server.
    </Warning>

    #### User agents file (`data/uas.txt`)

    Add one user agent string per line:

    ```text theme={null}
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
    Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
    ```
  </Step>

  <Step title="Build the project">
    Build all components (web client, CLI, and server):

    ```bash theme={null}
    make all
    ```

    This creates:

    * `bin/mmb-cli` - Command-line interface binary
    * `bin/mmb-server` - Web server binary
    * `bin/web-client/` - Built React frontend

    <Note>
      You can build individual components using `make cli`, `make server`, or `make webclient`.
    </Note>
  </Step>
</Steps>

## Configuration (optional)

Miku Miku Beam uses sensible defaults but can be customized with a TOML configuration file.

### Default configuration

```toml theme={null}
# data/config.toml
proxies_file = "data/proxies.txt"
user_agents_file = "data/uas.txt"
server_port = 3000
allowed_origin = "http://localhost:5173"
```

### Configuration options

| Option             | Default                 | Description              |
| ------------------ | ----------------------- | ------------------------ |
| `proxies_file`     | `data/proxies.txt`      | Path to proxies list     |
| `user_agents_file` | `data/uas.txt`          | Path to user agents list |
| `server_port`      | `3000`                  | Web server port          |
| `allowed_origin`   | `http://localhost:5173` | CORS allowed origin      |

### Using a config file

```bash theme={null}
# CLI with custom config
./bin/mmb-cli --config data/config.toml attack http_flood http://example.com

# Server with custom config
./bin/mmb-server --config data/config.toml
```

## Verify installation

Verify that everything is installed correctly:

<CodeGroup>
  ```bash CLI version theme={null}
  ./bin/mmb-cli --help
  ```

  ```bash Server version theme={null}
  ./bin/mmb-server --help
  ```

  ```bash Check binaries theme={null}
  ls -lh bin/
  ```
</CodeGroup>

You should see:

* Help output from CLI and server binaries
* Three items in `bin/`: `mmb-cli`, `mmb-server`, and `web-client/`

## Makefile commands reference

The project includes helpful Makefile commands:

```bash theme={null}
make prepare      # Install all dependencies (go mod tidy + npm install)
make all          # Build everything (web client + CLI + server)
make webclient    # Build React frontend only
make cli          # Build CLI binary only
make server       # Build server binary only
make run-cli      # Run CLI with example attack
make run-server   # Run web server
make clean        # Clean build artifacts
```

## Troubleshooting

### "concurrently" error on startup

This is a Node.js/React issue. Ensure you have Node.js v18+ installed and run:

```bash theme={null}
cd web-client
npm install
cd ..
make webclient
```

### Build fails with "module not found"

Run `make prepare` to download all dependencies:

```bash theme={null}
make prepare
```

### Web client doesn't load

Make sure you've built the web client before starting the server:

```bash theme={null}
make webclient
make run-server
```

## Next steps

<Card title="Quick start" icon="rocket" href="/quickstart">
  Run your first attack and explore the interface
</Card>
