Router Charts

Click for Router Charts

Router Ranker

Click for Router Ranker

NAS Charts

Click for NAS Charts

NAS Ranker

Click for NAS Ranker

More Tools

Click for More Tools

NAS How To

Avahi and Netatalk Installation

Avahi is the open source implementation of what Apple calls Bonjour. It means that your new DIY Time Capsule will be advertised on your network and your Mac will know about it. So it’s good to install.

For Leopard and Snow Leopard, we need Netatalk 2.0.5 or above. However, in order to maintain compatibility with Lion we need version 2.2 or above for full AFP 3.3 support.

Debian Stable currently has version 2.1.2, which isn’t enough. But Debian Testing has 2.2 which is what we are after. So while our entire installation comes from the Stable repositories, we need to pick up Netatalk from the Testing repositories.

 nano /etc/apt/sources.list

This will load the file up in a text editor called nano. Paste the following lines into the bottom

deb http:/ wheezy main
deb-src http:/ wheezy main

and comment out the line at the top that starts with deb cdrom, i.e. insert a ‘#’ symbol at the beginning of the line.

Save and exit by pressing control+o then control+x.

Set the default repository to use:

echo APT::Default-Release "squeeze"\; >> /etc/apt/apt.conf

Then update the list of the available packages

apt-get update

There are some dependencies and other packages that we must install first

apt-get install avahi-daemon libnss-mdns

Select the default option for any questions asked.

Now install Netatalk, specifying the Wheezy/testing repository.

apt-get install netatalk libc6-dev -t wheezy

This will install the testing version of netatalk and a load of required dependencies.

Netatalk Configuration

Now we need to tell Netatalk to share the volume we created and mounted earlier. Type the following at the command prompt. Make sure it is entered as one line.

echo /mnt/MyTimeCapsuleData MyTimeCapsule allow:tmuser cnidscheme:dbd options:tm >> /etc/netatalk/AppleVolumes.default

That’s it!

Avahi Configuration

Now we must configure Avahi so it knows which services it should advertise.

We need to edit a file now, so type in the following:

 nano /etc/nsswitch.conf

Use the cursor keys to navigate down to the line that looks like this:

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 

and add ‘mdns’ at the end

Press control+o to save and then control+x to exit

Now we have to create the file that tells Avahi that our machine offers an AFP service (which happens to be a Time Capsule).

nano /etc/avahi/services/afpd.service

And then paste in the following

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->

<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <name replace-wildcards="yes">%h</name>

Note how we specify the txt-record to be TimeCapsule, so that we get the correct icon.

Again press control+o and control+x.

Now restart Netatalk and Avahi.

/etc/init.d/netatalk restart
/etc/init.d/avahi-daemon restart

Now check that your DIY Time Capsule is working. With a little luck, if you go back to your MacOS X machine in your side bar you will see a network machine called MyTimeCapsule with a little Time Capsule icon.

If you go into Time Machine, you should now be able to select the virtual machine.


I’m going to do a bit of cleanup of this virtual machine to reduce the size for downloading. This will remove different languages, manual pages and packages that we won’t need.

This section is entirely optional. Type or copy/paste the following,

apt-get install localepurge deborphan debfoster

This next one all goes on one line:

apt-get remove --purge manpages manpages-dev vim-common vim-tiny traceroute man-db gcc-4.3 cpp-4.3 info eject tasksel tasksel-data xfonts-base xserver-xorg nfs-common exim4 rpcbind debian-faq doc-debian doc-linux-text ftp

Then a few more lines:

deborphan | xargs apt-get -y remove --purge
rm -rf /usr/share/doc/
rm -rf /usr/share/doc-base/
rm -rf /usr/share/man/
rm -fr /var/lib/apt/lists/*

I also removed SSH (via the VirtualBox window) since we won’t need it anymore. Leaving it installed is a bit of a security risk, because I just know that some people won’t change the password!

apt-get remove openssh-server --purge
apt-get autoremove --purge; apt-get clean all

At this point my Debian installation is using 350 MB.

Now if we ‘zero out’ the free space on the disk, it will compact and compress better:

dd if=/dev/zero of=TEMP bs=1M; rm TEMP

Now we have finished creating the appliance, so shut it down with the command

shutdown --hP now

Once it has shut down, I am going to compact the virtual disks.

In the Windows command line on the host type in:

vboxmanage modifyhd MyTimeCapsule.vdi --compact
vboxmanage modifyhd MyTimeCapsuleData.vdi --compact

Create a Downloadable Appliance

Now make an appliance by selecting File: Export Appliance, which will result in a compressed .ova file that you can load into VirtualBox, as shown in Part 1.

It is interesting to note that the export actually creates .vmdk disks (the VMware format) instead of .vdi because the .ova format was created by VMware. However, it doesn’t really affect the outcome of this article.

I hope you enjoy your new Time Machine backup server.

More NAS

Wi-Fi System Tools
Check out the new Wi-Fi System Charts, Ranker and Finder!

Featured Sponsors

Support Us!

If you like what we do and want to thank us, just buy something on Amazon. We'll get a small commission on anything you buy. Thanks!

Over In The Forums

Hi Forum,I'm using ASUS-Merlin on a RT-AC68U router (T-mobile one I believe). It was working great.Recently (probably 380.63, not sure) router keep cr...
I have a RT-AC68U and running an old version of the merlin firmware ( It has been working perfectly, so haven't kept up with the rec...
As someone not versed in networking, this has been a frustrating, but informative path.Many have suggested an Edgerouter X with two Unifi AP Lites. I ...
Basically I'm trying to only block web browsing on a single LAN wired device. So anytime someone pulls up a web browser and types in a standard port 8...
Hi,I'm new to this forum. I'm a long time Asus router user. I'm currently on AC3200. However, I would like to add another router to extend the WIFI co...

Don't Miss These

  • 1
  • 2
  • 3
Get Backblaze Now!