Instead of using the internal storage or an external usb key or a hard drive to store your data (games, saves, configuration, …) you can use a nas (network area storage) which can be a dedicated nas, a computer or an internet box if is supports it.

Configurable items

The file to configure is present on the boot partition of the Batocera system. You can edit it from any computer as it is hosted on a FAT32 file system; it is located in /boot once the Batocera system is booted and is called batocera-boot.conf.

There are 4 things that you can map to your nas :

  • the whole user data directory called SHARE
  • only the roms directory called ROMS
  • only the bios directory called BIOS
  • only the saves directory called SAVES
  • or a combination of the 3 last one

Samba/Windows shares

Windows shares can use identification or a guest account to connect.

Examples of content of the file batocera-boot.conf :

In these examples, the Windows CIFS share is called Documents and batocera is a directory inside this share. The IP address of the Windows shared server is 192.168.0.1 in this example.

the whole user data directory on the nas
  sharedevice=NETWORK
  sharenetwork_smb1=SHARE@192.168.0.1:Documents/batocera:guest
only the roms on the nas
  sharedevice=NETWORK
  sharenetwork_smb1=ROMS@192.168.0.1:Documents/batocera/roms:guest
only the roms on the nas with CIFS authentication
  sharedevice=NETWORK
  sharenetwork_smb1=ROMS@192.168.0.1:Documents/batocera/roms:username=john,password=wayne
roms, saves and bios on the nas
  sharedevice=NETWORK
  sharenetwork_smb1=ROMS@192.168.0.1:Documents/batocera/roms:guest
  sharenetwork_smb2=SAVES@192.168.0.1:Documents/batocera/saves:guest
  sharenetwork_smb3=BIOS@192.168.0.1:Documents/batocera/bios:guest
SMB versions

In several cases, you need to add SMB options, for instance if you NAS requires a specific SMB version:

sharenetwork_smb1=ROMS@192.168.0.1:Documents/Batocera/roms:guest,vers=1.0

CIFS version is needed for several NAS vendors:

  • when using and Orange Livebox as a NAS, or on Synology (tested on a DS418play), you need vers=1.0
  • if you use OpenMediaVault 5, you need vers=3.0

In this kind of setup, make sure that:

  • you provide the exact name your SMB share on the NAS (Documents/Batocera/roms in the example above is the path from your NAS export)
  • you have the right user authentication (username=john,password=wayne in the example above) and, if you use anonymous guest access, that you have write access enabled, so that Batocera can write the updated in the gamelist.xml files, and download scraped metadata like thumbnails or video snapshots

NFS shares

Examples of content of the file batocera-boot.conf :

the whole user data directory on the nas
  sharedevice=NETWORK
  sharenetwork_nfs1=ROMS@192.168.0.1:/mnt/Documents/batocera
only the roms on the nas
  sharedevice=NETWORK
  sharenetwork_nfs1=ROMS@192.168.0.1:/mnt/Documents/batocera/roms
roms, saves and bios on the nas
  sharedevice=NETWORK
  sharenetwork_nfs1=ROMS@192.168.0.1:/mnt/Documents/batocera/roms
  sharenetwork_nfs2=SAVES@192.168.0.1:/mnt/Documents/batocera/saves
  sharenetwork_nfs3=BIOS@192.168.0.1:/mnt/Documents/batocera/bios

Advanced

Troubleshooting

Make sure you escape special characters in your CIFS passwords if you have some.

For troubleshooting purposes, you have /tmp/mountNetwork.log and /tmp/mountNetwork.err that will give you some insights on the mount failures if needed.

Samba/Windows shares

Examples of mapping other directories via sharenetwork_cmd.

sharenetwork_cmd1=mount.cifs -o guest //192.168.0.1/Documents/batocera/music /userdata/music
sharenetwork_cmd2=mount.cifs -o guest //192.168.0.1/Documents/batocera/cheats /userdata/cheats
sharenetwork_cmd3=mount.cifs -o guest //192.168.0.1/Documents/batocera/screenshots /userdata/screenshots
sharenetwork_cmd4=mount.cifs -o guest //192.168.0.1/Documents/batocera/themes /userdata/themes
  • store_games_on_a_nas.txt
  • Last modified: 3 months ago
  • by lbrpdx