Skip to content

Accessing Owntone remotely through iTunes Music with Zerotier

Porco Rosso edited this page Jun 7, 2021 · 5 revisions

Introduction

It is possible to access Owntone remotely through itunes/Music when paired with a virtual LAN or VPN solution such as Zerotier or Wireguard. This is useful if for instance you want to access your music library on the go, while not having to store duplicate files of your entire music collection. It is a fairly straightforward thing to do. In this case we will show how to do so using zerotier's free offering and a debian-based system.

Steps:

  1. Create a Zerotier account to access your admin console and get a 16-digit network ID.
  2. Install Zerotier on your client device

You will get a unique 10-digit node address and enter your 16-digit network ID into the join network field on the device to request access to your network. 3. Install Zerotier on your Owntone server

If you like to live dangerously: curl -s https://install.zerotier.com | sudo bash or

curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg' | gpg --import && \
if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi

Again you will get a unique 10-digit node address and enter your 16-digit network ID into the join network field on the device to request access to your network.

  1. Add your device to the network

Check the Auth checkbox on your admin console when your 10-digit node address presents itself. You may need to enable Broadcast for itunes/Music to pick up the library.

  1. Configure Owntone trusted networks in owntone.conf

In your owntone.conf file edit the trusted_networks field to include the virtual network. My config is as follows trusted_networks = { "localhost", "192.168", "fd", "10.147" } since I chose the 10.147.* network in Zerotier.

Make sure that the bind_address config line is either set to all (bind_address = "::") or includes the zerotier network address the Owntone server was assigned by Zerotier.

  1. Restart Owntone

service owntone restart

  1. Test it

If all your devices are successfully connected to Zerotier and your config changes are correct, you should be able to see your owntone library as an option on the client device!

remote owntone library in Music/iTunes

Further possibilites

  • If a friend wants to join your network they can do so in the exact same way. An easy way to share your library with friends and family!

  • While this guide has explained how to access owntone from a remote client, theoretically you could even host owntone on the cloud or in another location, and stream to local airplay devices if you manage to add them to zerotier. This could be done with a rapsberry pi running Shairport-sync and zerotier. Another option might be to set up a Zerotier bridge. I haven't done either of these things but since zerotier supports broadcasts I don't see why it wouldn't be possible.

If anyone has any other interesting configurations, please do not hestitate to add them to this guide.