Update: Download the Bash Install Script

Many people want to use the hostname when addressing their Pi on a Mac instead of an ip address. The simple solution for this is Avahi. Avahi implements Zeroconf, mDNS, DNS-SD and RFC 3927/IPv4LL under LGPL.

Instructions for the Wheezy distribution of the Pi are pretty easy:

sudo apt-get install avahi-daemon
sudo insserv avahi-daemon //makes it automatically start

//Then create a config file: (attached my basic one)
sudo nano /etc/avahi/services/multiple.service
//There are a couple different variations of this on the web but this suits my ownCloud needs
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
        <name replace-wildcards="yes">%h</name>

//Then restart the service 
sudo /etc/init.d/avahi-daemon restart

After waiting several minutes (or doing some reboots), your Apple product should be able to access your service at hostname.local. For most default Raspberry Pi users, the hostname will be ‘raspberrypi’ leaving you with ‘raspberrypi.local’.

If you would like to change your hostname, you have to edit it in a couple places “/etc/hosts” and “/etc/hostname” and then reboot your Raspberry Pi.


Leave a Reply