# Headless bittorrent fun? [SOLVED]

## Havin_it

Hi all,

I've recently bought an old Dell server and hope to use it as my BT client(/server) machine, to give my laptops a rest from all that overnight action  :Smile: 

Currently the install on the server is stable with a few exceptions (Azureus, for example...) and can launch Azureus with the web/Swing interface, as per the instructions here:

http://azureus.aelitis.com/wiki/index.php/HeadlessSwingUiHowTo

Unfortunately the usual cop-out is committed: "Launch with the native UI at least once, to fully configure Azureus."

Great, except my box really is headless (lives buried in a closet, so my GF isn't disturbed by its incessant fan-noise!) so that's not an option.

Can anyone suggest how I can configure my box without any assistance from Mr. VGA?  I have perused the ~/.Azureus folder on my laptop (also Gentoo), but the contents do not strike me as easily usable in order to contrive the settings for the other box.

Thanks in advance...!Last edited by Havin_it on Sat Nov 26, 2005 1:21 pm; edited 1 time in total

----------

## buzzin

Hi,

What about lauching Azureus in a vnc session?

----------

## bonbons

Why don't you use ctorrent which is a pure CLI (command line interface) bittorrent client?

Just launch it from a screen ssh session, will eat up far less resources than azeurus...

Just to make it easier, it's also in portage!

----------

## Havin_it

Hi, thanks to you both for responding.

I guess the Azureus applet seemed a good middle-ground between the VNC and CLI/SSH options, as it seems a pretty close approximation of the native SWT GUI which would be easy to work with from any location.  [A Java-enabled browser's easier to find in the field than a VNC client...!]

A CLI solution probably suits my needs best, if fudging the Azureus config without GUI assistance really isn't an option - that would be somewhat of a shame, as I've always used Azureus for my torrent needs and haven't found it a dog since its very early days on Win32.  Then again, now my HD is a hardware RAID-5 array of old SCSI disks, so maybe I ought to be more cautious with it   :Confused: 

@bonbons: Where can I get HOWTO info about ctorrent?

----------

## allucid

just 'emerge bittorrent'. It contains two text mode versions, btdownloadheadless.py and btdownloadcurses.py.

----------

## Havin_it

allicid, thanks for your contribution.

Can anyone comment on how easy these CLI options are to use?  I'm very keen on the Azureus approach as it gives an easy, visual at-a-glance overview via the browser - besides the Swing UI, the web interface also includes a .torrent file upload form, very useful for remote operations.  [Unfortunately, without detailed configuration, it doesn't work!]

I'm kinda tempted to swap-in a copy of my working .Azureus directory from my laptop just to see if it works, but I don't know if this idea is realistic.  I guess a console-based display (brought up and sidelined via screen) would suffice, provided it's easy enough to configure.

----------

## allucid

Well, I haven't used the curses version. I have this alias set:

```
alias btdl="btdownloadheadless.py --max_uploads 2 --minport 7000 --maxport 7010 --max_upload_rate 20"
```

And I just run 'btdl somefile.torrent' in screen and then just kill it (Ctrl-C) sometime after it's finished. It doesn't offer much flexibility, though.  :Smile: 

----------

## Havin_it

PS- does any client besides Azureus have UPnP support?  This is quite a useful feature for my NAT'd network.

----------

## Loki:.

I've been using http://www.torrentflux.com/ for a while to do this.

Works great.

----------

## bonbons

 *Havin_it wrote:*   

> @bonbons: Where can I get HOWTO info about ctorrent?

 There is not too much documentation about ctorrent available as far as I know...

You can get some basic help from the program itself: 

```
$ ctorrent -h

CTorrent devel          Copyright: YuHong(992126018601033)

WARNING: THERE IS NO WARRANTY FOR CTorrent. USE AT YOUR OWN RISK!!!

Generic Options:

-h/-H           Show this message.

-x              Decode metainfo(torrent) file only, don't download.

-c              Check exist only. don't download.

Download Options:

-e int          Exit while seed <int> hours later. (default 72 hours)

-p port         Listen port. (default 2706 -> 2106)

-s save_as      Save file/directory/metainfo as...

-C cache_size   Cache size,unit MB. (default 16MB)

-f              Force seed mode. skip hash check at startup.

-b bf_filename  Bit field filename. (use it carefully)

-M max_peers    Max peers count.

-m min_peers    Min peers count.

-B rate         Max bandwidth (unit KB/s)

-P peer_id      Set Peer ID [-CT1304-]

Make metainfo(torrent) file Options:

-t              With make torrent. must specify this option.

-u url          Tracker's url.

-l piece_len    Piece length.(default 262144)

eg.

hong> ctorrent -s new_filename -e 12 -C 32 -p 6881 eg.torrent

home page: http://ctorrent.sourceforge.net/

bug report: bsdi@sina.com
```

Note that you need to first fetch the .torrent file(s) before using them with ctorrent as it can't download them from a URL by itself.

UPnP is not supported either, but you may choose the port to use, so that a static forwarded port is sufficient.

----------

## Havin_it

Thanks everyone for the input.

What I did in the end was copy my laptop's ~/.Azureus directory to the server, and in addition I copied the snapshot Azureus2.jar, log4j.jar, commons-cli.jar and plugins/webui directory into that folder.  I also updated the permissions on everything in that folder, whic I'd failed to do previously.

Then launching Azureus2.jar from that folder (rather than /usr/lib/azureus) with --ui=console in a screen session, and was able to enter the Swing UI and upload .torrents via the web (another big selling-point of this approach).

Thanks again to everyone for suggesting alternatives.  The configuration aspect is still a bit tricky, so I may switch allegiance in the future, we'll see...!

----------

