Skip to content

Development Setup Community

This guide helps you set up a development environment for Trapster Community Edition.

For how to open a pull request, sign the CLA, and follow project conventions, see Coding Guidelines.

Prerequisites

  • Git
  • Python 3 with venv
  • Docker and Docker Compose (optional, for container-based development)

Fork and clone

  1. Fork trapster-community on GitHub
  2. Clone your fork:
bash
git clone https://github.com/YOUR_USERNAME/trapster-community.git
cd trapster-community
git remote add upstream https://github.com/0xBallpoint/trapster-community.git

Python environment

Create a virtual environment and install dependencies:

bash
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

For editable installs (recommended when changing code):

bash
pip install -e .

Optional AI dependencies:

bash
pip install -e ".[ai]"

Copy example.env to .env if you are working on HTTP or SSH AI features.

Generate a config

Use the interactive wizard or start from the example config:

bash
bash scripts/trapster-wizard.sh
python main.py -c ./trapster.generated.conf

See Configuration wizard for prompts, the service catalog, and logger options.

The default example config is at trapster/data/trapster.conf.

Privileged ports

The example configuration listens on well-known ports (21, 22, 80, and so on). Binding them usually requires root or sudo -E (keeps your activated venv).

Run Trapster

bash
source venv/bin/activate
python main.py -c trapster/data/trapster.conf

Or with Docker:

bash
docker compose up --build

Run tests

bash
source venv/bin/activate
python -m pytest tests/

Project layout

PathPurpose
main.pyEntry point
trapster/Core package, modules, and default configs
trapster/data/trapster.confExample service configuration
trapster/data/http/HTTP honeypot skins and YAML configs
scripts/trapster-wizard.shInteractive config generator
tests/Test suite

Next steps