How to Set Up Traffmonetizer with API Token in InternetIncome: Complete Configuration Guide
To set up Traffmonetizer with an API token in InternetIncome, add your token to the TRAFFMONETIZER_TOKEN field in properties.conf and execute sudo bash internetIncome.sh --start to launch the container with automatic architecture detection.
InternetIncome by engageub is an open-source automation framework that manages bandwidth-sharing services inside isolated Docker containers. To monetize unused bandwidth with Traffmonetizer, you configure a single environment variable in properties.conf and the orchestration script handles multi-architecture image selection, persistent volume mounting, and container deployment automatically.
Configure the Traffmonetizer API Token
The only manual configuration required is editing properties.conf in the repository root. At line 15, the script expects the TRAFFMONETIZER_TOKEN variable to hold your valid API credentials.
Editing properties.conf Manually
Open the configuration file in your preferred editor:
nano properties.conf
Locate line 15 and update the value:
TRAFFMONETIZER_TOKEN='YOUR_TRAFFMONETIZER_TOKEN_HERE'
Wrap the token in single quotes to ensure special characters are handled correctly.
Automated Token Injection
For headless deployments, use sed to programmatically insert the token:
sed -i "s/^TRAFFMONETIZER_TOKEN=.*/TRAFFMONETIZER_TOKEN='your-actual-token'/" properties.conf
How InternetIncome Orchestrates Traffmonetizer Deployment
Once you execute the start command, internetIncome.sh initiates a multi-stage deployment pipeline defined between lines 638 and 656. The script manages architecture compatibility, data persistence, and CLI argument injection without requiring manual Docker commands.
Automatic Architecture Detection and Image Selection
The script detects your host CPU architecture to pull the appropriate traffmonetizer/cli_v2 image. In internetIncome.sh lines 638-646, the logic evaluates uname -m and selects:
traffmonetizer/cli_v2:arm64v8for aarch64 or arm64 systemstraffmonetizer/cli_v2:arm32v7for armv7l systems--platform=linux/amd64 traffmonetizer/cli_v2for all other architectures (x86_64, AMD64)
This ensures native binary performance regardless of whether you run the script on a Raspberry Pi, ARM server, or standard Intel/AMD hardware.
Persistent Storage Configuration
Between lines 651-654, the script creates a host directory at traffmonetizerdata/data<i> (where <i> represents the instance index) and mounts it into the container at /.config/traffmonetizer. This volume mount allows the Traffmonetizer CLI to retain its local configuration, device registration, and authentication state across container restarts and updates.
Container Launch Arguments
At lines 655-656, the Docker run command constructs the execution string with two mandatory arguments passed to the Traffmonetizer binary:
--token $TRAFFMONETIZER_TOKEN– injects your API token fromproperties.conf--device-name $DEVICE_NAME$i– assigns a unique device identifier (defaults to'ubuntu'if you do not overrideDEVICE_NAME)
The script also attaches the persistent volume created in the previous step, ensuring your earnings history survives container recreation.
Starting and Verifying the Service
Launch the Container
Execute the orchestration script with root privileges to begin deployment:
sudo bash internetIncome.sh --start
During initialization, the script validates that TRAFFMONETIZER_TOKEN is non-empty. If the token is missing, the script logs a warning and skips Traffmonetizer deployment while continuing with other services. If the token is present but the container fails to start, the script aborts to prevent silent failures.
Verify Active Instances
Confirm the container is running with proper resource allocation:
docker ps -f name=traffmon*
You should observe a container name matching traffmonetizer (or similar with numeric suffixes) displaying status Up and mounting the traffmonetizerdata volume.
Stop and Remove Containers
To terminate the service and remove the container:
sudo bash internetIncome.sh --delete
This command stops the running Traffmonetizer instance and removes the container while preserving the traffmonetizerdata directory for future restarts.
Summary
- Single Variable Configuration: Set
TRAFFMONETIZER_TOKENinproperties.confline 15 to authenticate with Traffmonetizer servers. - Multi-Architecture Support: The script automatically selects
traffmonetizer/cli_v2images for ARM64, ARMv7, or AMD64 architectures based onuname -mdetection (lines 638-646). - Data Persistence: The host directory
traffmonetizerdata/data<i>mounts to/.config/traffmonetizerinside the container to maintain state between reboots (lines 651-654). - CLI Integration: The container launches with
--tokenand--device-namearguments populated from your configuration variables (lines 655-656).
Frequently Asked Questions
Where do I find my Traffmonetizer API token?
Log in to your Traffmonetizer dashboard, navigate to the Devices or API section, and generate a new application token. Copy this exact string into the TRAFFMONETIZER_TOKEN field in properties.conf, ensuring it is enclosed in single quotes to preserve the token integrity.
What happens if I leave TRAFFMONETIZER_TOKEN empty?
The script implements error handling that checks for an empty token value. If the variable is unset or blank, InternetIncome logs a warning message to stdout, skips the Traffmonetizer container creation entirely, and continues deploying other configured bandwidth services. The script only aborts if a container fails to start after a token is explicitly provided.
Can I run multiple Traffmonetizer instances simultaneously?
Yes. InternetIncome supports multi-instance deployment by appending an index <i> to both the data directory path (traffmonetizerdata/data1, traffmonetizerdata/data2, etc.) and the device name argument. Each instance operates independently with isolated persistent storage, though Traffmonetizer's terms of service typically limit earnings to one device per unique IP address.
Which Docker image does InternetIncome use for Traffmonetizer?
According to the source code in internetIncome.sh, the script utilizes the official traffmonetizer/cli_v2 image with architecture-specific manifest tags. For 64-bit ARM systems it pulls traffmonetizer/cli_v2:arm64v8, for 32-bit ARM it uses traffmonetizer/cli_v2:arm32v7, and for x86 systems it forces the AMD64 platform with --platform=linux/amd64 traffmonetizer/cli_v2 to ensure compatibility.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →