Help setting up a Raspberry Pi file server

I guess this is jme related, since I am planning on using this server as a file sharing service for my development team (which consists purely of volunteers), and our current project uses JME.

Basically what I want to do is set up my brand new Raspberry Pi2 that I got today as a server that my team can upload their work to, and that I can download from. The only language I know well is Java, so I was thinking of making a java host application to run on my Pi, and then little client applications for my team. Here are the requirements for my system:

  1. The client application must be user friendly! I’m the only programmer in my team as of now, so the host app can be as technical as it wants. But the client apps have to be easy to understand and use.

  2. The server has to be secure. I don’t want a bunch of hackers messing up all of our hard work, and I don’t want to pose a risk to my newly repaired computer.

  3. Both applications have to be lightweight. I plan on keeping my Pi on 24/7 so that I don’t hold back anyone. And I have the second strongest PC in my team, so the lightweight is more for my members that don’t have $500 gaming PCs.

  4. Must run on my Pi!!! Or else what would be the point of doing this?

I have a faint idea on how to prevent unauthorized access our project database. I can make the server only connect if the client provides the correct access key, which I will provide to my team. If there is a security breach, I can just change up the codes and give my team the new access key. I know I’ll need to port forward my router, since this isn’t local. But I have some questions to clarify before attempting this.

  1. Will AT&T allow this? Because I know most ISPs don’t allow server hosting, but this is going to be a private server. Would that matter?

  2. Are there any APIs that can help?

  3. Has this been done before? I need source code to study for it to count.

I would greatly appreciate any advice on this, for if I get this server working it will help my team a lot. Thanks in advance!

Why not use existing solution, like https://syncthing.net/ or any other “personnal” cloud/file sharing application, or simply a ssh server with scp/sftp access for user.

2 Likes

Plus one to what @david_bernard_31 said. No point in re-inventing the wheel here, spend your time on your jme project instead :smiley:

There are other places as well such as copy.com, dropbox.com, Amazon S3 etc.

How about a version control, git or subversion (simpler to use and setup), it provide you out of the box functionality much better than file sharing,

for PI2 how much storage, it will provide?

Probably frowned upon… some ports may be outright blocked. When my ISP finally starting blocking SMTP was when I upgraded to a business account as it was the one port that wasn’t easy to map to something else in the ‘allowed’ range.

Save yourself a ton of trouble and just use an SVN or GIT server. (If you will have binaries, I recommend SVN but GIT is more in vogue.) If your platform can run an OS then it can run either of those.

Probably a bunch of relatively inexperienced folks have started this kind of project and switched to an existing solution halfway through.

I echo what others have said and recommend you use even an existing hosting service.

Sometimes we have to decide if we want to write games or spend 6 months developing infrastructure that already exists.

2 Likes

A good idea could be to provide all services through an encrypted vpn between team members (with the server hosted on the PI or somewhere else if the isp doesn’t allow that).

You said you wanted to setup a file sharing server. Is this intended to share your project source code or something else related to the project?

If you are familiar with git then use Github or bitbucket. Create a private repository and grant access to your team members.

If you are not familiar with Git and not interested in learning it, an alternative for you could be codeplex which provides free hosting for subversion, mercurial, and git projects.

If you’e not familiar with any of these version control systems, I highly recommend learning one. Multi-person projects without version control will lead to doom.

Well install ssh,

create a non admin user, give that user ssh access
use filezilla as a easy to understand sftp client. (via the servermanager button you can choose this)

Wow, this got much more attention than I thought.

The whole reason I wanted to start this was so I don’t have to use those services. And I know for Github I need a paid account to make a private repository, which all sources for this game will be closed until release. And I don’t think my team members would greatly appreciate using git, because even I struggled to use it. For my shader pack on Github, it took my several weeks to figure out how to upload a commit from my PC.

Right now I have 2GB left on the SD card, but I’m going to either get a bigger card or an external drive.

I am the only programmer in the team, so only I’ll handle the source code. The team will only have to submit resources they make, such as 3D models and sounds.

I’m going to be working on this in my spare time, so the actual game itself won’t be held back by this. I have all the time in the world to make this server. I just want to get it running to make things easier for my team.

Both ideas sound good. As for managing the client side in filezilla, can I configure everything in code? I want this to be as user friendly as possible.

I just did some more research, and it seems AT&T doesn’t mind. They even provide a port forwarding tool, and there are numerous tutorials on how to set to game servers with AT&T specifically. So I should be good.

I should’ve been more clear. The server I want to make is only a place where my team can submit their work directly to me. Nothing more. The client app uploads files to my Pi, and the Pi saves them. Then when check on my Pi, it will give me a message that looks something like “so and so uploaded model.blend on 1/5/16.” No version control, no mass sharing, just work submission. I think using a full blown file sharing site is overkill for this, plus most sites have limits on how much storage you can have. Something like that shouldn’t be too difficult, right?

bitbucket give you a private account, but also you could install it on your machine, git might not be the easiest option but svn is an easy one to setup and use.

so my recommendation to install subversion for none technical guys tortoise client is very easy to use

/Rant mode on
But bitbucket limits my my team size! After I finish recruiting there is going to be waayyyy more than 5 people. I’ll have voice actors, 3d modelers, video editors, 2D artists, etc etc that ALL need to use the server. And what I mean by simple to use is anything that doesn’t mention the words git or commit or subversion or anything of the sort. Just a small GUI application that lets you pick files to upload, and it uploads them. Nothing more. So unless there is an unlimited free site that I can use that does ONLY what I described, I have to make the Pi server. My team only consists of High Schoolers, myself included, and about 90% of the students at my school will cringe at something like tortoise client, and the remaining 10% are too busy to take part. Which is why I’m the only one handling the complex stuff, the rest of the team just provides me with resources to put together. If I was working with professionals, then I would choose tortoise client in a heartbeat. But sadly I can’t.
/end rant mode

Now do you guys see what I’m trying to do? I’ll just figure it out most of it myself. Will the Java Socket API be enough?

The easiest would be to have them email you their content. Gmail will even offer to upload large attachments to a private file share automatically. I think Thunderbird can do this too, I don’t remember.

Other than that, you are a little crazy to not just use a web server. Writing your own network client, etc… your priorities are not the end product but learning network sockets is my guess. Plop apache or tomcat onto your server, turn on authentication, add some off the shelf file uploader tool. Done. If you decide later that you don’t want your users sending unecrypted data then you are a registration and a config file away from HTTPS.

…and your users are 100% guaranteed to have a browser already.

If you are dead set on doing this the hardest way possible then by all means knock yourself out. You will learn a lot in the process at any rate.

If you don’t want versionning (usefull including for 3D, sound, images). Like I said setup ssh/sftp or syncthing. syncthing will allow you to share/mirror one or more directory between member of the team. it’s not an external service like dropbox, but a tool to mirror/sync directory between several host via torrent.

A “simple file upload” service is not hard to bootstrap (but hard to make it performant, firendly for daily usage). But it’s not friendly for artist to have to submit files (vs a shared directory). And tracking uptodate,… will become a shame.

1 Like

Or you could try something like this at http://www.instructables.com/id/Raspberry-Pi-Owncloud-dropbox-clone/

A simple alternative raspberry oriented is: http://cloudnimbus.org/. It is maybe too simple on functionallity but is does the sharing work quite well and with the advantage that is made for this devices (having always in mind the limited raspberry resources).

1 Like

Or just use google drive. You can share a folder, or even several. 3d guys can upload to the 3d assets folder, voice actor gets access to a folder that contains the clips for her characters, etc. Accessible from anywhere, no need to manage a server.

Btw been there done that myself,

in the end i decided to focus my energy, and just use svn for ressources, and git for code.

I’m not the kind of person to take the easy way out, but it looks like that’s what I’ll have to do at the moment. And one of the reasons I’m doing this is yes, to learn about networking, because I plan on doing this again later on, but on a larger scale.

That’s what I was going to do until the server is running.

I understand that you guys are trying to help, but I had this idea for a reason. I already know about other methods that are MUCH easier, but I want to learn how to do this, and only this. So please, only post tips related to this server, nothing else. Any mentioning of an external service or third party software will be ignored, because that’s not why I started this thread. And please don’t suggest tool kits that’ll make things easier, I want to hand code all or most of it. APIs however, are okay.

So take a look at Netty: Home it’s the lib/framework used by lot project to do network stuff in java (just the layer over nio).
I also use it for xbuf (jme server side). iirc there are a sample file server.

I just realized that Chrome notifies me of replies! That’s so cool! Anyway, back on topic.

Hmm… looks promising. It’s low resource, so my Pi shouldn’t have trouble running it. How about I start from there, and then if I run into issues that I can’t solve, I’ll ask here. That way my crazy idea isn’t in the way of more plausible ones, because looking back at it now, this server is going to be an adventure to get working. But thanks for pointing out Netty!