kelinger / OmniStream

Deployment and management tools for an entire streaming platform that can reside on a server (local, remote, hosted, VPS) with media files stored on cloud services like Google Drive or Dropbox.
MIT License
33 stars 10 forks source link

Any tips to get transmission working? #44

Closed falcomm6 closed 1 year ago

falcomm6 commented 1 year ago

I have tried everything I can think of. Does anyone have a working docker compose for tramission?

Cheers,

kelinger commented 1 year ago

Is the 222-transmission.yaml not working? I know I tested it when building the components list but haven't used it since.

Instead, I'm using a customized Transmission that includes the VPN. The reason I didn't include it as part of the build is that it is a bit more complex to setup (since you have to also setup your VPN service environmental variables and these change depending on who the VPN provider is). There's also some "gotchas" in that you need to pre-create certain files on the host before starting up the container the first time, otherwise it ends up creating dummy directories with the same name and things get bad pretty quickly.

The one I'm using on a regular (daily) basis is haugene/transmission-openvpn which can be found here. I'd be happy to share my obfuscated config if that looks like something you want to setup.

falcomm6 commented 1 year ago

Yes please . I was going to change the image to that version with the vpn and try get it working after I get the base image working.

Thanks a bunch!

kelinger commented 1 year ago

Before you first start this up, you need to run touch ${LOGS}/transmission.log to create the log file on your host (should end up in ~/OmniStream/logs/transmission.log). If you don't, then this file will be created by Docker as a directory.

Additionally, the line TRANSMISSION_RPC_PASSWORD=xxxxxxxxxxxxx in my real file actually has the encrypted password (not plain text) for the xxxxxx portion and I'm not sure where I got that. You could try to use the plain text version in the YAML first. Transmission (normally, outside of Docker) would take the plain text password from its config file and then rewrite the config with the encrypted password.

For the PORT, I'm using 55955 but you can really use anything that isn't already in use which, due to containerization and the fact that we're not opening it on the host but on the VPN connection itself, translates to "any 4-5 digit number under 65000."

Finally, this works for me because I'm using the VPN provider "PRIVADO." You'd want to use the one that corresponds to your service and the config file (lax-001 in my case) for your nearest server.

#
# Transmission - Torrent download engine with VPN
#
  transvpn:
    image: haugene/transmission-openvpn:4.2
    container_name: ${TRANSNAME}
    hostname:  ${TRANSNAME}
    domainname:  ${MYDOMAIN}
    restart: always
    depends_on:
      traefik:
        condition: service_healthy
      omnimount:
        condition: service_healthy
    environment:
      - PUID=${USERID}
      - PGID=${GROUPID}
      - TZ=${TIMEZONE}
      - UMASK_SET=022
      - MEDIA=${MEDIA}
      - HEALTH_CHECK_HOST=google.com
      - TRANSMISSION_WEB_UI=combustion
      - CREATE_TUN_DEVICE=true
      - OPENVPN_PROVIDER=PRIVADO
      - OPENVPN_CONFIG=lax-001
      - OPENVPN_USERNAME=blahblahblah
      - OPENVPN_PASSWORD=xxxxxxxxxxxxxx
      - WEBPROXY_ENABLED=false
      - DROP_DEFAULT_ROUTE=true
      - OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60
      - TRANSMISSION_PORT_FORWARDING_ENABLED=true
      - TRANSMISSION_DOWNLOAD_DIR=/cloud/Downloads/complete
      - TRANSMISSION_DOWNLOAD_QUEUE_SIZE=50
      - TRANSMISSION_INCOMPLETE_DIR=/cloud/Downloads/incomplete
      - TRANSMISSION_LPD_ENABLED=true
      - TRANSMISSION_MAX_PEERS_GLOBAL=500
      - TRANSMISSION_PEER_LIMIT_GLOBAL=500
      - TRANSMISSION_PEER_LIMIT_PER_TORRENT=100
      - TRANSMISSION_PEER_PORT=55955
      - TRANSMISSION_RATIO_LIMIT=0
      - TRANSMISSION_RATIO_LIMIT_ENABLED=true
      - TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=true
      - TRANSMISSION_RPC_PASSWORD=xxxxxxxxxxxxx
      - TRANSMISSION_RPC_USERNAME=kelinger
    volumes:
      - ${CONFIGS}/${TRANSNAME}/config:/config
      - ${CONFIGS}/${TRANSNAME}/data:/data
      - ${CONFIGS}/${TRANSNAME}/privado:/etc/openvpn/custom
      - ${LOGS}/transmission.log:/data/transmission-home/transmission.log
      - ${LOGS}:/logs
      - ${MERGEMOUNT}:/cloud
      - ${OMNIHOME}/healthchecks/transvpncheck:/transvpncheck
    labels:
      - "omni=${TRANSNAME},${MYDOMAIN},yes,yes,yes"
      - traefik.enable=true
      - traefik.http.routers.transvpn.rule=Host(`${TRANSNAME}.${MYDOMAIN}`)
      - traefik.http.routers.transvpn.tls=true
      - traefik.http.routers.transvpn.tls.certresolver=lets-encrypt
      - traefik.http.services.transvpn.loadbalancer.server.port=9091
    networks:
      - OmniNet
    dns:
      - 8.8.8.8
      - 8.8.4.4
    cap_add:
      - NET_ADMIN
    healthcheck:
      test: ["CMD-SHELL", "/transvpncheck"]
      interval: 10s
      timeout: 2s
      retries: 3
falcomm6 commented 1 year ago

AND for the first time ever, transmissions is HEALTHY.

Thank you so much! Worked a charm.

kelinger commented 1 year ago

@falcomm6 - just curious... what was the problem you were having with 222-transmission.yaml ?

falcomm6 commented 1 year ago

It would just hang as unhealthy for some reason. I couldn't get it to ever boot.

Ive got everything working with jackett now, however the torrents are hanging at 0%. I cant seem to find a way to test the connection. Do I need to do something special?

image

falcomm6 commented 1 year ago

Okay I have an error message now. Might help.

image image

falcomm6 commented 1 year ago

Made the directory manually and got to this. Hands at 0kbps for some reason. Got the same error in the end, directory does not exist but it didnt tell me which. I added "torrent" under downloads in cloud per radarr's suggestion. image

kelinger commented 1 year ago

Make sure to create the directories on the host and then start up Transmission.

You could also verify that the directories are visible inside the container with

enter transmission
cd /cloud/Downloads
ls -l
exit
falcomm6 commented 1 year ago

Thank you. It seems to be an issue with the magnet. A manual download of ubuntu worked to the directory.

ill keep playing. Thanks again!

falcomm6 commented 1 year ago

Do you know where these "resume" files go? Just trying to work that out. I entered the commands you listed and it all worked okay. image

kelinger commented 1 year ago

Ah, yes. Depending on where you’re getting the links, I’ve had the same issue (with multiple Torrent engines) where the magnet doesn’t ever start or resolve but the file-based download does.

I’ve also been able to (sometimes) right-click on the magnet in the site and then go into Transmission and add the URL of the magnet with better success.

kelinger commented 1 year ago

Stop transmission and mke sure your configs directory has both a "config" and "data" subdirectory. If not, create the data directory.

docker stop transmission
omni configs
cd transmission
ls -l
mkdir -p config data
ls -l
omni up
falcomm6 commented 1 year ago

I added a folder named resume, per what some people said on Google. I think I havent got the permissions right, as its still pulling an error after restarting the container.

image

error thread https://github.com/linuxserver/docker-transmission/issues/68

kelinger commented 1 year ago

Stop Transmission (yet again) and chown -R your transmission configs directory to your username/group (typically 1000:1000 so chown -R 1000:1000 transmission

falcomm6 commented 1 year ago

Works a dream now. You're a legend.

falcomm6 commented 1 year ago

Is it normal for there to be 0 upload? Understand if yes for security purposes, its just the seeders kick me off as a leech.

kelinger commented 1 year ago

No, it should upload (unless its an unpopular file)

falcomm6 commented 1 year ago

Hi kelinger,

Ive been trying for a few days and cant seem to get rtorrents working at a speed above 50kbps. ive tried using purevpn with all ports open, but still no luck.

The torrent is good for my test, but even that isnt working. It seems to work at 50kbps for a few minutes after I restart the container, then it all comes to screeching halt of 0. Ive tested the torrents on my local machine and they go blisteringly fast with the vpns, so im not sure what im missing.

falcomm6 commented 1 year ago

Hi there. Would you happen to know what the below means? I keep getting this on the container. It also doesnt download: This shows in portainer under container: unhealthy

  | WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Reading package lists... E: Could not get lock /var/lib/apt/lists/lock. It is held by process 122 (apt) E: Unable to lock directory /var/lib/apt/lists/ WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package net-tools /transvpncheck: line 21: -ntlp: command not found -- | --
kelinger commented 1 year ago

The warning is pretty standard for APT being run inside a script so I wouldn't worry about the first part. As for the errors about locking files and directories, that usually comes up when APT is being run in another process (eg, a background script is running apt upgrade and you try to run sudo apt upgrade from the shell before the background one finishes). Usually you can wait a few minutes and then retry whatever it was you were doing with apt that showed those errors.