You can easily connect your Batocera to a VPN, as we ship OpenVPN with the distribution. However, it requires some manual configuration, and the steps involved will most probably be depending on your VPN provider.

In this example here, I will be connecting a Batocera 5.27 client to a NordVPN server. The method here can be adapted to other VPN providers quite easily, please feel free to share your experience on the forum of Discord channel.

  • Create a new folder for your OpenVPN configuration with mkdir /userdata/system/openvpn
  • If your VPN provider offers you pre-configured openVPN configuration files download them in that directory. With NordVPN, I can get access to those files with:
cd /userdata/system/openvpn
  • Then, you need to create a new authentication file /userdata/system/openvpn/auth.txt that contains only two lines: first line is your login, second line is your password. No space, no tab, no empty line, just those two lines with login and password provided by your VPN server vendor. In the case of NordVPN, you can get them from the dashboard.

  • Select the VPN server you want to connect to, and find the associated openVPN configuration file. For example here, I want to connect to a VPN hosted in France, and will select the configuration file /userdata/openvpn/ovpn_udp/ Edit this file, find the line that states auth-user-pass and append your authentication credentials file path to it:
auth-user-pass /userdata/system/openvpn/auth.txt
  • Save the file… and now your VPN configuration is done! To connect to the VPN, just launch the command line:
openvpn /userdata/system/openvpn/ovpn_udp/
  • You can verify that you are correctly connected to the VPN by checking your public IP address before and after openvpn is started by using the command curl or curl
  • If you want to start up your VPN connection every time Batocera boots, you can add the command openvpn /userdata/system/openvpn/ovpn_udp/ & to the local custom startup script /userdata/system/ – this will be the very last process fired up in the boot sequence
  • vpn_client.txt
  • Last modified: 3 months ago
  • by atari