HOWTO: Set web UI login/password for Transmission (because of missing GUI options)

Joined
Oct 22, 2019
Messages
3,641
Through the new web interface in FreeNAS 11.2 and newer, as of the latest version of the Transmission plugin (3.00), there is no way to set the UI login username or password from within the web interface itself. This means anyone has access to login to the Transmission web interface simply by typing in the IP address or hostname: no authentication required.

Here is a workaround I came up with that works for me, which I consider only a temporary fix, as this bug needs to be addressed by the plugin developers. There is currently no obvious way to "logout" either, which is another thing that needs to be implemented in the web GUI.

The file to be edited within the jail is /usr/local/etc/transmission/home/settings.json

1) First make sure the jail is started:
FreeNAS Menu > Jails > transmission > three dots (...) > Start

2) Then open up a shell inside the jail:
FreeNAS Menu > Jails > transmission > three dots (...) > Shell

3) Now install the nano text editor:
Code:
pkg install nano


4) Stop the transmission service before making any changes to its settings:
Code:
service transmission stop


5) Calculate the hash for your desired password within double-quotes, as transmission uses a simple sha1 hash for obfuscating the web UI password:
Code:
sha1 -s "myPassword1234"


You should see an output like this:
Code:
SHA1 ("myPassword1234") = 95b7c59498cac4afdb334b818e82d8eee0a6aee4


This means if your desired password will be myPassword1234 the sha1 hash is 95b7c59498cac4afdb334b818e82d8eee0a6aee4

6) While still in the shell, highlight and copy the hash using CTRL + INSERT.

7) Open up the settings.json file with nano:
Code:
nano /usr/local/etc/transmission/home/settings.json


8) Change/verify the following lines like so .You can use CTRL + INSERT (copy) and SHIFT + INSERT (paste) to copy and paste within the shell and text editor.

============
"rpc-authentication-required": false,

Should now become...

"rpc-authentication-required": true,



"rpc-enabled": false,


Should now become...

"rpc-enabled": true,



"rpc-password": "{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",


Should now become...

"rpc-password": "{95b7c59498cac4afdb334b818e82d8eee0a6aee4",



"rpc-username": "",


Should now become...

"rpc-username": "user",
============

Keep in mind that the "username" and "password" are to be replaced with your desired username and password (sha1 hash) to login through Transmission's web interface. Don't use my hash example, unless you want your password to be myPassword1234.

Pay close attention to the formatting. It must be exactly as shown in the above examples. Every comma, squiggly bracket, colon, and double quotation marks must use the exact format as above.

9) Now start the transmission service again:
Code:
service transmission start


10) Finally, check to see if the changes were set and are working:
With your web browser, visit the appropriate local IP address and port for the jail/plugin, such as http://192.168.0.123:9091
 
Last edited:

zemun2

Explorer
Joined
Mar 15, 2017
Messages
72
Any idea why this isn't working on 11.3-U3.2 ?
This is the only thing holding me back from switching from 11.1-U7
 
Joined
Oct 22, 2019
Messages
3,641
I haven't tried this in 11.3-U3.2, but can you explain what happens when you try it? Is there still no option in the Transmission web GUI to set a username/password?

I've since switched to the qBittorrent plugin. I could give this a test later today or this week.
 
Last edited:

zemun2

Explorer
Joined
Mar 15, 2017
Messages
72
Still no option in GUI.
When I make changes and go back my sha1 password is still there, but once I start the service it reverts back to the original password.
 
Joined
Oct 22, 2019
Messages
3,641
Still no option in GUI.
When I make changes and go back my sha1 password is still there, but once I start the service it reverts back to the original password.

I know I might sound obvious to ask, but you stopped the service (transmission), then made the changes? I believe if you make the changes while the service is running, it will revert back.

Whoops, just re-read your post again. I'll give it a shot today.
 
Joined
Oct 22, 2019
Messages
3,641
I just tried it from scratch and it works. I used:

username: user
password: myPassword1234

Maybe you copied + pasted (or manually entered) in the values and accidentally removed the { symbol or the double quotes? It has to follow the exact same format as the examples I gave, down to the very brackets, and quotes.

"rpc-password": "{95b7c59498cac4afdb334b818e82d8eee0a6aee4",

The comma, squiggly bracket, quotes, everything has to be exactly like so.

I updated my initial post with better instructions.
 
Last edited:

zemun2

Explorer
Joined
Mar 15, 2017
Messages
72
I’ll give it a shot one more time. I kept the same format as it was.
 

zemun2

Explorer
Joined
Mar 15, 2017
Messages
72
I used the VI instead of nano. Used CTRL+X to save and exit
 
Joined
Oct 22, 2019
Messages
3,641
I’ll give it a shot one more time. I kept the same format as it was.

Hope it works! I don't mean to sound like a convert, but I've been much happier with qBittorrent ever since switching. You'll find it to be more polished with better options and features. It's also a go-to bittorrent client for Linux and Windows PCs, and its web GUI/options does an excellent job of mimicking the same layout as its desktop version.

The only feature that Transmission seems to have over qBittorrent is that it can automatically download and apply a blocklist (which is controversial in of itself.)
 
Joined
Oct 22, 2019
Messages
3,641
I used the VI instead of nano. Used CTRL+X to save and exit

Use nano. I regret even mentioning vi when I first wrote my instructions.

Code:
pkg install nano
 

zemun2

Explorer
Joined
Mar 15, 2017
Messages
72
Does it have an option to set the password?
 
Joined
Oct 22, 2019
Messages
3,641
Does it have an option to set the password?

Yes, among many other options. It even has a useful feature where you can run a command after a download completes, which is very useful for dealing with permissions on files and folders, such as when accessing them via SMB.

For example, here is what I have filled in for the option "Run external program on torrent completion":
Code:
chown -R 1000:1000 "%F"


What this does is change the ownership to uid 1000 and gid 1000 (which matches with my main FreeNAS user account "winnie", that has the same assigned uid and gid number.) Now I have no issues deleting the downloaded files and folders from an SMB share, etc. You can even decide to use chmod instead of chown.

I set the "Default Save Path" to /media/download/, which is a mount point I've configured to use /mnt/mainpool/download/ from Jails > qbittorrent > Mount Points.
 
Last edited:
Top