1

I am hoping to find out how to share files between two Raspberry Pi's.

I've used samba before on each individual Raspberry Pi with my Windows computer but this doesn't allow me to share files on my first Raspberry Pi with my second Pi.

I need my server Raspberry Pi to access temperature data files created by my second Raspberry Pi so that the files are accessible on a web server hosted by my server Raspberry Pi.

Both are on the same network currently, in future however the temperature gathering Pi will be outside of the network and will need to connect with 3G.

5
  • Are they on the same network?
    – joan
    Oct 11, 2016 at 14:38
  • WRT your question about NFS over the internet, it is possible but it may not be a good idea: serverfault.com/questions/419920/…
    – goldilocks
    Oct 11, 2016 at 15:11
  • WRT being unable to use the "guest" account you created, I dunno why S.E. allows people to hang themselves that way. In any case if you have any further follow up questions I recommend you use the account you can log into and ask them separately, referencing this one with a link if need be. As it stands, I think this one is reasonably complete esp. since it has already received an answer (we frown on substantially altering the context ex post facto for hopefully obvious reasons).
    – goldilocks
    Oct 11, 2016 at 15:11
  • May I ask where those "temperature files" are in? OWFS?
    – Janka
    Oct 11, 2016 at 18:29
  • Another option may be to use MQTT to transfer the temperature data. Especially once you're on 3G - it uses minimal bandwidth and is made for potentially unreliable connections. Mosquitto is available for Raspbian and it's relatively easy to get a simple Python script to publish/subscribe to data. Just a thought...
    – thephez
    Oct 12, 2016 at 20:59

1 Answer 1

2

If you just want to read the files, you can install nginx on your Pi and share the directory that has the files you want everybody else to read. This is read only, is pretty simple and very light weight.

You then get your files by using anything really.


Another way is to create NFS shares, these should work well between Pi's if you are on the same network.


You can SFTP into the Pi's - Because SSH on the Pi by default has SFTP enabled.

If you are on a public network, SFTP would be good option as its encrypted but you should create new users with keys rather than passwords.

1
  • 2
    sshfs is probably preferable performance wise to sftp (it's also more flexible since it is an actual mounted share). Enabling sftp (as you point out, the default) allows for sshfs as well. Multiple machines can mount the same portions of a filesystem independently at the same time.
    – goldilocks
    Oct 11, 2016 at 14:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.