Profiles Switcher › Automations › Your NAS mounts when you get home
Mount a network drive automatically when you join your Wi-Fi
Create a profile that switches on when your Mac joins your home Wi-Fi and add a Mount a network share action with the share's address, such as smb://nas.local/Media. Each time the profile switches on, the share is connected.
- When
- Home Wi-Fi
- Then
- Mount the Media shareMount the Backups share
Last updated
How to set it up
- Find the share address. In Finder choose Go > Connect to Server; the address looks like smb://nas.local/Media. Connect once by hand and let macOS save the password in your keychain.
- Create a Home profile. Add a Wi-Fi network rule with your home network. If your desk uses a cable, add an Ethernet cable connected rule as well and keep "Any is true".
- Add the share. Add a Mount a network share action and paste the address. Add one action per share.
- Test it. Eject the share, turn Wi-Fi off and on again, and watch it reappear in the Finder sidebar.
Get Profiles Switcher on the Mac App Store, for macOS 13 or later
Permission needed: Location (for the Wi-Fi rule). See permissions in the help guide.
Why not use Login Items?
The classic tip is to add the share to your Login Items. That mounts it once, when you log in, and only if you are on the right network at that moment. A laptop that moves between home, office and cafés without restarting never gets another chance, and at the café the login item just throws an error because the server cannot be found.
A profile mounts the share when you are actually on the network where it lives: every time your Mac joins the home Wi-Fi, the Home profile switches on and connects the share. Away from home nothing tries to connect, so there are no error dialogs.
One profile per place
Most people have a share at home and another at work. Give each place its own profile:
| Profile | Rule | Actions |
|---|---|---|
| Home | Wi-Fi network is “Home” | Mount smb://nas.local/Media |
| Office | Wi-Fi network is “Office-5G” | Mount smb://files.office/Team, Set default printer |
Only one profile is active at a time, and each one connects what belongs to that place. If a network name exists in both places, use an IP address / range rule to tell them apart.
Tips for NAS owners
- Use the NAS’s name (nas.local) rather than its IP address if the address can change.
- If the NAS sleeps, the first connection can take a few seconds while the disks spin up. That is normal.
- To open the share in Finder straight away, add Open a file or folder and choose a folder inside the mounted share.
Frequently asked questions
Which kinds of share are supported?
SMB (Windows and most NAS shares), AFP, NFS and WebDAV addresses.
Do I need to enter my password every time?
No. macOS asks for the user name and password the first time and remembers them.
Does it need Location permission?
Yes, because the Wi-Fi rule needs it: macOS shares the Wi-Fi network name only with apps that have Location access. An Ethernet rule on its own needs no permission.
Related automations
Set it up in a few minutes
Profiles Switcher is a menu bar app for Mac (macOS 13 or later, Apple Silicon and Intel) that switches your Mac's setup automatically. You build profiles from 19 triggers, such as the Wi-Fi network you join, a place, headphones or a display, and 18 actions, including running any of your Shortcuts. Everything runs on your Mac; it is available on the Mac App Store.
Download on the Mac App Store