---
owner: gmikcon
status: active
last_reviewed: 2026-10-02
review_interval: 90d
confidence: high
source_of_truth: ssh-host
---

# Transmission VM

KVM VM on `hp-proliant-dl380-g6` (libvirt, `qemu:///system`), 2 vCPU / 2 GiB RAM, autostart enabled. Verified live over SSH 2026-09-29.

## Address and access

- LAN: `192.168.1.154`
- SSH: `ubuntu@192.168.1.154` (password same as Navi swarm peers, see gnexus-creds secret `79875411-a4bd-46d3-b89d-4b2d286ca11c`)

## Services

- **Flood** (web UI for the torrent client): `node /usr/bin/flood --host 0.0.0.0 --port 3000 --config /home/ubuntu/.flood/config.json --allowedpath /home/ubuntu/jf_storage`. Public URL: https://transmission.gnexus.space (nginx on internal-proxy-vps `.226` → `http://192.168.1.154:3000`).
- **transmission-daemon 2.94**: RPC on `127.0.0.1:9091`, path `/transmission/rpc`, rpc-version 15. Credentials are in the Flood config (`torrentClient` section of `/home/ubuntu/.flood/config.json`): user `gmikcon`, password `mr.robot` (JSONC config — comments break json.load, parse with grep).
- Gotcha: Flood config points the client at `http://192.168.68.210:9091`, which does not respond from the VM; the RPC is reachable on `127.0.0.1:9091`. Flood itself works.
- RPC requires BOTH basic-auth (gmikcon/mr.robot) and the X-Transmission-Session-Id header. A cached session id in `/tmp/.tr_rpc_session` can go stale or get poisoned by bad parsing (awk grabbing HTML) — validate it matches `[A-Za-z0-9]{20,}` or just delete the cache file and re-fetch.

## Storage (NFS mounts on the VM)

| Mount on VM | NFS export | Free space (2026-09-30) | Contents |
| --- | --- | --- | --- |
| `/home/ubuntu/jf_storage/firstraid5_storage` | `192.168.1.130:/mnt/firstraid5` | 71 GB (97% used) — was 100% full on 2026-09-29, do NOT use for new downloads | films, games, music, serials |
| `/home/ubuntu/jf_storage/secraid5_storage` | `192.168.1.130:/mnt/secraid5/jellyfin_storage` | ~188 GB (91% used) | films, serials |
| `/home/ubuntu/jf_storage/NetTera8` | `192.168.1.131:/mnt/NetTera8` | ~250 GB (97% used) | films, serials |

Default transmission `download-dir`: `/home/ubuntu/jf_storage/secraid5_storage`. Flood diskScanPaths also list `NetTera1` and `eserv_storage`, which are not currently mounted.

Serials layout on NetTera8: `/home/ubuntu/jf_storage/NetTera8/serials/` — e.g. `The Gentlemen (Season 1) WEB-DL 1080p`, `The Gentlemen (Season 2) WEB-DL 1080p`.

## Adding torrents via RPC (verified 2026-09-29)

1. Get session id: `curl -s -i http://127.0.0.1:9091/transmission/rpc` → read `X-Transmission-Session-Id` from the 409 response.
2. Add: `torrent-add` with `metainfo` (base64 of the .torrent file), `download-dir`, `paused: false`.
3. Verify: `torrent-get` with fields `status, percentDone, rateDownload, downloadDir`.
4. Move a torrent: `torrent-set-location` with `location` and `move: true`, then `torrent-start`.
5. Rename a torrent's top folder: `torrent-rename-path` with `path` (current name) and `name` (new name) — used to give season folders clean names matching Jellyfin layout.

### Gotcha: magnet-only adds can stall (2026-09-30)

Adding a rutor.info **magnet** via `torrent-add` (filename=magnet:...) can stall forever: metadata never arrives, `peersConnected` stays 0 even though trackers report peers. Root cause observed: the swarm peers were unreachable from the VM (TCP connect to every peer timed out/refused — NAT deadlock, both sides behind NAT), and the magnet carried only 2 trackers. Fix that worked: download the **.torrent file directly on the VM** (`curl -o /tmp/x.torrent https://d.rutor.info/download/<id>` — VM has working internet) and add it via `metainfo` (base64). Note: re-adding the same info_hash while the magnet torrent exists returns `torrent-duplicate` and does NOT refresh metadata — remove the stalled torrent first (`torrent-remove`, `delete-local-data: false`), then add the .torrent. Extra public trackers can be attached with `torrent-set` `trackerAdd`.

### Gotcha: CGNAT — inbound peer connections are impossible (diagnosed 2026-10-01)

The ISP hands out **private-range WAN addresses** (pfSense WAN `re3` = `172.32.2.78/24`, RFC1918) — the home network is behind carrier-grade NAT. Consequences verified live:

- Transmission `port-test` returns `port-is-open: false` even with a fixed peer port (51413, set via `session-set` on 2026-10-01; `peer-port-random-on-start` disabled), VM firewall open (iptables INPUT policy ACCEPT, ufw inactive), and the port listening on 0.0.0.0.
- A pfSense port-forward would NOT help — there is no public IP to forward to. Do not waste time on port-forwarding for torrent connectivity.
- Torrents only download via **outbound connections to connectable peers** (seedboxes). Swarms dominated by NATed peers stall at 0 bytes even when trackers report 4-6 seeds.
- Practical pattern: popular releases with seedbox-heavy swarms download fine in bursts (x264 New-Team release pulled ~6 GB in the first hour on 2026-10-01), then stall when the connectable seed leaves. `torrent-reannounce` every ~5 min + DHT + PEX re-catches connectable seeds when they return.
- Escape hatches if a download must finish fast: (a) any host with a public IP (external VPS) downloads the torrent and the file is rsynced/scp-pulled to the VM — blocked on 2026-10-01 because SSH credentials for the new VPS IP are not in gnexus-creds; (b) direct HTTP sources (archive.org, cloud.mail.ru public links) — plain HTTPS works fine through CGNAT.

## Helper script: add-torrent.py (2026-09-30)

Deployed at `/home/ubuntu/bin/add-torrent.py` on the VM (master copy in Navi workspace, `workspace/add-torrent.py`). Wraps the whole manual cycle into one command; prefer it over hand-rolled RPC calls.

Usage:

```
add-torrent.py <url|/path/file.torrent|magnet:> [--dir DIR] [--paused] [--no-trackers] [--dry-run] [--json]
add-torrent.py ls
add-torrent.py move <id> <dir>
```

What it does:

- rutor page URL (`rutor.info/torrent/<id>/...`) is auto-converted to the direct link `d.rutor.info/download/<id>` and the .torrent is downloaded on the VM (avoids the magnet-stall gotcha above);
- downloaded file is bencode-validated (rejects HTML error pages);
- duplicates are detected by info_hash BEFORE adding (exit 3, prints existing id/name/dir);
- free space is checked on the target mount (min 5 GB or size×1.1 when known);
- target dir: explicit `--dir`, else films → `secraid5_storage/films`, season/serial in the name → `NetTera8/serials`;
- adds via RPC `metainfo`, attaches 10 public trackers (`trackerAdd`), prints status (peers, speed, ETA);
- RPC credentials are read from the Flood config `torrentClient` section; session id cached in `/tmp/.tr_rpc_session`.

Exit codes: 0 ok, 1 bad args/not found, 2 download/parse fail, 3 duplicate, 4 no space, 5 RPC failure.

Tested 2026-09-30: `ls`, dry-run (rutor URL → download → parse → dir choice), dedup via both .torrent and magnet, magnet btih parsing, `move` with bad id. Two bugs found and fixed during testing: multi-file size parsing (bencode decoder returns `(value, raw)` tuples), and `move` of a non-existent id silently succeeded (Transmission RPC ignores unknown ids) — now checked via `torrent-get` first.

## Known incident (2026-09-29)

Torrent `Twilight.2008.BDRip.1080p.Rus.mkv` (id 8) was added to `firstraid5_storage/films` and failed with `error=3 No space left on device` — firstraid5 was 100% full. Moved to `secraid5_storage/films` via `torrent-set-location` and restarted; download resumed normally (~4.3 MB/s, 9 peers). Rule: check `df` on the target mount before adding torrents.

## Recent activity

- 2026-09-30: torrent id 9 `The Gentlemen (Season 2) WEB-DL 1080p` (rutor.info 1107212, WEB-DL 1080p, dub Red Head Sound, 8 episodes, 24.69 GB) added to `/home/ubuntu/jf_storage/NetTera8/serials`, downloading normally (~0.5 MB/s at start, 52 seeds). Season 1 of the same show already lives on the same mount.
- 2026-09-30: torrent id 12 `Кобра.Cobra.1986.UHD.BDRip-HEVC.1080p.mkv` (rutor.info 780564, UHD BDRip-HEVC 1080p from RIPS CLUB, Arrow Films remaster, D/P/P2/A/L1, 10.32 GB) added to `/home/ubuntu/jf_storage/secraid5_storage/films`, downloading (~1.2 MB/s, 3 peers). First attempt with rutor 1043082 (BDRip 1080p x264, 12.32 GB) stalled at 0 peers — magnet-only add + dead swarm (see gotcha above); removed.
- 2026-09-30: helper script `add-torrent.py` deployed to `/home/ubuntu/bin/` on the VM and tested (see section above).
- 2026-10-01: Deepwater Horizon (2016) download saga. Torrent id 13 (rutor 540676, BDRip 1080p x264 New-Team & qqss44, 7.74 GiB) downloaded ~6 GB in the first hour (~2.5 MB/s), then stalled at 79.67% with 0 peers when the connectable seed left; restart+reannounce did not revive it; removed with local data. Fallback id 14 (rutor 853488, BDRip-HEVC 1080p 10bit Spartanec, 8.31 GB) added — trickled (0.03%) through a single NATed peer at first. Re-added the x264 release as id 15 (same info_hash family, fresh start). A reannounce loop (`/tmp/dh_watch.sh`, every 5 min, log `/tmp/dh_watch.log`) ran on the VM for ids 14+15. Peer port fixed at 51413 (see CGNAT gotcha). External-VPS escape hatch blocked: old IP 194.61.53.43 dead (OpenVPN tunnel on .226 inactive, hostname NXDOMAIN), gnexus.space now resolves to 51.83.131.93 (OVH) but no SSH credentials for it exist in gnexus-creds — ask the owner.
- 2026-10-02 00:21 UTC: **torrent id 14 finished** — `Глубоководный горизонт (2016) BDRip 1080p [HEVC] 10bit by Spartanec.mkv` (8.4 GiB) complete in `/home/ubuntu/jf_storage/secraid5_storage/films`, ready in Jellyfin. Total download ~6h at 0.2-1.2 MB/s through CGNAT from a single connectable seed; the 5-min reannounce loop was the key to keeping the seed attached. Duplicate id 15 (x264, was at 57.7%) removed with local data; watcher killed. Note: orphaned `.part` files from old stalled downloads sit on the same mount (~36 GB: Airplane! 2160p 20G, The King of Staten Island 12G, Shiny Flakes 3.6G) — cleanup pending owner approval.
