Change the port of the daemon

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
Post Reply
shark09
Posts: 2
Joined: Tue Feb 10, 2009 3:12 pm

Change the port of the daemon

Post by shark09 »

Hi,

First, sorry for my bad english, it's not my first tongue
I post here because i've got a problem.
I try to change the port used by the daemon from 9091 to 8080 (i'm connected behind a proxy, i have ports 80, 22, 8080 and...not a lot more).

Configuration :
Debian 4.0r6
Server version: Apache/2.2.11 (Debian)
Server built: Jan 16 2009 18:11:28
Transmission 1.40 (7096)
PIII 500 / 256mo
No screen, so everything by ssh (no local access) (i've got a root an a user account), no GUI, all by CLI

i've got transmission, transmission-daemon, transmission-remote and transmissioncli installed.

Code: Select all

debian:/# transmission
transmission         transmission-daemon  transmission-remote  transmissioncli      
Transmission Daemon is running

Code: Select all

debian:/# ps -A | grep transmission
18110 ?        00:00:00 transmission-da
so i kill the daemon

Code: Select all

debian:/# killall transmission-daemon
then, start again the daemon with the -p option

Code: Select all

debian:/# transmission-daemon -p 8080
so, i try to contact the serveur but
Image

why, where is the probleme?

and, a second problem, why i've got a lot of settings.json configuration files ???
/etc/transmission-daemon/settings.json
/root/.config/settings.json
/home/user/.config/settings.json

i try also to delete the /root/ and /home/ files and make a symbolic link to modify only one file

Code: Select all

debian:/root/.config/# ln -s /etc/transmission-daemon/settings.json
but wich one is used by default by transmission ?


sincerely, simon.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Change the port of the daemon

Post by rb07 »

shark09 wrote:I try to change the port used by the daemon from 9091 to 8080 (i'm connected behind a proxy, i have ports 80, 22, 8080 and...not a lot more).

Configuration :
Debian 4.0r6
Server version: Apache/2.2.11 (Debian)
Server built: Jan 16 2009 18:11:28
Transmission 1.40 (7096)
PIII 500 / 256mo
No screen, so everything by ssh (no local access) (i've got a root an a user account), no GUI, all by CLI
...
then, start again the daemon with the -p option

Code: Select all

debian:/# transmission-daemon -p 8080
...
why, where is the probleme?[/quote]
Is not clear, was port 8080 free or Apache was using it?

I guess the proxy is on the server, then your change is not even needed: from outside you configure your browser to use the proxy (with something like Firefox and the FoxyProxy plugin it can configured to use a specific proxy for a specific connection) then use the URL as if you were in the server, it may work with localhost: http://127.0.0.1:9091/ but that IP is usually an exception on the proxy setting, so its better to use the server's local address (it may have an external address, which is no good, and a LAN address which is what the ethernet card uses -- you can see the address with 'ifconfig eth0' or 'ifconfig -a' and look for the interface used).

A third, an probably better option, since you have ssh access you can create a ssh tunnel by running autossh on your side, or the command: ssh -NfC -L 9091:server-lan-ip:9091 user-name@server.domain.com (this time using localhost instead of server's LAN address does work, so you can use 9091:localhost:9091 as the tunnel definition).  With a ssh tunnel you just set your browser to connect to your own computer, just like the URL above: http://127.0.0.1:9091/ but this time the ssh tunnel is really listening in your computer at that port and sending everything to the other side, which is connected to the transmission daemon port.

[quote] a second problem, why i've got a lot of settings.json configuration files ???
/etc/transmission-daemon/settings.json
/root/.config/settings.json
/home/user/.config/settings.json
[/quote]
Because you run the daemon using different users.

The best fix is to use the -g (config dir) and -w (download dir) parameters, and keep directory permissions in a way that will allow you to do what you want, for instance, using a single group and making the directories group writable.
shark09
Posts: 2
Joined: Tue Feb 10, 2009 3:12 pm

Re: Change the port of the daemon

Post by shark09 »

wouha, you help me a lot :p

finally, i've done some modification to apache2 (he listen to the port 80 AND 8080) uninstall and delete all the settings.json then reinstall transmission, and now, it works, but i have no protection, i need to activate authentification, how can i do?

i try

Code: Select all

user@debian:~$ transmission-remote 127.0.0.1:8080 -n user:pass
but this one print me the help ( as transmission-remote 127.0.0.1:8080 --help )
i've try

Code: Select all

user@debian:~$ transmission-remote 127.0.0.1:8080 --auth user:pass

Code: Select all

user@debian:~$ transmission-remote 127.0.0.1:8080 -n "user:pass"
but no one of this one works....
if i do

Code: Select all

user@debian:~$ transmission-remote 127.0.0.1:8080 -d 20 -u 20
127.0.0.1:8080 responded: "success"
127.0.0.1:8080 responded: "success"
it works...so the problem come from the -n or --auth and i'd like to protect my server, how can i do (i change in the config file too, but..no change)
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Change the port of the daemon

Post by rb07 »

shark09 wrote: it works, but i have no protection, i need to activate authentification, how can i do?
There are 2 ways:
  • Run the daemon with the -t -u user-name -v user-password; or
  • Stop the daemon. Edit the file settings.json changing (or adding):

    Code: Select all

    "rpc-authentication-required": 1,
    "rpc-username": "any-user-name",
     "rpc-password": "any-password",
    then start the daemon.
Post Reply