Hereβs the correct syntax for each field.
πΉ 1. Name
This is just a label for Home Assistant.
It also becomes the folder name under /media or /backup.
π Example:
jserver
πΉ 2. Usage
Choose how you intend to use the share:
- Backup β will appear in
/backup - Media β will appear in
/media - Share β will appear in
/share
π For camera recordings or music/video playback, pick Media.
πΉ 3. Server
This is the hostname or IP of your NAS/Windows machine.
π Examples:
j-server
192.168.1.100
πΉ 4. Protocol
Choose how to connect:
- Samba/Windows (CIFS) β for Windows shares and most NAS devices
- NFS β for NFS exports
π In most home setups, pick Samba/Windows (CIFS).
πΉ 5. Remote Share (β οΈ the tricky one!)
This is not a Windows-style path.
You must use forward slashes (/) instead of backslashes (\).
Also, you enter the share name exactly as it is exported, not the drive letter.
π Correct format:
Sharename[/Optional/Subfolder]
Examples:
- If your NAS exports a share called
MediaMedia - If the share is called
Archiveand you want a subfolderArchive/Media
β Wrong: e\Archive\Media (Windows style, wonβt work)
β
Right: Archive/Media (Linux style)
πΉ 6. Username & Password
Enter the Samba (Windows) credentials that have access to the share.
π Example:
Username: user name you set when setting up the share
Password: password you set
β Example Configuration (your case)
If your Windows machine j-server shares out a folder as Archive, and inside that is a subfolder Media, youβd fill it like this:
- Name:
jserver - Usage:
Media - Server:
j-server
(or use192.168.1.100) - Protocol:
Samba/Windows (CIFS) - Remote Share:
Archive/Media
πΉ Where it Appears in Home Assistant
After saving, HA will mount it automatically.
- If you picked Media, the files appear in:
/media/jserver - You can browse them in the Media Browser UI.
- The
camera.recordaction can save a clip directly to a network share configured with the Media usage.
Here is a complete Home Assistant automation action. Replace camera.front_door with your camera entity ID. The share must be added under Settings β System β Storage with Usage: Media; the /media/jserver path uses the network-storage name from the example above.
action: camera.record
target:
entity_id: camera.front_door
data:
filename: "/media/jserver/front_door.mp4"
duration: 30
For connection checks before mounting, first confirm that the server name or IP resolves and that the SMB/NFS service is reachable from your network.
2 responses to “π How to Mount a Network Share (SMB/NFS) in Home Assistant OS”
It look exactly what I want to do inside of Home Assistant but you never show (or my browser doesnt) the complete command. The again I may have missed iit
Hi Jason, thanks for flagging that. The camera.record example was not shown as a complete YAML action. I have updated the article with the full block, including the target, filename, and duration. Set the network share Usage to Media so Home Assistant can write to the /media path, and replace camera.front_door with your camera entity ID. Hope that helps!