2 Raspberry intranet

Dear,
I have 2 RPi in the same home network, currently I can access on my pc from this link (\\staticIP\media\) to all my file of the first RPi.

Now I would see all my file of the first RPi to in my second RPi.

These two raspberry have the same version of OSMC.

Thanks a lot.

If you want to just copy your setup from the old Pi to the new one you can just copy the userdata folder and that would give you two independent setups.

If you wanted to share a library so you have a shared watched status and only have to update the library on one of the machines then you would have to setup a MySQL server (probably on the PC). Information for that can be found in the Kodi wiki.

That indicate you have installed Samba Server on the first Pi (you can confirm via MyOSMC - App-Store. If that is the case check this how to use the other Pi as a Client. For shared library check what @darwindesign wrote.

Samba is installed on my first RPi (with static ip), on Windows 10 I have a share unity (//staticIPraspberry/media/).

So, I have installed OSMC in the second RPi and I have not configured it.

I tried to add source (in the second RPi) //staticIPraspberry/media/ but it not foud the link source.

Why? Thanks.

So is your goal to just have two independant clients? You could just clone the SD card from the original install.

If you want help with this you need to tell us exactly what your end goal is and also provide a log from the first RPi so we can see how you have your system currently configured.

If I clone rpi1 in rpi2, I set a static ip on rpi2, but I have in my rpi1 a HDD usb (files). So, could I access to my files of rpi1 through rpi2?

Thanks

If you clone the SD card you will have to turn only the second one on first and change its ip address before plugging back in the first. You can share files from the first RPi to a second but why would you do that instead of having that drive plugged into your PC and shared from there as well?

If you want help setting up a share from the first RPi to the second you need to provide a full log from the first RPi so we can see what you have setup. You should have been able to just browse for the share between the two RPi’s but the “//staticIPraspberry/media/” is not a correct path as it would be something like “smb://192.168.x.x/name_of_share/”.

1 Like

Goood!!!
I have used this path: “smb://user:pass@192.168.x.x/media/”

I have not cloned RPi. I have installed OSMC on new rpi2. From store I have installed Samba.
Currently I have not set a static ip on rpi2.

You do not need a static ip on the second RPi if your not sharing anything from it. Changing the ip was just because you can’t have two machines with the same ip and cloning it will also clone the static ip you set on the first (assuming you did this on the RPi and not your router). The clone is just an easy way to copy over the library, settings, artwork cache, etc. from the one you already had working.

1 Like

Dear, this soluction is good for intranet “smb://user:pass@192.168.x.x/media/”.
If I use my second RPi in external network and I set this “smb://user:pass@linkDDNS:port/media/” it’s not working. Please, could you help me?

Use openvpn (server on one Pi and Client on the other) if you want to connect via the internet.

Ok thanks. I use File Manager+ on Android smartphone and I can access to my file with ddns on my RPi but is SFTP.

If I use sftp://user:pass@linkDDNS:port/media/ on my second raspberry not working.

A probabily soluction:
smb://user:pass@linkDDNS:ExternalPORTsamba/media/

Internal port: 445

I have opened a port on my router to my RPi, internal 445 and external for ex. 50110

This is not a solution but a bad security configuration these protocols are not secure and should not be directly connected to the internet!

3 Likes

Ok thanks. Is it the best soluction use sftp?
Internal port 22 external for example 10500

SFTP (on a high port) would surely be more secure than SMB, while even for SFTP you should harden your setup.
If this is a permanent setup I still would suggest to use opevpn

2 Likes