Can I remotely access the files on the attached hard drive in Libreelec?

  • Hello everyone. I have a Raspberry Pi 4B with Libreelec. I want to have access to the file system on the hard drive that I mounted on it. I want this access to be possible when I'm out of my home basically. I have a real static IP address of the router and I know how to forward the ports. I installed Proftpd, but I only have access to my files locally. Does anyone know what else to do? I'm not good at writing command lines, but if there are exact instructions for copying / pasting, I think I can handle it.

  • The easiest way to access a device from outside the home is by installing a VPN server service, LibreELEC natively supports two of them: OpenVPN and WireGuard. Neither of them are easy to implement. Another way to do this that for me is the easiest is through a ZeroTier network. It is about creating a private and secure network on the internet (zerotier.com), for example, creating the domain 10.10.10.0/24 and connecting to this domain the devices that we want, for example, our RPi LibreELEC device with address 10.10.10.1 and our mobile device with address 10.10.10.2. To use any service (FTP, SAMBA, SSH/SFTP, ...) of RPi on our mobile device we only have to point to the IP address 10.10.10.1 from anywhere in the world, and it works with almost any type of internet subscription without the need to make adjustments to any router.

    How ZeroTier is installed: In Android it is very easy, you just have to search for the application in the Play Store but in LibreELEC it is somewhat more complicated, a possible method could be the following:

    1.- Install the 'docker' addon

    2.- Access through SSH to your RPi device and execute the command:

    docker run -d \

    --name 9993-zerotier-one \

    --device=/dev/net/tun\

    --net=host \

    --cap-add=NET_ADMIN \

    --cap-add=SYS_ADMIN \

    --cap-add=SYS_RAWIO \

    -v /storage/.config/dockers/zerotier-one:/var/lib/zerotier-one \

    --restart unless-stopped \

    --privileged\

    zyclonite/zerotier

    3.- Run the command docker exec 9993-zerotier-one zerotier-cli status to check the operation of the ZeroTier service

    4.- Go to the ZeroTier website, create your private network and take note of the ID identifier, create your private domain 10.10.10.0/24 within this network.

    5.- On RPi run the SSH command docker exec 9993-zerotier-one zerotier-cli join <your-id-identifier-zerotier-network>

    6.- On the ZeroTier website, validate and authorize your RPi device and assign the IP address 10.10.10.1. From now on, your RPi device is connected to your VPN virtual private network.

    7.- Do the same with the remote device and assign the IP address 10.10.10.2.

    Sorry, if this seems difficult to you, I don't know of an easier method.

  • I wish I could make a simple ftp connection, but I will try your method. I will write later what happened. Thank you.

    Security recommendation: Do not open any ports on your router and, if you have to do this, use only VPN ports (encryption and validation with certificates).

    Also, opening an FTP port to internet is always a very bad idea.

    Edited once, last by elonesna (May 28, 2022 at 4:15 PM).

  • I can't connect Libreelec to Terminal. The command I use is : ssh xxx.xxx.xx.x(my ip). A password is required and I enter a libreellec, but it doesn't work. Where am I wrong. I apologize for my elementary questions.

  • The command I use is : ssh xxx.xxx.xx.x(my ip). A password is required and I enter a libreelec, but it doesn't work.

    You first need to have enabled SSH access, which is an option during initial setup.
    You can also do it via Settings -> LibreELEC -> Services.

    If you've done that, then you likely need to specify that you want to connect to your LibreELEC device as 'root' user by doing "ssh [email protected]" (=your IP address) and then give the password you set up in 'Services'.

  • I was able to access Libreelec through SSH. I created an account in Zerotier and installed it as an add-on to my Libreelec Raspberry. I have installed Zerotier One app on iPhone and file browser app. Now I'm trying to figure out how to share the files from the hard drive that is connected to Raspberry to my iPhone. Any advice will help me.

  • First of all prepare an access to your shared files within the home network. I'm going to assume an IP address of 192.168.1.136 for the RPi server (change this to the actual IP address). This should work fine with client and server devices connected to your home network but will not work away from home.

    After running ZeroTier on the client and server devices, the shared files are accessible from anywhere in the world at the server IP address 10.10.10.1 (change this to the IP address assigned to RPi in the ZeroTier VPN network) and also from within the home connected to the home network.