Creating a Torrent

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
Robin Hood
Posts: 10
Joined: Mon Jun 06, 2011 6:27 pm

Creating a Torrent

Postby Robin Hood » Tue Jul 05, 2011 4:55 pm

Right of the bat I'd like to apologize for my utter lack of skill with all this. I have no understanding of coding, and have some issues doing things on my server.

I'm wondering if there is any way (through the web interface or otherwise) for me to create a .torrent file so I can torrent files I have/put on my server?

Thank you so much!
Robin Hood

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

Re: Creating a Torrent

Postby rb07 » Tue Jul 05, 2011 10:07 pm

Your second phrase is incomplete:
Robin Hood wrote:to create a .torrent file so I can torrent files I have/put on my server

so you can... what?

Create? You have to use a different tool to create .torrent files, the Web interface doesn't do that... but with the daemon, which is the Web client, comes some console tools: transmission-create, transmission-edit, and transmission-show (also transmission-remote), or you can use one of the applications with GUI that also come with Transmission, depending on the OS you want to use: Transmission-Mac, Transmission-GTK, and Transmission-Qt. The last 2 work in Linux and Windows, the last one works everywhere in fact.

Also you don't put .torrent files on "your" server, unless you own the tracker. Those have to be uploaded to the site which has the tracker, then you download the .torrent file created/modified by the site, and finally you set the location and verify contents before starting to seed. Some trackers are different, openbittorrent doesn't need you to upload the file for instance, you can use your .torrent file.

Robin Hood
Posts: 10
Joined: Mon Jun 06, 2011 6:27 pm

Re: Creating a Torrent

Postby Robin Hood » Sat Jul 09, 2011 7:22 am

I'm saying I have a bunch of files on my server. I'd like to be able to take those files, and create a .torrent containing the information to those files.

That way I can use that .torrent file, and seed from my server instead of from my computer. I'm sorry, I didn't understand much of those last bits (it's me, I'm sure).

Jordan
Transmission Developer
Posts: 2311
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: Creating a Torrent

Postby Jordan » Sun Jul 10, 2011 5:51 pm

There are a few different ways to create a .torrent file in Transmission. You can do it through the Mac, GTK+, and Qt clients, and also from the command line using the utility "transmission-create".

Robin Hood
Posts: 10
Joined: Mon Jun 06, 2011 6:27 pm

Re: Creating a Torrent

Postby Robin Hood » Wed Jul 13, 2011 1:38 am

I'm sorry, but I'm still not understanding how to do it.

So if I have a bunch of files on my server, where should I put them, and what command should I type into my SSH client (I'm assuming) to get a .torrent file I can then use? Because the web interface doesn't seem to have a way for me to do that.

super-poussin
Posts: 74
Joined: Sun Mar 15, 2009 8:04 pm

Re: Creating a Torrent

Postby super-poussin » Thu Jul 14, 2011 3:56 pm

create an html page which call this php script with all the info

Code: Select all

<?php
$name = $_POST ['name'];
$var2 = $_POST ['var2'];
$directory = $_POST ['directory'];
$URL = $_POST ['tracker'];
$private = $_POST ['private_torrent'];
$torrentpath="/c/media/BitTorrent/sources/";
$savepath="/c/webroot/transmission/archives/";
$filename=$name.".torrent";
$mode="0777";
$transcreate="/usr/local/bin/transmission-create";
switch ($private)
 {
  case "yes" :
      $last_line=exec("$transcreate  -p -o $savepath$filename -t $URL $directory",$retval=array());
     break;
  case "no" :
  default :
      $last_line=system("$transcreate  -o $savepath$filename -t $URL $directory",$retval=array());
 }
copy( "$savepath$filename","$torrentpath$filename");
echo '<pre>';

 echo '
</pre>
<hr /> Result : '  . $last_line;
#chown("$path$filename","nobody");
chmod ("$torrentpath$filename",0777);
chmod ("$savepath$filename",0777);
#exec("chown nobody:nogroup $path$filename");
#exec("/c/webroot/transmission/modify.sh");
echo '<pre>';
 echo '
</pre>';
?>


super-poussin
Posts: 74
Joined: Sun Mar 15, 2009 8:04 pm

Re: Creating a Torrent

Postby super-poussin » Thu Jul 14, 2011 3:58 pm

html page can look like this :

Code: Select all

<html>
<header>
<center>
<bold>
Released by Super-Poussin
</bold>
</center>
</header>
<body  background="fond.jpg">
 <table border="0" width="100%" align="left" height="80%" cellpadding="0" cellspacing="0">
  <tbody>
   <tr>
    <td valign="middle">

      <table border="0" width="45%" align="left" height="100%">
      <tbody>
       <tr>
        <td align="center" height="100%" cellpadding="0" cellspacing="0" valign="middle"><img src="SuperPoussin.png"></td>
       </tr>
      </tbody>
     </table>

<form id="form1" name="form1" method=post  action="transmission.php">

<p><kbd><strong>Torrent Name: </strong></kbd></p>

<p>

<label>

<input type="text" name="name" id="textfield1" value="Mytorrent"/>

</label>

</p>


<p><kbd><strong>Directory or File : </strong></kbd></p>

<p>

<label>

<input type="text" name="directory" id="textfield3" value="/c/"/>

</label>

</p>

<p><kbd><strong>Tracker URL: </strong></kbd></p>

<p>
<label>
<input type="text" name="tracker" id="textfield4" value="http://"/>

</label>

</p>
Private Torrent:<br />
<select name="private_torrent">
<option value="choose" selected="selected">Choose an option
<option value="yes">yes
<option value="no">no
</select>
<p> </p>
<input type="submit" name="button" value="Create Torrent"/>

<p>

 </label>

<p> </p>

</form>
</body>
<footer>
<br>It coudld be long, be patient ! <br/>
Files are saved in /c/webroot/transmission/archives  and put in /c/media/BitTorrent/sources/  for immediate seeding
</footer>
</html>


bobsbarricades
Posts: 4
Joined: Sun Aug 07, 2011 12:18 am

Re: Creating a Torrent

Postby bobsbarricades » Sun Aug 07, 2011 12:21 am

I am in the same boat as the OP, and the answers are quite confusing to me.

I read it's real simple to do in uTorrent...but I'm in OS X. Things should be easier! =)

I have my files on my server. I have a link that if you go to, will download a .zip. How do I tell transmission, when creating a torrent, to go to THIS file. not one on my local computer?

thanks for any clarification on the matter guys.

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

Re: Creating a Torrent

Postby rb07 » Sun Aug 07, 2011 11:03 pm

Creating a torrent is independent of where you actually upload/download.

The points on this thread that should be clear:
  • The Web client does not have the functionality to create torrent files.
  • There are GUI and CLI options within the Transmission project "products" that do have the functionality.
  • Choose whatever best suits you. This probably depends on where you want to work.

If you want to work on your Mac, you can use the Mac application, no need to download or upload with it, just use the create torrent function and then do whatever is needed to make your real transmission server use it.

I said "whatever is needed" because the procedure changes depending on what you are doing. If you are independently seeding, then just load the .torrent file. If you are seeding on a private tracker, then follow their instructions (usually you upload your .torrent file to them, they modify it, you download it back, verify content, and start seeding).

bobsbarricades wrote:How do I tell transmission, when creating a torrent, to go to THIS file. not one on my local computer?

Paths are relative to the location you set, or the default location. That means the answer is don't worry about local/remote. Also if you can verify the content, that means you have the paths right.
Last edited by rb07 on Sun Aug 07, 2011 11:54 pm, edited 1 time in total.

x190
Posts: 5094
Joined: Sun Nov 30, 2008 4:59 am

Re: Creating a Torrent

Postby x190 » Sun Aug 07, 2011 11:46 pm

.transmission file


...meaning .torrent?
The stone age didn’t end because we ran out of stones.
---The Great Disruption - by Paul Gilding
https://paulgilding.com/
-------------------------------------------------

bobsbarricades
Posts: 4
Joined: Sun Aug 07, 2011 12:18 am

Re: Creating a Torrent

Postby bobsbarricades » Mon Aug 08, 2011 3:41 am

Paths are relative to the location you set, or the default location. That means the answer is don't worry about local/remote. Also if you can verify the content, that means you have the paths right.


this confuses me because I HAVE to select something on my computer when making the .torrent. Do you mean I can download the file from the web that I'm hosting, then select that, then just upload the torrent and it will automatically understand the URL of the file the .torrent is downloading from?

<----very dense

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

Re: Creating a Torrent

Postby rb07 » Mon Aug 08, 2011 4:03 pm

bobsbarricades wrote:I HAVE to select something on my computer when making the .torrent

Yes, you select either a file or a directory.

The item you select just has to be visible on your computer, doesn't have to be strictly on your computer, could be something you have access using NFS or CIFS -- yeah, I know, one more variable to make things even more confusing.

bobsbarricades wrote:I can download the file from the web that I'm hosting, then select that, then just upload the torrent

Yes that works, but its different from what you said before.

bobsbarricades
Posts: 4
Joined: Sun Aug 07, 2011 12:18 am

Re: Creating a Torrent

Postby bobsbarricades » Mon Aug 08, 2011 8:25 pm

OK - so I have the .zip on my server and on my desktop.

I make the .torrent using the .zip on my desktop.

I upload the .torrent to the same place as my .zip on my server.

I can download the torrent fine..it lists the two trackers in the details...but it's not downloading anything. How does it know to download from the file that's on my server?

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

Re: Creating a Torrent

Postby rb07 » Mon Aug 08, 2011 10:11 pm

bobsbarricades wrote:I upload the .torrent to the same place as my .zip on my server.

No, where did you get that idea?

You use Transmission's Web client to load the .torrent file, don't start it yet, select it and look in the inspector, where does it say its the "Download dir:"?

If it doesn't show the correct directory, where you actually have the file, then you'll have to move the file or make the .torrent again (the Web client doesn't have the option to set the location, if you where using Transmission-Qt you would be able to just change the location);

If the directory is the correct one, then in the context menu (right mouse button everywhere except on Mac, which doesn't have buttons) choose verify... after it finishes verifying it will show 100% available and you can start seeding.

x190
Posts: 5094
Joined: Sun Nov 30, 2008 4:59 am

Re: Creating a Torrent

Postby x190 » Tue Aug 09, 2011 3:22 am

right mouse button everywhere except on Mac, which doesn't have buttons


Eeek?! Sorry, that was just my 5 button Mighty Mouse asking for more cheese. :)
The stone age didn’t end because we ran out of stones.
---The Great Disruption - by Paul Gilding
https://paulgilding.com/
-------------------------------------------------


Return to “Web Interface”