Can I run a torrent client + Plex Media Server as "services"? I'm using an old iMac as a torrent client &amp; Plex Media Server.

But I would like those to run as "services", i.e., not as part of a User account, and without having to log in.
You can use launchd, tmux and this script to launch rTorrent as a daemon.

This post describes how to install rTorrent and run it as a daemon using tmux.
First, install software:

$brew install rtorrent --with-xmlrpc-c
$brew install tmux


Parameter –with-xmlrpc-c is needed to use GUI clients with rTorrent.
rTorrent needs terminal to run. We provide virtual terminal using tmux.
To autostart rTorrent create launchd sript and place it to

/Library/LaunchAgents/rtorrent.plist


The script:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;rtorrent&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/usr/local/bin/tmux&lt;/string&gt;
        &lt;string&gt;new-session&lt;/string&gt;
        &lt;string&gt;-s&lt;/string&gt;
        &lt;string&gt;rtorrent&lt;/string&gt;
        &lt;string&gt;-d&lt;/string&gt;
        &lt;string&gt;rtorrent&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;KeepAlive&lt;/key&gt;
    &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;


Load script:

$sudo launchctl load -w /Library/LaunchAgents/rtorrent.plist
$launchctl list | grep rtorrent


If all is ok you will see something like this:

- 1 rtorrent
4868 - 0x7f872252ff90.anonymous.rtorrent


Now you can attach to tmux session and start using rTorrent:

$tmux attach-session -t rtorrent


To restart script unload it and load again:

$sudo launchctl unload -w /Library/LaunchAgents/rtorrent.plist
$sudo launchctl load -w /Library/LaunchAgents/rtorrent.plist


To view launchd logs run:

$sudo launchctl log level debug
$tail -f /var/log/system.log | grep launchd


The rTorrent installation is over, now you can install GUI client.
There is free client for Mac OS X called Nativa. It not very good, but you can try it. To use any client you need to add this in your .rtorrent.rc:

scgi_port = 127.0.0.1:5000


Source