After installing Raspbian as stated in the website, do this first -> get [[raspberry-ssh|SSH]] started using ''raspi-config''\\

Then continue with the rest....

<code>
sudo apt-get install transmission-daemon
</code>

Make some folders\\
<code>
mkdir -p /home/pi/Downloads/Transmission/progress
mkdir -p /home/pi/Downloads/Transmission/completed
mkdir -p /home/pi/Downloads/Transmission/watch
</code>

Take care of permissions
<code>
sudo usermod -a -G debian-transmission pi
sudo chgrp debian-transmission /home/pi/Downloads/Transmission/progress
sudo chgrp debian-transmission /home/pi/Downloads/Transmission/completed
sudo chgrp debian-transmission /home/pi/Downloads/Transmission/watch
sudo chmod 0770 /home/pi/Downloads/Transmission/progress
sudo chmod 0770 /home/pi/Downloads/Transmission/completed
sudo chmod 0770 /home/pi/Downloads/Transmission/watch
</code>

Stop transmission
<code>
sudo service transmission-daemon stop
</code>

<code>
sudo nano /etc/init.d/transmission-daemon
</code>
Change startup user for transmission, change user name to your username: USER=pi\\

More permissions stuff
<code>
sudo chown pi -R /var/lib/transmission-daemon/info/
sudo chown pi -R /etc/transmission-daemon/settings.json
</code>

Take care of some settings:
<code>
sudo nano /etc/transmission-daemon/settings.json
</code>

  -Find **rpc-username** and **rpc-password**, change the values. This is supposed to be different from your Raspbian username. __Note__ Put your **rpc_password** as plaintext. When transmission starts, it will hash the password to keep it secure.
  -Find **rpc-whitelist** and add the IP addresses of your other computers there (computers you plan to access Transmission from). For my case, I simply add ''192.168.1.*''
  -Find download-dir and change it into /home/pi/completed or whatever the name of the folder you have prepared before.
  -Find incomplete-dir and change it into /home/pi/progress or whatever the name of the folder you have prepared before.
  -Find watch-dir and change it into /home/pi/torrentwatch or whatever the name of the folder you have prepared before.

Since we're running as the user ''pi''
<code>
sudo chown -R pi.debian-transmission /etc/transmission-daemon
sudo chown -R pi.debian-transmission /etc/init.d/transmission-daemon
sudo chown -R pi.debian-transmission /etc/init.d/transmission-daemon
</code>

Prevent systemd from showing an error on relaunch
<code>
sudo nano /etc/systemd/system/multi-user.target.wants/transmission-daemon.service
</code>
and change ''User'' to ''pi''

Reload the systemctl file by entering the following:
<code>
sudo systemctl daemon-reload
</code>

Create the directory where the setting.json file will be accessed by the transmission-daemon.\\
We then need to create a symbolic link (ln) back to the settings file we edited earlier, update ''pi'' with the relevant username. (If don’t don’t do this then transmission will create a default file in it’s place)
<code>
mkdir /home/pi/.config/transmission-daemon/
ln -s /etc/transmission-daemon/settings.json /home/pi/.config/transmission-daemon/
</code>


Start the transmission-daemon
<code>
sudo service transmission-daemon start
</code>

You should now be able to access your pi transmission via ''http://your_pi_ip:9091''

----
Now to install an ftp server to download files.\\
<code>
sudo apt-get install vsftpd openssl-blacklist
</code>

Then edit the config file
<code>
sudo nano /etc/vsftpd.conf
</code>
Make sure ''local_enable'' and ''write_enable'' is uncommented and set to ''YES''\\
plus
<code>
chown_uploads=YES
chown_username=pi
</code>
just in case.\\

FIXME

Now with the Pi 2 having four USB ports, it might be useful to automount the USB drives when inserted.\\
To do this, use ''usbmount''
<code>
sudo apt-get install usbmount
</code>

This will automount inserted usb drives under ''/media/usb0'' and ''/media/usb1'' and so on...\\
But it does it as root, no solution has been found yet but you are supposed to edit ''/etc/usbmount/usbmount.conf'' to include
<code>
FS_MOUNTOPTIONS="uid=1000,gid=1000"
</code>
though this does nothing.\\

Maybe a ''umask=000'' might help

End FIXME

**Screen**

A very useful bit of software to run detached commands in a headless server, for instance, a ''wget'' command to download a file in the background even though you're logged out from the server.\\
To install, run
<code>
sudo apt-get install screen
</code>
For details on running ''screen'', look at this page [[using_screen_to_run_a_detached_command]]
 