Giter Site home page Giter Site logo

rstorage-panel's Introduction

RStorage

RStorage is an encrypted cloud file storage.

To not confuse things, node, or Node means rstorage-node or RStorage Node, and nodejs means node.js.

How does RStorage work?

Panel

You have one panel, which is like the "master". This is meant to be run on your PC, but if you really really really want, it can be run on a server too, but this is not recommended.

You can have one node, but also multiple nodes (this is recommended, the file will be spread over all the connected node(s) (See PANEL_FORCE_SPREADING below)).

Node

You can have as many nodes as you want, and here are the encrypted files stored. These can be run on anything, your PC, a server, a server of your friend etc. etc.. The files are encrypted and the decryption key is only known to the panel. However, you should still secure this.

A node should have a lot of disk storage, as the encrypted files are stored here.

I'm not taking any responsibilty for lost files, hacked files or any problems with RStorage. You're the owner of your data, not me. This is just a tool to help you.

You should always keep a (encrypted) backup, and for sensitive files always use something like gpg or another encryption program.

Note: RStorage isn't done yet, and won't function properly. Every update could break your previous installation and (as of right now) it's recommended that you reinstall everything if a new update comes out, as there's no guarantee for backwards compatibility.

You can help by looking at the what has to be done section down below, or search for TODO in the code. For new suggestions please open an issue first.

Installation

Install nodejs (if not done already previously).

(For video guides, please see the guides directory).

Node

git clone https://github.com/Robin-floss/rstorage-node
cd rstorage-node
npm install

Rename .env.example to .env, and fill in the environment variables.

Run npm start to generate the SSL certificate.

Copy the certificate printed in console (you need to enter that later in the panel), then start the node:

npm start

Panel

The panel is meant to be installed on your PC. But it can be installed on a server too. But that's not recommended.

git clone https://github.com/Robin-floss/rstorage-panel
cd rstorage-panel
npm install

Rename .env.example to .env, and fill in the environment variables.

npm start

Login with email admin and password admin.

MAKE SURE TO CHANGE DEFAULT PASSWORD (and if you want, email can be changed too! BUT DON'T CHANGE THE USERNAME)!

Usage

To start the panel, or a node, use the npm start command.

Go to your panel, login, and paste the certificate (of your node's console) (and change the ip/port if you have changed that). If you want to add more nodes, repeat the same steps (installation => copying => pasting).

Play around with PANEL_MAX_SIZE in the environment variables if you're getting out of memory crashes (set it lower until you get no crashes anymore while uploading a big file).

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

What has to be done?

  • login system
    • basic login system
    • 2fa
    • user management
    • user permissions
    • email verification + password reset
  • connecting node to panel
    • generating key pair on both panel and node
    • connect using the node's public key
    • self-signed certs?
    • editing a node's details
    • deleting a node's details
    • limit by panel IP('s)
  • storing files
    • browsing files (storing unencrypted)
      • viewing files
      • uploading files
      • deleting files
      • downloading files
      • creating directories
      • download/upload progress
      • sharing files?
    • encrypting files
      • encrypting on server
      • worker threads for encrypting
      • worker threads for decrypting
      • encrypting on client
    • spread file contents randomly over all nodes
  • tests
  • electron app
  • guides on how to do things
  • ratelimits

Environment variables

  • PANEL_MAX_SIZE (Default: 8) (in megabytes)

    • This is the maximum size (in megabytes) a (decrypted) file part should be. If set to 8, that means if a file is between 8 and 16 mb, there will be 2 file parts (useful for changing if your server has a lot of memory, or if you want to spread the file more) (the lower it is, the more the file will be spread).
  • PANEL_FORCE_SPREADING (Default: true)

    • This will force the spreading of a uploaded file, no matter the size (see option above).
  • PANEL_DISABLE_REGISTER (Default: true)

    • This will disable being able to register new accounts.
    • You shouldn't give others people access to your panel, because every file uploaded (by you) is accessable (with the correct permissions (by default, new accounts get 777))! But if you REALLY REALLY REALLY want them to create a new account, it's possible with this variable.
  • PANEL_DISABLE_SERVER_ENCRYPTION (Default: false)

    • This will disable the server-side encryption.
  • PANEL_PORT (Default: 3000)

    • The port the panel is listening on.
  • NODE_COMMONNAME (Default: 127.0.0.1)

    • The IP (or hostname) the node is listening on.
    • Examples: node1.yourdomain.com, yourdomain.com, 1.1.1.1, 192.168.1.1, 127.0.0.1, localhost
  • NODE_PORT (Default: 3001)

    • The port the node is listening on.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.