How to automatically reconnect network shares on a Mac
macOS mounts an SMB or NFS share once and doesn’t try again when the connection drops. Here are the ways to make shares come back on their own, and what each one misses.
Why shares don’t come back
When you connect to a server in Finder (Go › Connect to Server) or double-click a share, macOS mounts it and keeps it until the connection breaks. That happens when Wi‑Fi drops, when the Mac sleeps long enough for the server to close the session, when you move between networks, or when a VPN comes up or goes down. Once a share is gone, nothing in macOS mounts it again. You reconnect by hand.
Option 1: Open at Login
Mount the share, then add it to System Settings › General › Login Items › Open at Login (you can drag the mounted volume into the list). macOS mounts it every time you log in.
That’s all it does. After sleep, a Wi‑Fi change, or a VPN switch, the share stays gone until you log out and in again.
Option 2: A script with mount volume
AppleScript can mount a share, and you can run it at login or on a schedule with launchd:
osascript -e 'mount volume "smb://me@nas.local/home"'
This works, but you own the edge cases. Run it while the server is away and macOS shows an error dialog. Run it every minute and login prompts can stack up. A script that checks a share by listing it can hang for a long time when the server has just disappeared.
Option 3: autofs
macOS includes autofs, which mounts a share the first time something opens its path. You set it up by editing /etc/auto_master and a map file with admin rights. It’s powerful, but major macOS updates may replace those files, shares mount outside /Volumes, and anything that touches the path while the server is unreachable can hang.
Option 4: velcro
velcro is a free, open-source menu bar app and command that reconnects your shares for you:
- Right after the network changes or the Mac wakes, and on a timer (every minute by default).
- It reads the mount table instead of touching a share, so a dead server can’t freeze Finder or a terminal.
- No error dialogs: problems go to a log. It uses the password already in your keychain.
- Fallback hosts: try the LAN address first, then a Tailscale name (see home and away).
- Pause it when you want an ejected share to stay ejected.
curl -fsSL https://velcro.dgit.co/install | sh velcro add smb://me@nas.local/home velcro status
Side by side
| After login | After sleep or a network change | Safe when the server is away | Setup | |
|---|---|---|---|---|
| Open at Login | Yes | No | Yes | System Settings |
mount volume script | Yes | If you schedule it | Depends on the script | Write and maintain it |
| autofs | On first access | On first access | Can hang | Edit system files as admin |
| velcro | Yes | Yes | Yes | One command or the menu |
Questions
Does velcro work with Synology, QNAP, TrueNAS, Unraid, or Windows shares?
Yes. velcro works with any server your Mac can mount with smb:// or nfs:// in Finder. It uses the same macOS mount as Finder does.
Does velcro store my NAS password?
No. The password stays in the macOS keychain, where Finder saved it. If there is no saved password, macOS shows its own login window once.
Is velcro free?
Yes. velcro is free and open source under the MIT license.
velcro is a free, open-source menu bar app and command for macOS 13 or later. It keeps SMB and NFS shares mounted, imports USB voice recorders to a NAS, and sends files to a NAS inbox.
Install velcro