HOME > > HELPFUL HINTS MENU    

You can do it! For free! Music streaming over LAN

(You can make perusing this page even easier: see my Power Browsing advice.)

I spent years inching my way towards the solution set out in this essay. There were various false starts along the way which you can be spared.

I can also save you money and layers of unnecessary complexity, if you want to stream music around your LAN.

This project is not for the novice or the faint hearted, but I am no rocket scientist, and I "got there" (in the end). I am listening to music across my LAN as I type this! I know my solution works with Windows PCs, strongly suspect it would work with Linux PCs... and I'm even hopeful that a Mac could be a client.

My answer to music streaming comes in three parts. The good news is that parts Two and Three are almost trivial. So don't give up during Part One, if it starts to make you weary.

In my case, I am working with versions of the software packages mentioned which were current 20 Feb 2010. My client machines are running WinXP.

Besides the music server, you will have some NAS ("network attached storage") which can be used to hold easily made backups, files you want available to several machines, etc.

I haven't implemented it... yet... but I believe that you can use your music server as a printer server... and other things. Part of the reason I went down the path I chose is that I don't like "narrow" solutions. I'd rather work a little harder at the outset and be left with something worthwhile and powerful when the work is done. I also like free, open source, products.


What you need

You do need a "spare" computer, which you are willing to have running when you want your music. It will take care of the "server" things I've already mentioned, and will be called "the server" from now on. But don't go out and buy a new computer for this. I set up my system in February 2010 with a computer which was more than 8 years old. It hadn't been switched on for 4 years. It only has 256k of RAM. I'm supposed to need 512, but I'm getting away with only 256. I gave it a new hard drive for a variety of reasons. The drive was bought in April 2009. Be a little careful... a too-old computer will not necessarily be able to handle a too-new drive. You should probably leave a keyboard and mouse attached to the server. A monitor will be needed during initial set-up, and may be useful while you are breaking the system in, but you don't need a monitor permanently on, or even connected once things settle down to routine operation.

The spare computer, which is going to become the server, needs a CD drive unless you are far more clever than I am. A CD is all you need; you don't need a DVD drive... although the fancier drive would be okay if you want to use one.

You need a LAN. It doesn't have to be connected to the internet, but if it is, be sure to have a good firewall in the router... and to have it switched on.

Those are the only things, apart from the music you put on the system, that you have to pay for.

You need a degree of stubbornness. This is not something you can "plug in, switch on". But it CAN be made to work! And once set up, using it should be simple.

The other parts of the package are software....

(The free, "lite", version of WinAmp is all you need for what I've done. But don't you like using something that comes from a source where what they do is sufficiently professional that people pay for the "big brother" of what you are using?)

I used an Ubuntu Linux CD while I was getting a new hard disk installed in the PC I was setting up as the server. I use Audacity to harvest tracks from my LPs (using a different computer), and rip them to MP3s.


Client/ Server

I read all sorts of things on the net over the years, and got very confused. All I wanted to do was to have my music files somewhere on the LAN without imposing them on any of the PCs I use for the various things I do, AND be able to play that music on any computer connected to the LAN. (Dedicated music players are the next thing on my "to do" list... I haven't done it yet, but they "should work" on what I have set up. Ha. We'll see. At least I can, as I am now, listen to my music via a client PC in the meantime.)

For my simple needs... and it turns out I create solutions for many other things along the way... all I need is, as I said, one old PC which I will set up as "the server". It will sit, quiet and unloved, in a suitable place with power and a connection to my LAN, and Do Its Thing. I won't need (often) to connect a monitor. I won't need to touch its keyboard or mouse. That PC will not have Windows on it. It will have something called FreeNAS installed (more in a moment), and FreeNAS will take care of everything. The machine will "boot into FreeNAS", the way you are used to your main PC booting into Windows or Linux.

The server... umm... "serves". It gives you things when they are asked for.

So how do you "ask"?

That's the "client" part. You only set up FreeNAS once, on the server. You then attach 1, 2, 3... however many you want... other PCs to the LAN, and any of them can be clients. You may also connect something like a SqueezeBox to the LAN, and it may be able to access music from the server. (I say "may" because I haven't tried this. It "should" work.)

On a general purpose PC, running Windows or Linux, which you use for email, wordprocessing, etc, you can install "client software" for playing music fetched (by that software) from the server. I am using WinAmp on a Windows machine. Early days so far, but so far all working fine. You can play music while doing other work. You can, say, have a computer in the kid's bedroom playing one bit of music, and, at the same time, a computer downstairs playing something else. (By the way, if those PCs have internet access, WinAmp will also play online radio stations, and you don't even need the server this essay is about to do that! (If your WinAmp PC won't play an internet radio, check that it isn't your firewall stopping the communications.))

I found "client" misleading at first. Perhaps I am too meek as a client. The client is in charge. The server exists for the client. The client tells the server what to do.

The word "stream" confused me for a while. Where does it come from? What switches it on and off? Which song is in the stream? How many streams can run side by side? It comes from the server, running some kind of serving software, FreeNAS in my case. A client machine sends a command to the server to turn a stream on, playing the song (or group of songs) of the client's choice. The client needs some client software, WinAmp in my case. How many streams can there be? I don't know... but I know that two work okay side by side. You can have two songs playing at the same time, if you have two client machines on the LAN. (I hope they are in different rooms!)

Another "by the way"... if you want the same music playing in each room, as if you had multiple radios, all tuned to the same station, then I don't know the answer. I think you may be able to get clients on the LAN synchronized, and all playing the same stream, at the same time, but I haven't "gone there" yet.


So... Let's Do It...

I wasn't sure this project was going to succeed. I had my old PC, the one that has become the server, "working", within the limits imposed by its age. I had, for it, a Windows license that I didn't want to throw away. I also knew that the disk in it was elderly, and the server's whole life is founded on its disk.

So I took out the old disk, and put it someplace safe. I can always just reinstall it, if I decide that the "make a music stream server" project is a bust.

I put a new hard drive in the system. It was an 80gig Western Digital, PATA, if you are interested. (The system was an Acer Altos 350).

Before I got anywhere with FreeNAS, I had to get the server to see the new disk. And it turned out later that moving it to a different IDE channel would not work well, so if you are "doing things", remember that along the way.

It probably won't be necessary for most people, but I eventually found that telling the BIOS to reset itself to its defaults "fixed" things for me. (I then did numerous tweaks, of course.)

You'll find in some BIOS dialogs advice saying "turn off auto LBA". In my case, the system seems to work better if it is left on auto, which was my BIOS's default. (What's this "better"?? Surely it "works", or doesn't? Well, I'm getting indications that sometimes, although thankfully not yet with the latest setup, I get READ_DMA (or WRITE_DMA) warnings... although I don't think I've lost any data yet.)

Within the BIOS settings, you need to visit the pages for the disk(s) in your system. The "auto" settings will probably be okay. If your BIOS "sees" your hard drive, probably all is well.

Within the BIOS settings, you need to set the sequence for the boot devices to....

If you don't have the option of setting the hard disk as a boot device, you probably need to do more work in other parts of the BIOS setup. (Or plug in that cable you forgot to connect... one for power, one for data in "good old", simple PATA drives.

The drive doesn't need to have been formatted, doesn't need an operating system on it.

If all seems well, you might just skip the next step, but at this stage, I did some playing with Ubuntu in the box which became my server. This is because I know a bit about Ubuntu, and when all this started I did not know about FreeNAS. I just....

I then elected to run Ubuntu from the CD, and just played about a bit to see that the box was working. An install of the Ubuntu to the hard drive would do no harm, if you want to do further testing before going on, but be advised that you will be overwriting this in the next step.

I then...

The next bits must have been pretty painless, as I can't remember many details. I asked for a full install to hard disk, creating three partitions. I changed the FreeNAS (or was it called "the OS"?) partition from the suggested 128 to 256 meg. I left the swap partition at the suggested 147meg. As I remember things, everything was made very clear, what I had to do next was explained. Just be careful at the end of the install to take careful note of the things you have to set up. They aren't complicated, but you do need to do what you are told!

Along the way, I was asked for the IP address to use for the server. I chose to turn of the DCHP option, and assigned a static IP address for the server, 192.168.0.80, as it happens. You can change the last two digits to most things between 10 and 254. In some cases, even other numbers will work, but if you don't know the details of that, you can live with one of the numbers between 9 and 255, can't you?

I was asked for the IP address to use for the server's gateway. I'm pretty sure this is it's route to the "outside world", and I didn't want it having one for the moment. I set that to another static address, 192.168.0.81

I set the subnet mask to 255.255.255.0

That was about it for settings at this stage, I think.

After noting the "do next" instructions, I rebooted the server, taking out the "Install FReeNAS" server CD along the way. I then connected the server to my LAN. (It hadn't been connected before this).

You may have firewall/ anti-malware hassles to overcome. Just don't be too free and easy with that "turn off firewall" button... if the firewall is your problem, fix it properly, don't just leave your firewall off.

In theory, you don't need to touch the server or read it's monitor again. Good luck. (If you want to know more about what you could do from the console, see the notes at the end.)

Go to a machine on the LAN, and enter the server's URL into your browser. I use Firefox. Wey Hey! (I hope)... you should see a nice clean FreeNAS home page asking you for your user ID and password. Enter "admin" and "freenas". (Yes, both all in lower case.) If you have between 255 and 511k of RAM in your server, don't be (too) alarmed about the "ZFS WARNING: Recommended RAM is 512..." message which will pop up on the server's monitor.

Make those settings that you noted down a moment ago... AND, if your clients are Windows machines, go into the Services | CFIS/ SMB page, the "Settings" tab. You don't have to make many settings, but you do have to enable the service... small tick box, upper right. Be sure to do "Save and Restart" (bottom left) from time to time, too.

Settings.... Books could be written. For our purposes....

(Workgroup: Must match what you are using for the other computers on the LAN. For WinXP, right-click on MyComputer, click on "Properties", look at the "Computer Name" tab. The workgroup it belongs to is shown there too.)

Next... and I think this may be new from FreeNAS 0.7... still in "Services | CIFS/SMB, go over to the "Shares" tab, and create one. (Use the "+" icon at the right of the so- far- empty table. I think you get help in the form of clues that the root of the share should be "/mnt/" I made the path for my first share "/mnt/MyFirst/", named it "FirstShare", put the date I created it as the "Comment", and set it as "Browseable". Again, there's a "Make it so" (or somesuch) button to click. There may be re-boots to endure from time to time.

I think you now have working NAS, "network attached storage". Open Windows (not Internet) Explorer (Windows-key + e), and you should be able to browse to a network place called FirstShare. You don't have to "map the network drive" (i.e. set it up with a drive letter) to use it. Try creating a folder, and writing a little text document in it. If you have another PC on the LAN, see if you can see what you just created. No? (To any of the above?) Don't despair... yet. You know how flaky Windows can be about seeing things on the LAN. In Windows Explorer, try a few f5s to refresh the folders, that may be enough. Use a command line to ping 192.168.0.80 (or whatever IP address you used... you should see "Reply from" within 5 seconds. (If you don't, you should eventually get "Request Timed Out" four times, and then the box will go away.) Try searching for the new computer, for freenas, or whatever you called it. Failing all of the above, and it won't be a regular feature of your life with FreeNAS, but given all the "stuff" you've been doing, try switching everything off, and then bringing them back to life, FreeNAS first.


Part two... tiny....

Once you have your NAS in place, put some music on it!

In the root of the share just described, I put a folder called "Music- TKB". (I don't like the may "My this" and "My that"s which get put on my system, will- I, won't- I.... and I use names like "Music- TKB" so I can tell when something was put there by me, for me. ("TKB" is my initials).

In that, I put a folder called "Eton", and in that I put some MP3s of some music performed by boys from Eton College. I bought the MP3s from e-Classical. (Some free demo stuff, single tracks as little as 50 cents, 14 tracks in a convenient .zip file: $8.86)

You might wonder why I made such a fuss about the MP3s I used? Won't any old MP3s do? Yes... up to a point. If you buy a professionally prepared set, and put them in their own folder, you'll get things like track titles easily. Other MP3s will work, and they can be in other folders. Titles can be added other ways. Stories for another time. Just get some MP3s in place!


Two down, one to go....

So! You have set up FreeNAS, and can see files there with Windows Explorer from a client machine on the LAN. You have put some MP3 files on the server.

At last we come to good news! The setting up of the client is EASY.... well, it was for me, anyway. Hope you have similar luck.

I just downloaded the free version of WinAmp, installed it, started it up, and "added media to library". That function is on the file menu of both the "WinAmp" and the "Media Library" windows. When you've invoked the function, you just browse your LAN, going through "My Network Places" to the server, and then down to the folder equivalent to my "Music-TKB" folder.

The system looks at what's in the folder, and builds a table of available pieces of music. Click on one, click play, and, if your speakers aren't muted or some other silly thing, you should hear the song!

There was talk in a post I came across saying that you needed (on the client) to "map a drive" (to the NAS folder), and access the folder that way. I didn't find that to be necessary... perhaps due to the extra "set up share" feature, which is in FreeNAS, and new in 0.7, I think.


Odds and ends...

Because it has worked well for me, and is another open source, free, application, I'd like to mention Audacity. It is a music file editor, and will do a good job of capturing audio and converting it to the MP3 format.

Play lists: Your NAS will eventually have many MP3 tracks on it. If you wish to pick a group, say 5 tracks of harpsichord with voice, to be played together, you will, whether you know it by name or not, wish to create a playlist. They can be stored either on the NAS (I'd set up a separate folder for your playlists), or on the client machine. If that playlist is stored on a client, only that client can use that playlist.

To avoid overplaying one list, and never playing another, I have 7 playlists named ddMon, ddTues, ddWed, etc. The "dd" keeps them all together in lists of playlists. On Monday, unless I want something else, I play the ddMon list. And if I tire of that, the ddSun list, working my way backward, "upstream", as need be. And thus, when Tuesday comes along, if I want something fresh, the ddTues playlist should suit.

Dedicated devices. Things like the Logitech SqueezeBox, or the Linn Majik DS may suit... but beware... some devices only work if coupled with a server from the same manufacturer. In the "default" setup of FreeNAS, as described above, I think that UPnP (Universal Plug aNd Play) is not turned on... but there is a way to turn it on. Will it be the right version for the dedicated device of your choice? Who knows... but USB devices do a pretty good job of connecting to everything... so perhaps I can hope that Universal Plug and Play will work...

Console: Remember when you were working directly on the server, instead of manipulating it across the LAN, using your web browser in a client machine? There was that rather tempting menu under the heading "Console Setup". You should not need to "play" with that, but what if you want to? If you press 6, and press the "enter" key, you will be able to give the server commands from a vast list of possibilities. FreeNAS is built upon FreeBSD, and its commands are listed in various places on the web. JUST DON'T MESS THINGS UP! Do you really want to re-install FreeNAS from scratch? Don't use "CAT"... it doesn't mean "catelog". "ls" (as in LiSt) is a close equivalent to the DOS dir command. It is case sensitrive, by the way. "df" gives a report on the disk space you have, the space you've used. (Look at the bottom of the report from "Status | System" in the browser GUI for a less exact report of disk usage.) Use "exit" to get out of the shell when you finally realize you've been playing with dangerous prescription medicine. The browser GUI saves you having a monitor on the server, is much easier to use, and lets you do anything you need to do.



Best wishes!

I hope your system is up and running, or if it isn't that it soon will be. In troubleshooting, try to isolate the elements.

Enjoy your music, doubly sweet for the satisfaction you should feel after getting all the parts working together properly!



To search THIS site....

(Click this to search the site without using forms, or just use...)

Powered by FreeFind

Site search Web search

The search engine merely looks for the words you type, so....

Please also note that I have other sites; this search will not include things from them. Each site has its own search button.

My SheepdogGuides site.
My site at Arunet.

Ad from page's editor: Yes.. I do enjoy compiling these things for you... I hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!
--Click here to visit editor's freeware, shareware page.--

Other projects

This is part of just one of my web sites. Please visit any of the following....

Main table of contents for all my "Helpful Hints" pages
Delphi Tutorials
Pascal programming tutorials
Electronics for hobbyists and schools
Main Home Page... various topics, not all computery.


You can email this page's editor, Tom Boyd. Click here for details.

Valid HTML 4.01 Transitional Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org

-- Page ends --