Yes, it can. (I've been doing this for years.)

Types of disks you can use with Time Machine on Mac

On network volumes, TM backups are stored as sparsebundles.

Samba v4.8 or higher, has to be configured with macOS extensions, plus the share has to be configured for Time Machine.

Configure Samba to Work Better with Mac OS X

Depending on the host system, there might be a GUI (Synology DSM), otherwise Samba's smb.conf needs to be modified accordingly.

Answer from user302097 on Stack Exchange
Top answer
1 of 4
5

Yes, it can. (I've been doing this for years.)

Types of disks you can use with Time Machine on Mac

On network volumes, TM backups are stored as sparsebundles.

Samba v4.8 or higher, has to be configured with macOS extensions, plus the share has to be configured for Time Machine.

Configure Samba to Work Better with Mac OS X

Depending on the host system, there might be a GUI (Synology DSM), otherwise Samba's smb.conf needs to be modified accordingly.

2 of 4
1

Starting with macOS Tahoe, the AFS protocol for Time Machine is no longer accepted. One must use Samba with modern macOS for a homemade Time Machine.

At the time of writing, Tahoe is the latest macOS.

  1. Install samba. Make a group smbgroup and add a new user intended to only be used with the Samba connection:

    • sudo groupadd smbgroup
    • sudo useradd -M -s /usr/sbin/nologin timemachine
    • sudo usermod -aG smbgroup timemachine
  2. Set that new user's Samba password with smbpasswd and enable the account:

    • sudo smbpasswd -a timemachine
    • sudo smbpasswd -e timemachine
  3. Set up ACL support

    • sudo apt install acl (or equivalent for your package manager if not using a Debian-based distro)
  4. Create the Time Machine directory. I keep it in /srv as it's the idiomatic place to keep it on Linux.

    • sudo mkdir -p /srv/timemachine
    • sudo chown timemachine:smbgroup /srv/timemachine
    • sudo chmod 2770 /srv/timemachine
    • We use 2770 rather than 770 because the 2 (setgid bit) ensures new files are owned by smbgroup.
  5. Add ACLs

    • sudo setfacl -m group:smbgroup:rwx /srv/timemachine
    • sudo setfacl -d -m group:smbgroup:rwx /srv/timemachine

There are several guides on how to configure smb.conf correctly for Time Machine. I will share my config below, just in case it helps. This is on Debian 13 and only serves macOS clients on Sequoia and Tahoe. I don't use Avahi/Zeroconf because the server remains connected around the clock without any issues.

[global]
   server role = standalone server
   workgroup = WORKGROUP
   netbios name = fileserver
   security = user

   log file = /var/log/samba/log.%m
   max log size = 1000

   server min protocol = SMB3
   client signing = required

   obey pam restrictions = yes
   pam password change = yes
   unix password sync = yes

   inherit acls = yes
   map to guest = Bad User

   vfs objects = catia fruit streams_xattr
   fruit:metadata = stream
   fruit:resource = stream

[TimeMachine]
   path = /srv/time-machine
   browsable = yes
   read only = no
   guest ok = no
   valid users = @smbgroup
   vfs objects = catia fruit streams_xattr
   fruit:time machine = yes
   fruit:model = TimeCapsule
   fruit:metadata = stream
   create mask = 0660
   directory mask = 0770

Pro Tip: If making a fresh partition for Time Machine use, XFS is recommended more so than EXT4, because XFS is not susceptible to issues that could arise with an EXT4 FS, especially on larger drives. Basically, each file creates an inode for its metadata, but you have a limited number of inodes in ext4, whereas this isn't a problem that exists in XFS. This matters because Time Machine creates many very small files, so it would be possible to run out of inodes. This is what -T news exists for (the term is from news servers would would have many small text files). Formatting ext4 with -T news gives you more inodes if XFS isn't an option, so if you must use ext4, it would be recommended to format it with the news flag.

🌐
TrueNAS
truenas.com › docs › scale › shares › smb › setupbasictimemachinesmbshare
Adding a Basic Time Machine SMB Share | TrueNAS Documentation Hub
May 14, 2026 - When you want to customize the dataset, use the Add Dataset screen to create the customized dataset and a basic SMB share. After saving, go to Shares, select the SMB share, and click Edit to change the purpose to Time Machine Share.
Discussions

Backing Up macOS via Time Machine to a network SMB share

you can also use a synology device: https://www.synology.com/en-uk/knowledgebase/DSM/tutorial/Backup_Restore/How_to_back_up_files_from_Mac_to_Synology_NAS_with_Time_Machine

More on reddit.com
🌐 r/macsysadmin
17
16
December 5, 2018
Any Way to use a SMB Server for Time Machine?
My ReadyNAS system has the TimeMachine backup option in its configuration. Under the hood, the ReadyNAS system is a version of Debian Linux, so there’s probably some package that may make it show up as a TimeMachine backup rather than just a Windows share. More on reddit.com
🌐 r/MacOS
5
6
July 9, 2021
Issues with TimeMachine / Samba on MacOS 13.2 Ventura
Similar set up, similar issues after upgrading to 13.2. Multiple other posts in this r/ with other's impacted in similar fashions (plain old "not Time Machine" SMB file sharing appears to have issues as well). Consensus is that a software defect that was introduced in 13.2 that's rendered SMB unusable. Hoping to see a 13.2.1 update to address this quickly. More on reddit.com
🌐 r/MacOS
13
2
January 30, 2023
11.0.1 TimeMachine on Samba broken?
Time Machine update with macOS 11.0.1 now uses APFS snapshots. Maybe this is the problem? More on reddit.com
🌐 r/MacOSBeta
15
3
November 9, 2020
🌐
Sarah Robin
sarah-robin.com › blog › ultimate-guide-samba-time-machine-backups
Ultimate Guide to Configuring Samba for Time Machine Backups on Debian Servers | Blog | Sarah Robin
November 1, 2024 - This setup allows Time Machine to recognize the share and store backups here. Samba’s support for fruit:time machine = yes eliminates the need for creating sparsebundles, as each macOS device will automatically create its own bundle within the share.
🌐
Manjaro
manjaro.site › home › how to configure time machine to backup to samba shared folder
How to Configure Time Machine to Backup to Samba Shared Folder - Manjaro dot site
December 25, 2020 - It comes with every macOS installation and actually it works very well. As a Hackintosh user, I do not like how the Time Machine save the backup. By default it does not supports Windows shared folder or samba share. In this example, I am using macOS Big Sur 11.1 and I use the TrueNAS server to store the Time Machine backup.
🌐
Reddit
reddit.com › r/macsysadmin › backing up macos via time machine to a network smb share
r/macsysadmin on Reddit: Backing Up macOS via Time Machine to a network SMB share
December 5, 2018 -

Is there a proper way to backup macOS via Time Machine to a network SMB share? I prefer to use a Windows share. If it's not possible, which OS would support Time Machine backup to a network SMB share?

Thank you.

EDIT I think I should clarify the things I have. So I have 1 Mac Mini with about 230GB used that's currently running Mojave that has APFS. I don't want to purchase additional hardware, because the hyperconverged 3-node cluster that I have has 40TB of usable space (about 1/3 of that space is used right now). With this hypercoverged 3-node cluster, I could use any Windows and Linux OS's. We set up data protection and it has its own node failover. I have a backup solution for this cluster as well. So basically, I would be backing up the Mac Mini on to a VM and then backing up the VM on to a backup drive.

I've set up the sparse bundle image and successfully backed it up via Time Machine on a Windows SMB share. Unfortunately, I was not able to restore the backup to a different Mac device that I'm testing right now.

I would like to know if there's an easier way to backup the Mac Mini without purchasing additional hardware.

Thanks again.

🌐
Lesterhightower
lesterhightower.com › blog › posts › macos-timemachine-to-smbfs
MacOS Time Machine to SMBFS | Blog - Lester Hightower
March 29, 2023 - And so, having Time Machine backup to a network file server is an attractive option, particularly if you have Time Machine target both a local and a network disk, which is supported. The way that my wife’s iMac is setup now is that it backs itself up to two places: A local Firewire 800 portable drive. A SMB file share on a Linux machine served via Samba.
🌐
Stefan Johner
blog.jhnr.ch › 2023 › 01 › 09 › setup-apple-time-machine-network-drive-with-samba-on-ubuntu-22.04
Setup Apple Time Machine network drive with Samba on Ubuntu 22.04 - Stefan Johner
January 9, 2023 - Basically Samba shares the network drive and avahi makes it work with apple devices by implementing Apple’s Zeroconf architecture (also known as “Rendezvous” or “Bonjour”). Finding the right samba configuration took me a while, but ...
Find elsewhere
🌐
Jpatrickfulton
jpatrickfulton.dev › blog › 2023-06-23-samba-and-timemachine
Samba and macOS Time Machine - jpatrickfulton.dev
October 3, 2023 - Add the following to the end of the file to create a dedicated share for time machine backups: ... [backupshare] comment = Apple Backup Shared Folder path = /mnt/samba/applebackups fruit:time machine = yesforce user = smbuser force group = smbgroup read only = no browseable = yes create mask = 0664 force create mode = 0664 directory mask = 0775 force directory mode = 0775
🌐
Son of Sun Tzu blog
blog.sonofsuntzu.org.uk › posts › how to configure a samba server to accept time machine backups
How to configure a Samba server to accept Time Machine backups | Son of Sun Tzu blog
July 20, 2025 - You can configure a Samba server, running from a Linux system ( Debian bookworm in my case ), so that a macOS system will put your Time Machine backups on its shares.
🌐
FreeBSD Foundation
freebsdfoundation.org › home › written › samba-based time machine backups
Samba-based Time Machine Backups | FreeBSD Foundation
September 6, 2024 - Samba-based Time Machine Backups # zfs create -o refquota=500g -o refreservation=500g backup/timemachine/tim The two of them will never be able to log into my backup server (they don’t care anyway), but they still need to have a user on the system to mount the storage for Time Machine.
🌐
OneUptime
oneuptime.com › home › blog › how to configure samba for macos time machine backups on ubuntu
How to Configure Samba for macOS Time Machine Backups on Ubuntu
March 2, 2026 - [global] # Basic server settings workgroup = WORKGROUP server string = Ubuntu Backup Server server role = standalone server # Enable Apple Extensions for Time Machine support fruit:metadata = stream fruit:model = MacSamba fruit:veto_appledouble = no fruit:wipe_intentionally_left_blank_rfork = yes fruit:delete_empty_adfiles = yes # Security settings security = user encrypt passwords = yes passdb backend = tdbsam # Logging log file = /var/log/samba/log.%m max log size = 1000 logging = file [TimeMachine] # Share path - adjust to your backup directory path = /mnt/backup/timemachine valid users = t
🌐
Reddit
reddit.com › r/macos › any way to use a smb server for time machine?
r/MacOS on Reddit: Any Way to use a SMB Server for Time Machine?
July 9, 2021 -

I have a 27" iMac (2020) and want to back it up with Time Machine. Recently I set up a NAS using a Raspberry Pi 4 and a 6TB WD Elements External HDD. Now I want to use this NAS as a Backup Server with Time Machine.

If I remember correctly, you create a TimeMachine Sparsebundle, mount it and set it as destination using "tmutil" in the Terminal. But every time I have done this, after a Week it would say to me that it needs to create a new Backup to enhance reliability or something.

So, my question is what I am doing wrong and if there is any way to prevent the Backup from corrupting?

🌐
Apple Support
support.apple.com › guide › mac-help › back-up-to-a-shared-folder-mchl31533145 › mac
Back up to a shared folder with Time Machine on Mac - Apple Support
On the Mac you want to use as a Time Machine backup destination, choose Apple menu · > System Settings, click General in the sidebar, then click Sharing . Turn on File Sharing. Click , click Options, then make sure “Share files and folders using SMB” is turned on.
🌐
Al4
blog.al4.co.nz › 2024 › 04 › samba-config-for-apple-time-machine
Samba config for Apple Time Machine | Al4
April 4, 2024 - In /etc/samba/smb.conf under the [global] section, I have the following (not complete config, just the relevant settings): protocol=SMB3 vfs objects = acl_xattr fruit streams_xattr aio_pthread fruit:aapl = yes fruit:model = MacSamba fruit:posix_rename = yes fruit:metadata = stream fruit:nfs_aces = no recycle:keeptree = no oplocks = yes locking = yes ... I believe SMB3 is required – Time Machine struggles with older protocols.
🌐
Oh Ok
ohok.org › home › how to use any smb share for time machine backups
How to use any SMB share for Time Machine backups - oh, ok.
July 21, 2025 - For that, launch the Automator App and build this simple workflow: Get Specified Servers (add the SMB share root) -> Connect to Servers | (ignore input) | Get Specified Finder Items (add the Time Machine File) -> Open Finder Items.
🌐
GitHub
github.com › danielewood › misc › blob › master › Samba-TimeMachine.md
misc/Samba-TimeMachine.md at master · danielewood/misc
Recently Samba and in turn FreeNAS have added support for a Samba share to act as a SMB based Time Machine Target for Apple devices. We had a need for allowing multiple users to backup to a Time Machine Target but didn’t want them to have to enable encryption with a password they may forget ...
Author   danielewood
🌐
Blackhats
fy.blackhats.net.au › blog › 2021-03-22-time-machine-on-samba-with-zfs
Time Machine on Samba with ZFS - Firstyear's blog-a-log
In smb.conf you define the share that exposes the timemachine backup location. You need to set additional metadata on this so that macos will recognise it correctly. [global] min protocol = SMB2 ea support = yes # This needs to be global else time machine ops can fail.
Top answer
1 of 2
2

I encountered the same issue, having my Mac refusing to create the initial sparse bundle files on my samba server. After incorporating the hints on https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X it finally started the backup.

Although I can only assume, the following comment caught my attention: How to store OS X metadata: fruit:metadata = stream

You could try switching from netatalk to stream. Maybe using netatalk prevents time machine from storing its metadata.

Good luck, Kay

2 of 2
2

Thought I'd post some additional info for people. My currently working smb.conf is as follows. Adding fruit:metadata = stream worked for only a short while for me, so below are the results of hours of additional testing.

Note this is on Debian 10 (Buster) so things like password change command will be different on other distributions. Also note that the order of modules in the setting vfs objects = catia fruit streams_xattr is significant and important.

# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic 
# errors. 
[global]
   workgroup = WORKGROUP
   min protocol = SMB2


   log file = /var/log/samba/log.%m
   max log size = 5000
   logging = file
   security = USER
   
   panic action = /usr/share/samba/panic-action %d

   server role = standalone server
   obey pam restrictions = yes
   unix password sync = yes

   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   username map = /etc/samba/users.map
   map to guest = bad user
   guest account = XXXYOURGUESTACCOUNT

# Time Machine settings
   vfs objects = catia fruit streams_xattr
   fruit:model = RackMac
   fruit:advertise_fullsync = true
   fruit:metadata = stream
   fruit:veto_appledouble = no
#default is yes, not necessary to specify fruit:posix_rename = no
#default is yes, not necessary to specify fruit:zero_file_id = yes
   fruit:wipe_intentionally_left_blank_rfork = yes
   fruit:delete_empty_adfiles = yes
   ea support = yes


#default is yes, not necessary to specify   fruit:aapl = yes

   # Make share visible to Windows
#Disabled for a Mac-Only network
#   lanman auth = no
#   ntlm auth = yes
#   wins support = yes
#   local master = yes
#   preferred master = yes

   # Allow symlinks
#   follow symlinks = yes
#   wide links = yes
#   unix extensions = no

#======================= Share Definitions =======================
[SHARED DRIVE]

   path = /PATH/TO/YOUR/SHARED/FOLDER
   valid users = @YOURGUESTUSERGROUP
   writable = yes
   durable handles = yes
   kernel oplocks = no
   kernel share modes = no
   posix locking = no
   vfs objects = catia fruit streams_xattr
#default is yes, not necessary to specify   ea support = yes
#default is yes, not necessary to specify browseable = yes
   read only = no
   inherit acls = yes
   fruit:time machine = yes
   fruit:metadata = stream
   fruit:locking = netatalk
   guest ok = yes

[Time Machine]
   path = /PATH/TO/YOUR/SHARED/FOLDER
   valid users = @YOURGUESTUSERGROUP
   writable = yes
   durable handles = yes
   kernel oplocks = no
   kernel share modes = no
   posix locking = no
   vfs objects = catia fruit streams_xattr
#default is yes, not necessary to specify   ea support = yes
   browseable = no
   read only = no
   inherit acls = yes
   fruit:time machine = yes
   fruit:metadata = stream
   fruit:locking = netatalk
   fruit:time machine max size = 1.9T

**EDIT: Turns out Samba 4.9 on Debian 10 DOES automatically advertise TimeMachine destinations, as long as there are no Samba-related advertisements in /etc/avahi/services. My system wasn't advertising the TimeMachine share because I also had a manual smb share setup for avahi. When I disabled BOTH, Samba properly advertised both.

*** OLD SEE ABOVE Also note that The Samba build with Debian 10 currently does not have built-in support for advertising Time Machine shares. Normally specifying fruit:time machine = yes will trigger Samba to advertise a Time Machine destination via Avahi, but this specific support is not built with the Samba included in Debian 10. You'll need to configure a .service definition in /etc/avahi/services/. I created time_machine_advert.service in that folder. You'll need to restart avahi to be sure it gets applied with sudo systemctl restart avahi. I have two Time Machine destinations. Multiples can be advertised within a single file by simply duplicating the txt record and incrementing dkX, i.e. dk1, dk2 etc.

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">%h</name>
 <service>
   <type>_adisk._tcp</type>
   <txt-record>sys=waMa=0,adVF=0x100</txt-record>
   <txt-record>dk0=adVN=SAMBA SHARE NAME EXACTLY,adVF=0x82</txt-record>
   <txt-record>dk1=adVN=SAMBA SHARE NAME #2 EXACTLY,adVF=0x82</txt-record>
 </service>
  <service>
    <type>_smb._tcp</type>
    <port>445</port>
  </service>
</service-group>

There are some additional useful sites for Samba configuration with regards to Time Machine here:

Samba team's official guide to Time Machine configuration, although this alone didn't get a working config for me: https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X

smb.conf reference: https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html

vfs_fruit (the Apple compatibility module for Samba) reference https://www.samba.org/samba/docs/current/man-html/vfs_fruit.8.html

Ken Murphy's smb.conf on GitHub that finally pushed me over the edge and got my setup working: https://github.com/KenMurphy/SambaConfigs/blob/master/smb.conf

A general Samba on Debian guide: https://www.antoneliasson.se/journal/time-machine-compatible-samba-on-debian-buster/

🌐
iMore
imore.com › macs
How to use Time Machine to back up your Mac to a Windows shared folder | iMore
August 28, 2020 - Are you using a networked Windows Share location as a backup? Here's how to make Time Machine work with it.