Sign inSign up

traffmonetizer/cli_v2

By traffmonetizer

•Updated about 9 hours ago

Make money online easily! Official repository

Image
Networking
48

10M+

traffmonetizer/cli_v2 repository overview

⁠Traffmonetizer CLI

Earn from your unused internet traffic. Run the agent on a Linux server, VPS or home machine: customers' traffic goes through your connection, and the earnings show up in your Traffmonetizer dashboard.

Website⁠

⁠Before you start

Create an account at traffmonetizer.io⁠. Your token is in the dashboard.

⁠Quick start

docker run -d --name tm \
  --restart unless-stopped \
  -e HOME=/var/lib/tm \
  -v tm-data:/var/lib/tm \
  traffmonetizer/cli_v2:latest \
  --token YOUR_TOKEN start accept

This shares the server's main IP. To share several IPs from one server, see Running on servers with multiple IPs below.

PartWhy
-e HOME=/var/lib/tm -v tm-data:/var/lib/tmKeeps the device identity in a volume. Keep this: without it the device registers as a new one after every update
--restart unless-stoppedBrings the agent back after reboots and crashes
start acceptConnects to Traffmonetizer and starts accepting traffic

Already running a container without the volume? After you add it, the device registers as a new one once, then keeps that identity across updates.

⁠Tags

TagPlatform
latestlinux/amd64
arm64v8linux/arm64
arm32v7linux/arm/v7

latest is built for x86_64 only. On ARM devices (Raspberry Pi, ARM VPS) use the matching tag.

⁠Agent options

OptionDescription
--token TOKENYour token from the dashboard
--device-name NAMEDevice name shown in the dashboard, makes device management more convenient
--ip ADDRShare one address
--ips ADDR,ADDR,...Share a few addresses
--ips-file PATHShare the addresses listed in a file, one per line. The file is watched for changes
--ips-file-watch falseRead the file only at start
--verbose-loggingDetailed log for troubleshooting. Don't leave it on
startConnect to Traffmonetizer
acceptAccept traffic

⁠Interactive mode

Run the agent in the foreground and type commands while it works:

docker run -i --name tm \
  -e HOME=/var/lib/tm \
  -v tm-data:/var/lib/tm \
  traffmonetizer/cli_v2:latest \
  --token YOUR_TOKEN start accept
CommandDescription
startConnect to the server
stopDisconnect from the server
acceptStart accepting traffic
end-acceptStop accepting traffic, but stay connected
statusConnection status, one line per IP: Connected: {ip} - {true/false}; Accepting: {true/false}
statisticsTraffic, one line per IP: Inbound: {value}; Outgoing: {value}; Requests: {value}; Name: {device name}
ballanceBalance, one line per IP: {ip}: Ballance: {value}; EarnLast30Days: {value}

Stop the agent with Ctrl+C or docker stop tm.

To send commands to a background container, start it with -dit instead of -d and connect with docker attach tm. Leave with Ctrl+P, Ctrl+Q — Ctrl+C stops the agent.

⁠Running on servers with multiple IPs

One container can share every IPv4 address of the server. The agent uses each listed address as the source of its connections, both to Traffmonetizer and to the sites customers request, and each address shows up in the dashboard as a separate device.

Every address must be usable on the server itself:

  • the address is assigned to the server (ip addr add 203.0.113.2/32 dev eth0) and persisted in your network config;
  • outgoing traffic from the address is allowed.

Check an address — the reply must be the same address:

curl --interface 203.0.113.2 https://ifconfig.me

Run the agent with --network host, otherwise the container only sees Docker's private network:

docker run -d --name tm \
  --restart unless-stopped \
  --network host \
  -e HOME=/var/lib/tm \
  -v tm-data:/var/lib/tm \
  traffmonetizer/cli_v2:latest \
  --token YOUR_TOKEN --ips 203.0.113.2,203.0.113.3 start accept

For many addresses, use a file and mount its directory, not the file itself. Editors replace the file when saving, and a single-file mount keeps showing the agent the old copy.

mkdir -p /etc/tm
printf '%s\n' 203.0.113.2 203.0.113.3 203.0.113.4 > /etc/tm/ips.txt

docker run -d --name tm \
  --restart unless-stopped \
  --network host \
  -e HOME=/var/lib/tm \
  -v tm-data:/var/lib/tm \
  -v /etc/tm:/etc/tm:ro \
  traffmonetizer/cli_v2:latest \
  --token YOUR_TOKEN --ips-file /etc/tm/ips.txt start accept

File format: one IPv4 address per line, blank lines are ignored. Comments and CIDR ranges are not accepted. Edits apply within a few seconds without a restart. If the file has an invalid line or is deleted, the agent keeps the previous list and logs the error.

Setups with one container per Docker network and SNAT rules keep working, but a single container with --network host is simpler to run and update.

⁠Automatic updates

We strongly recommend automatic updates: an outdated agent can affect your earnings. Watchtower⁠ checks for a new image every 6 hours and recreates the container with the same settings:

docker run -d --name watchtower \
  --restart unless-stopped \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e WATCHTOWER_CLEANUP=true \
  -e WATCHTOWER_POLL_INTERVAL=21600 \
  nickfedor/watchtower:latest \
  tm
  • tm limits Watchtower to the agent. Without it Watchtower updates every container on the server. With several agent containers, list all their names: tm_1 tm_2 ....
  • Use nickfedor/watchtower: the original containrrr/watchtower is no longer maintained and does not work with Docker 29 and later. If you followed the old instructions, remove it with docker rm -f watchtower and run the command above.
  • Watchtower gets full control over Docker through the socket.

To update by hand: docker pull traffmonetizer/cli_v2:latest && docker rm -f tm, then run your install command again.

⁠Docker Compose

The agent and automatic updates in one file. Save it as /opt/tm/compose.yaml and run docker compose up -d.

services:
  tm:
    image: traffmonetizer/cli_v2:latest
    container_name: tm
    restart: unless-stopped
    environment:
      HOME: /var/lib/tm
    volumes:
      - tm-data:/var/lib/tm
    command: ["--token", "YOUR_TOKEN", "start", "accept"]

  watchtower:
    image: nickfedor/watchtower:latest
    container_name: watchtower
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      WATCHTOWER_CLEANUP: "true"
      WATCHTOWER_POLL_INTERVAL: "21600"
    command: ["tm"]

volumes:
  tm-data:
    name: tm-data
  • To share several IPs, add network_mode: host and - /etc/tm:/etc/tm:ro to tm, and "--ips-file", "/etc/tm/ips.txt" to its command.
  • name: tm-data shares the volume with the docker run commands above, so switching between them keeps your devices. Compose warns that the volume already exists — that is expected.

⁠Logs

docker logs -f tm
# Status: [any ip] - connected       <- main IP
# Status: 203.0.113.2 - connected    <- with an address list
# IPs file changed: 3 ip(s)          <- after an edit to ips.txt

⁠Network requirements

The agent only opens outgoing connections. Allow:

  • TCP 443 from the server's main address
  • TCP 769 from every shared address — each address keeps its own connection to Traffmonetizer
  • outgoing TCP and UDP from every shared address — the customer traffic you are paid for

The agent never sends customer traffic to private or reserved ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10, loopback, link-local), so devices on your local network are not reachable through it.

⁠Troubleshooting

SymptomWhat to check
Status goes from connecting to disconnected over and overWrong token, or a firewall blocks outgoing TCP 443 / 769. Add --verbose-logging and recreate the container to see the exact error
Listed IPs never connect, while the main IP works--network host is missing, or the address is not assigned to the server — check it with curl --interface
Container keeps restartingdocker logs tm shows the reason — usually an invalid line in ips.txt or a wrong path. The path is the one inside the container
Edits to ips.txt are not appliedMount the directory (-v /etc/tm:/etc/tm:ro), not the file
no matching manifest or exec format errorARM device — use the arm64v8 or arm32v7 tag
Device re-registered as a new one after an updateThe data volume is missing — keep -e HOME=/var/lib/tm -v tm-data:/var/lib/tm
Watchtower fails with a Docker API version errorReplace containrrr/watchtower with nickfedor/watchtower

⁠Support

Questions about your account or payouts — contact support from your dashboard.

Tag summary

Content type

Image

Digest

sha256:86b15aac1…

Size

1.4 MB

Last updated

about 9 hours ago

docker pull traffmonetizer/cli_v2