Chris Tankersley

Music While You Work

Posted on 2007-05-25

One thing that really helps me code is music. Not that crap that they play on the radio at work or on 90% of the radio stations out there that I can't pick up in the office because I don't have an actual radio, but good music, like what's on my iPod. What do I do when I'm at work and I want to listen to some music?

If you have a broadband connection at home and a somewhat decent upload speed, SlimServer is a great choice for accessing your music when you are away from home. It runs on either Windows or Linux, both of which are completely free. It is also very easy to set up.

Requirements

  • A computer running Windows, OSX, *Nix, or an OS that can run perl

  • Broadband connection

  • A static IP or a Dynamic DNS Service such as DynDNS

Considerations Before Installing

  • SlimServer does not read mapped network drives. If your MP3s are on another machine you will need to use the full UNC path (ie: \servername\share\folder)

  • The Windows version can get RAM hungry. Make sure that you have around 100+ megs of free RAM when running it, more if you plan on using large playlists.

  • Upstream bandwidth is your friend. Most residential broadband users have lousy upload. If you have at least 256k you should be fine.

Installing

Head on over to http://www.slimdevices.com/su_downloads.html and grab the latest installer. At this time there are Windows, OSX, Debian and RPM packages built as well as perl source code. I will be setting the service up on Windows, but the configuration is almost the same on all platforms.

Slimserver Taskbar IconAfter you have the package downloaded, install it. In Windows you will see a small Slimserver icon pop up in the taskbar and your web browser will open up and take you directly to the Slimserver interface which is located at http://localhost:9000/.

Add Your Music

Slimserver - Music FolderIn the left panel, scroll down and click on 'Server Settings.' The second option down should read 'Music Folder.' Type in the path to your music (either a folder on the local machine such as C:\Documents and Settings\User\My Document\My Music or \server\share\folder) and click the 'Change' button. The page will refresh and the settings will be saved.

On this page you can also force SlimServer to rescan your music folder for newly added music. If should do this automatically, but if not you can scroll down and click on the 'Rescan' button to make SlimServer look.

Add Some Security

I don't know of any vulnerabilities in SlimServer, but one never knows. Under the drop-down menu at the top of 'Server Settings', select 'Network.' The option we want to change under here is the 'Web Server Port Number', which is currently set to 9000. Change this to any high-numbered port that you want, but make sure that you remember what number you change it to.

After that, go back up to the drop-down menu and select 'Security.' Change 'Password Protection' to from 'No password protection' to 'Password Protection', and then fill in a username and password below that.  You also have the option of locking SlimServer down to only letting specific IP addresses connect, but I leave it set to 'Do Not Block' so that you can access SlimServer from anywhere.

Set Up Port Forwarding On Your Router

You do have a router, right? If not, get one. The internet is a dangerous place. Log into your router and head for the Port Forwarding section of your router (see router documentation for this). You will need to forward the port you set SlimServer to toward your computer's IP. This allows you to access SlimServer from the outside world. Once the port forwarding is set up you are all set.

Tricks

Use Port Forwarding to Bypass Firewalls

So you got your SlimServer set up to listen to it at work, but your work has all the ports to the outside world locked down except port 80 for internet traffic? Don't fear. Most routers will allow you to do what amounts to port redirection when you forward the SlimServer port to your home machine. Simply set the external port to 80, and the internal port to whatever you set SlimServer to. Your home router will take care of shuffling everything around so that it works seamlessly.

Be warned, however, that many scanners will find this open port. Make sure that you have set a username and password for SlimServer, or anyone can access your music.

Use LAME to re-encode your MP3s on the Fly to Lower Bitrates

If you have a really slow upload, you can use LAME to re-encode your MP3s to lower bitrates. To do this, simply download LAME from http://mitiok.cjb.net/ which has Windows-compiled versions of LAME. Extract the files and then move Lame_enc.dll and Lame.exe to the server\bin\ folder inside the path you installed Slimserver to (normally C:\Program Files\Slimserver).

Inside SlimServer go to 'Player Settings for your.ip.shown.here', and then in the dropdown menu select 'Audio.' The options for setting up LAME are here.

Have fun listening to all your MP3s from anywhere that you have an internet connection!


Comments