Multi-functional linux home server required... software suggestions?
June 10, 2007 7:14 PM   Subscribe

I'm going to set up a linux server on a spare desktop I have. I want to share my photos, download torrent files and back up my files. I need software suggestions and also any tips you might have!

I have a spare box (think it's 1ghz, 256mb) and I would like to use Ubuntu server on it for all of this.

1) Now first off, I am a linux n00b, so I'm not really sure whether I'll need the LAMP stuff (is there a disadvantage to installing that if you're not going to need it?) but you guys should be able to tell me if I tell you what I need, right? :)

A couple of other things: my main computer runs windows, and I'm going to uni soon.

2) I would like to share my photos with Gallery2.

3) I would like to be able to backup my files onto the machine from uni (I'm guessing by FTP, but incrementally...should I use rsync?). I'll also need a good (read: open source) FTP backup program for my main computer if I'm going to do it by FTP.

4) The uni will probably block bitorrent ports, so I would like a bitorrent program, with a scheduler, so I can feed it addresses of torrent files and then it will download them. I can then pick them up later via FTP.

5) I would also like to be able to stream my music (if possible). I like the look of Jinzora. Are there any copyright issues I need to worry about?

6) It will also be behind a NAT, but I already have DynDNS Static IP set up. Will there be any security issues I need to worry about?

So if you have any suggestions on good software, have noticed an area where I'm mistaken, or have done this before and have any advice to offer, it'd be very much appreciated.

I know it's quite a biggy, but I'm trusting in you! Hive mind go now
posted by edbyford to Computers & Internet (14 answers total) 10 users marked this as a favorite
 
I'm going to selectively answer this :)

1) go for it, if you get adventurous (webserver, databases) the LAMP stuff will be waiting for you. If not, it's easy to add those components later

3) get the ntf3-3G component for Ubuntu either through synaptic or console (apt-get update, apt-get install ntfs-3g). Mod the config file for ntfs-3g and designate the local share. Bam, you have windows connectivity.

Make an account on ubuntuforums.org, there is an answer to practically any problems you may have!

good luck
posted by ronmexico at 7:33 PM on June 10, 2007


If you're going to use Gallery2, you'll need the "AMP" part of "LAMP" anyway. :)
posted by jbroome at 7:35 PM on June 10, 2007


Response by poster: Thanks for the replies so far guys, keep 'em coming... I need some Linux geeks to suggest the software!

Also, I forgot to mention. I will obviously want to remotely administer the server...would I use telnet or something for this? Thanks again, and keep em coming!
posted by edbyford at 7:55 PM on June 10, 2007


Best answer: I wouldn't bother with LAMP unless you intend to host a website on it some time soon.

Set it up with two partitions: one for /, and one for /home. Put /home on an LVM partition so you can easily add disk capacity and/or migrate your existing data onto larger drives later.

LVM is something I wish I had used from the get-go with my own Ubuntu server box; now that I have a few hundred gigs of stuff stored on there, retrofitting it will involve several hours of fartarsing about with backups, and is one of those jobs I Must Get Around To One Day Real Soon. I believe the alternate installer disc lets you set up LVM on a new box pretty easily.

Install samba to support Windows file sharing, vsftpd to do FTP, rsync to do rsync, and bittornado to do bittorrent. The RIAA is going to be violently opposed to you doing anything at all with music you've purchased except putting a CD into a player, so the risk/benefit analysis for streaming is really your call. Personally I can't be arsed to set up a streaming server, and I just use Windows file sharing to make my oggs and avis available to whatever media player.

I have just two outward-facing ports enabled on my NAT router. Both are randomly picked, high-numbered ports, mapped to standard ports on my Ubuntu box: 6881 for BitTorrent, and 22 for ssh.

I run openssh in the Ubuntu box, and if I want to do just about anything from outside (like remote desktop/VNC, or Windows file sharing, or FTP or rsync or whatever) I run PortaPutty from my thumb drive on whatever Windows box I'm using (or just start ssh on anything more reasonable) and set up tunnels. That gives me ports on localhost that connect to the standard service ports on the Ubuntu box. I keep pre-shared ssh keys on the thumb drive, and I have password access disabled in openssh. I'm pretty happy with the security.

One very useful port-forwarding trick is to tell PortaPutty to forward localhost port 1080 as a dynamic (SOCKS 5) port. If you then set Firefox on your local machine to use a SOCKS proxy on localhost port 1080 and set its about:config network.proxy.socks_remote_dns option to True, all your web browsing ends up tunneled through your home box (opensshd acts as a SOCKS proxy) and you can bypass all your uni's upstream nanny filters. Once again, the risk/benefit analysis is up to you.

I run squid in the Ubuntu box, and all my local PC's are configured to use it as their HTTP proxy. That saves me a certain amount of download allowance on Windows updates and such.

You won't be an Ubuntu noob for long, but while you are, the Ubuntu forums have easily-searched answers for just about any specific problem you encounter, and helpful inhabitants for resolving gnarly ones.

Enjoy!
posted by flabdablet at 8:06 PM on June 10, 2007 [2 favorites]


Use ssh (sudo apt-get install ssh) instead of telnet. My favorite Windows client is PuTTY.
posted by djb at 8:07 PM on June 10, 2007


- Command line bittorrent:
http://www.linux.com/article.pl?sid=05/08/26/2018208

- If you definitely want incremental backups, you'll want rsync. There are many easy to follow guides available with a google search or two.

- Seconding the ubuntu forums for all your linux needs.
posted by chrisamiller at 8:08 PM on June 10, 2007


On lack of preview: since Gallery2 is a web thing, yeah, use the pre-canned LAMP install.
posted by flabdablet at 8:09 PM on June 10, 2007


You don't want to put a telnet daemon on your box. In these terrifying times of terrorizing terror, the last thing you want to be doing is shipping plaintext passwords over an unencrypted connection. Use openssh instead.

Also, be aware that FTP also ships plaintext passwords over the wire. Always put a condom over your FTP pipe: use SFTP, or run FTP via an ssh tunnel.
posted by flabdablet at 8:14 PM on June 10, 2007


Best answer: I ran into this article a few days ago, it's a step-by-step guide for what you want to do with Ubuntu.
posted by Mijo Bijo at 9:39 PM on June 10, 2007


4) Torrentflux is an alternative to command line bittorrent - it's basically a web interface to a command line client. Not feature-rich, but it does the job.

5) Also look into Firefly - it basically lets you use the server as an iTunes share. (Normally an iTunes share has to be on the same subnet, but you can tunnel it to the computer you're accessing from over the internet. mtdaap might be a better name to google, actually, but it's the same package.)
posted by spaceman_spiff at 10:05 PM on June 10, 2007


Best answer: (1) The only "disadvantage" to installing 'LAMP' is that it'll use up some disk space, and if you don't keep it updated it could be a security leak. (That said, Ubuntu makes it super-easy to stay up to date, and LAMP is generally quite a secure platform... The thing to watch is that you keep the web-based scripts you install up to date: that's how I've been 'owned' a few times.)

You'll want to install Apache/PHP/MySQL if you're going to use Gallery2. The hard part (of this whole setup, not just (1)) is going to be remote access... Many ISPs block incoming port 80 for security reasons. You can often make it work (if nothing else, run on a non-standard port), just wanted to caution you that if you run into weird problems, it's not necessarily a software problem.

I run a Gallery2 install, but find that I use Flickr more often. The "Pro" is really a good deal and I don't have to worry about eating up space on my webserver now. ;)

(3) Rsync rocks, although I've only done it Linux-to-Linux. I'd imagine it can be done Windows-to-Linux, but I've never tried it. (Once again, your home ISP may be the "weakest link" here--do you have a fast download speed at home?)

If you don't use rsync, look into SCP, which is basically a secure FTP. (There's also SFTP, which is secure FTP. Someone else can explain teh difference.) Don't use 'normal' FTP, which is completely insecure.

(4) I've never tried it on Ubuntu, but you could set up a VNC server to remotely view your desktop. You could then use a 'normal' BitTorrent desktop client like Azureus

As an aside, we've discovered that my school only blocks the downloading of .torrent files... If you can get that another way (e.g., have someone Zip it up and send it, or just change the extension), we can rename it and then use it normally. They don't block the protocol. However, I figure they're still able to notice the traffic, so I've been hesitant to use this.

(5) Yes. The RIAA is a bunch of sharks who want to charge you for each song you stream. So don't make your stream public. ;) (If I were you, I'd keep the music at school and do any 'streaming' from there, IMHO.)

(6) Security issues, not so much, but you will have to forward the ports from your 'router' to your Linux machine. Although unstated, I'm assuming you have this under control.

Wow, sorry this is a mile long.
posted by fogster at 10:38 PM on June 10, 2007


ftp and telnet transmit your password in the clear. Avoid them.

You'll want to run an ssh server. If you allow logins by password, make sure the accounts on the box have good passwords and run denyhosts . Even better would be allowing only by key but make sure you have a lot of backups of your key with you.

rtorrent is a nice text-only bittorrent client. Screen is a very handy thing for detaching and restoring sessions remotely.

I assume the Ubuntu box isn't going to be on your uni's network, right? If the network roundtrip from your Ubuntu box to your uni's network is fast enough, you could run a vpn on the Ubuntu box, and, then, though connected to the uni's network, all network communication could really go (encrypted) to your Ubuntu box and only there to the network at large. You could run bittorrent locally and your uni would only see that there's a lot of activity between your windows box and your Ubuntu server. Setting up a VPN is tricky though. Squid with an ssh tunnel would be easier to just keep your web surfing private.

Any time you intall a server or otherwise open a port on your box, there are security issues to worry about. This is long and it's late so I'll just advise you read up on 'em.
posted by Zed_Lopez at 11:53 PM on June 10, 2007


+1 for TorrentFlux, I use it on my Kubuntu server - although in my case it sits on my LAN in the loft. Complete access and control via a web interface. There's also a Firefox plugin available that gives a right-click "send to TorrentFlux" function for .torrent files.

I'd also suggest looking at NoMachine's NX system, which allows a VNC/remote desktop-type solution over a fully standalone SSH tunnel.
posted by Nice Guy Mike at 1:56 AM on June 11, 2007


utorrent works well over wine also. It can watch a directory and pickup new torrents automatically from there. It also has a scheduler.
posted by cmm at 5:04 AM on June 11, 2007


« Older Attorney practicing without license - what can I...   |   How do I label jars that have been in the... Newer »
This thread is closed to new comments.