Skip to content

Installation

cs-routeros-bouncer supports multiple deployment methods. Choose the one that best fits your infrastructure.

Ideal if you already run CrowdSec in Docker.

services:
cs-routeros-bouncer:
image: ghcr.io/jmrplens/cs-routeros-bouncer:latest
container_name: cs-routeros-bouncer
restart: unless-stopped
ports:
- "2112:2112" # Prometheus metrics (optional)
environment:
CROWDSEC_URL: "http://crowdsec:8080/"
CROWDSEC_BOUNCER_API_KEY: "your-bouncer-api-key"
MIKROTIK_HOST: "192.168.0.1:8728"
MIKROTIK_USER: "crowdsec"
MIKROTIK_PASS: "your-password"
services:
cs-routeros-bouncer:
image: ghcr.io/jmrplens/cs-routeros-bouncer:latest
container_name: cs-routeros-bouncer
restart: unless-stopped
ports:
- "2112:2112"
volumes:
- ./config.yaml:/etc/cs-routeros-bouncer/config.yaml

Start the service:

Terminal window
docker compose up -d

After installing with any method, verify the bouncer is running correctly:

  1. Check service status

    Terminal window
    # Binary installation
    sudo systemctl status cs-routeros-bouncer
    # Docker Compose
    docker compose ps cs-routeros-bouncer
  2. Check health endpoint

    Terminal window
    curl http://localhost:2112/health
    # {"status":"ok","routeros_connected":true,"version":"vX.Y.Z"}
  3. Check logs

    Terminal window
    # Binary installation
    sudo journalctl -u cs-routeros-bouncer -f
    # Docker Compose
    docker compose logs -f cs-routeros-bouncer
  4. Verify router-side rules

    /ip/firewall/filter/print where comment~"crowdsec"
    /ip/firewall/raw/print where comment~"crowdsec"
    /ip/firewall/address-list/print where list=crowdsec-banned