domingo, maio 22, 2016

TransmissionHowTo - web torrent client/server

TransmissionHowTo - Community Help Wiki



Torrent in raspberryPi



Transmission Command Line

The BitTorrent protocol can be used to reduce the server and network impact of distributing large files. Rather than downloading a file from a single source server, the BitTorrent protocol allows users to join a "swarm" of hosts to download and upload from each other simultaneously.
Transmission is designed for easy, powerful use. We've set the defaults to Just Work and it only takes a few clicks to configure advanced features like watch directories, bad peer blocklists, and the web interface. When Ubuntu chose Transmission as its default BitTorrent client, one of the most-cited reasons was its easy learning curve.
This How-to focuses on CLI (Command Line Interface) and the Web interface
Transmission has been configured to work out of the box on a desktop. Because this how-to is designed for Ubuntu server we need to manually allow remote access.

Installation

Add Transmission PPA Repository

Transmission is available in Ubuntu repository. However if you want the latest then add the PPA repository
sudo add-apt-repository ppa:transmissionbt/ppa
Update repositories
sudo apt-get update
Install transmission
sudo apt-get install transmission-cli transmission-common transmission-daemon

Configure

There are many settings which can be configured. This how-to focus on tweaking the default configuration file for use with Ubuntu server. 
transmission-daemon will start automatically each time you start your server, with the settings defined in /var/lib/transmission-daemon/info/settings.json
Make sure the Transmission daemon is not running when changing the config file otherwise your changes will be over written.
sudo service transmission-daemon stop
edit /var/lib/transmission-daemon/info/settings.json
sudo nano /var/lib/transmission-daemon/info/settings.json

Username and Password

The default rpc-username and password is “transmission”
Change if increased security is required
Change it to whatever you want (any password will work). After next restart the password will be rewritten in SHA1 encrypted format for security reasons.
"rpc-password": "{62b16db87b89a91dd49a5110a7cafc06d20eb4f2wtK6kqPj",
"rpc-username": "transmission",

Whitelist

This must be changed for remote access
rpc-whitelist defines access to transmission. Localhost (127.0.0.1) is defined by default. I added ,192.268.*.* to allow any machine on my LAN access.
"rpc-whitelist": "127.0.0.1,192.168.*.*",

"umask" parameter

You will also have to set the "umask" parameter in Transmission’s settings file to “2” (default is 18) for the account user to have full access to files/folders created by Transmission.
"umask": 2,

Transmission Restart

After configuration change, restart transmission
sudo service transmission-daemon start

Default File Directory

Place a torrent file in this directory for automatic file download
/var/lib/transmission-daemon/downloads/

Configure Users and Permissions

It is recommended that Transmission runs under it’s own username for security reasons. This creates a few issues with file and folder access by Transmission as well as your account (let us assume it is user).
Add the username user to the group debian-transmission:
sudo usermod -a -G debian-transmission user
NOTE: Change "user" to you own Ubuntu user login name. 
NOTE: When adding a user to a new group, the user must log out and log back in for it to take affect. A reboot will also accomplish this.

Transmission Daemon

Starting and Stopping Transmission Daemon

After install Transmission, the daemon will be started automatically (but not accessible yet). You can start and stop Transmission daemon using the following commands
sudo service transmission-daemon start
sudo service transmission-daemon stop
sudo service transmission-daemon reload
Note:Restarting (or reloading) Transmission daemon can be tricky. Restarting the the daemon (while it is already running) would rewrite the Transmission settings files to its original state. In other words, restarting the Transmission daemon would reset all the custom settings you saved.

Bash Aliases

Create shortcuts add the following bash aliases to /home/user/.bash_aliases
sudo nano /home/user/.bash_aliases
alias t-start='sudo service transmission-daemon start'
alias t-stop='sudo service transmission-daemon stop'
alias t-reload='sudo service transmission-daemon reload'
alias t-list='transmission-remote -n 'transmission:transmission' -l'
alias t-basicstats='transmission-remote -n 'transmission:transmission' -st'
alias t-fullstats='transmission-remote -n 'transmission:transmission' -si'
source /home/user/.bash_aliases
Example
user@SVR:~$ t-list
will run
transmission-remote -n 'transmission:transmission' -l

Web Interface

With your browser you can now add torrents, download and seed. You can also configure many transmission settings.
http://server-ip:9091

Port Forward

There are many options but one of the more important one's is port forwarding


Check your ports are open

Nenhum comentário: