LibreELEC as Time Machine backup network device

Published on Author Artem Butusov12 Comments


If you already have LibreELEC with big disk connected to it, maybe even RAID1 (mirror) which is really good for storing backups in safer way, then it could be a good idea to make LibreELEC works as cheap alternative to Apple Time Capsule.


Install entware-ng (optware-like with opkg package manager) on your LibreELEC device firstly. Follow this article:


Install netatalk

Please note, this manual is for netatalk v3.x, there is a difference in configuration between v2.x and v3.x. See here for more details:

Connect over SSH.

opkg install netatalk

Configure netatalk

Create folder for Time Machine backups:

mkdir -p "/storage/mirror/Time Machine"

Make sure that storage path is accessible for user who will access it, for anonymous access you will need to give “rwx” for all for target directory and all parents should also have “x” for all.

nano /opt/etc/afp.conf
  • uam list (authentication engine)
  • vol size limit (volume size in MiB) – allowed volume size (usefull to limit max backup size)
  • ea (extended attributes) – set to “none” if you don’t really care about attributes

Example with anonymous access:

uam list =

[Time Machine]
time machine = yes
path = /storage/mirror/Time Machine
vol size limit = 1048576
ea = none

path = /storage/mirror
ea = none

Let anonymous (nobody) read afp.conf:

chmod 644 /opt/etc/afp.conf

Create systemd service units

Create service unit for afpd:

nano /storage/.config/system.d/netatalk.service

Please note, I set storage-mirror.mount in After to make sure that netatalk will start after my RAID1 will be mounted to /storage/mirror.

After=avahi-daemon.service storage-mirror.mount

ExecStart=/opt/etc/init.d/S27afpd start
ExecStop=/opt/etc/init.d/S27afpd stop


Enable netatalk on reboot and start service:

systemctl enable netatalk
systemctl start netatalk

Create service unit for cnid_metad:

nano /storage/.config/system.d/netatalk-cnid_metad.service

ExecStart=/opt/etc/init.d/S26cnid_metad start
ExecStop=/opt/etc/init.d/S26cnid_metad stop


Enable cnid_metad on reboot and start service:

systemctl enable netatalk-cnid_metad
systemctl start netatalk-cnid_metad

Fix avahi configuration

Avahi daemon is used for auto discovery. Properly configured Samba and AFP shares will be available for mounting directly from OS X Finder.

There is only one problem. Both Samba and AFP shares could not work together on device with the same name. At least it doesn’t work well for me.

Here is a workaround: show AFP and Samba shares under different device name. In that case you will be able to mount both types of shares and auto discovery will still work for them.

There is one small problem actually. We need to edit avahi configuration, which is located in /etc on read only root.

We could either modify LibreELEC image OR we could use overlay fs to overlay etc. I found that second solution is easier.

Overlay /etc

Create folders for overlay fs:

mkdir -p /storage/modroot/etc /storage/modroot/.work

Create new systemd mount unit:

nano /storage/.config/system.d/etc.mount

with content:




Enable and start /etc overlay mount:

systemctl enable etc.mount
systemctl start etc.mount

Now you should be able to create new files in /etc.

Create AFP avahi service

Create new file:

nano /etc/avahi/services/netatalk.service

with content:

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <name replace-wildcards="yes">AFP on %h</name>

Create Samba avahi service

Create new file:

nano /etc/avahi/services/smb.service

with content:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <name replace-wildcards="yes">SMB on %h</name>


  • model=Xserve will impact on device icon in OS X Finder.

Restart avahi

Restart avahi:

systemctl restart avahi-daemon

Once you will restart avahi OS X Finder should show new devices and their shares.

Fix OS X configuration

By default OS X will not show our AFP shares as available for Time Machine backup but we could fix that.

Run in terminal on OS X:

defaults write TMShowUnsupportedNetworkVolumes 1


With this setup you should be able to see separate device in Finder for Samba and AFP shares. AFP device should have two mount points: Mirror and Time Machine. “Mirror” could be used for regular data and “Time Machine” should be available as backup target volume in OS X Time Machine backup tool.

You need to mount “Time Machine” volume first before it will become available in Time Machine as target backup disk.

In this setup “Time Machine” has no authentication and should be mounted with “Guest” account.

We could setup authorization but it will require modification of /etc/passwd. It is doable but will require more effort.

NOTE: Backing up to network device could be significantly slower due to slower IO over network and due to the fact that network backups are using sparse bundle drive images as container, which is slower than backing up directly to attached physical disk.

Extra documentation

12 Responses to LibreELEC as Time Machine backup network device

  1. Another bit of useful information. One could edit SYSTEM by booting LE server from some linux live USB. Fedora live usb (28) is not really good – it does not have mksplashfs. Ubuntu (18.04) is better – it has mksplashfs by default.

  2. Hello again Artem.

    Did you try you instruction on the new libreelec 9.0.0? I am getting this in the log of (failed!) etc.mount service:

    LibreELEC mount[177]: mount: mounting overlay-etc on /etc failed: No such device

    But even if I start it manually and bounce avahi-daemon, still cannot see libreelec in Finder…

  3. 9.0.2 – still the same, etc.mount fails at reboot but works ok from ssh “systemctl start etc.mount”

  4. Hi Artem! Tell me please how do I preserve changes to etc between reboots ? It’s mounting /storage/modroot/etc but files in etc are not changed 🙁

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.