-
-
Notifications
You must be signed in to change notification settings - Fork 408
Guided Installation Setup
This page will help beginners to install and run myDrive, in this guide we will run myDrive on a local machine, view the other guides to get myDrive running on Docker, or on a Droplet.
MongoDB Installation/Setup Guide
git clone https://github.com/subnub/myDrive.git
Next unzip the file, you should now have the following files, after this open up a terminal in the myDrive directory.
Now run the following command in order to install all the myDrive dependencies.
npm install
If everything is installed correctly, you should get an output similar to this screenshot.
Before running myDrive users must create the environment variables file, myDrive comes with a built-in tool to make this much easier, run the following command to start creating the environment variables.
npm run setup
The first prompt will ask if you would like to use Docker or not, since this is the guide to run myDrive on a local machine you should select 'no' for this prompt.
Next myDrive will ask you for the mongoDB url, if you are running mongoDB on the same local machine use the following url.
mongodb://127.0.0.1:27017/personal-drive
Otherwise enter the MongoDB/Atlas URL.
Next myDrive will ask if you'd like to use the WebUI to enter the encryption key, the encryption key is used to encrypt all the myDrive data, using the WebUI is recommended since its the most secure, but you can also select no and enter the encryption key now if you'd like.
Next myDrive will ask for the clients URL/IP address, this is the IP address of the local machine and the port number, or just the URL if you purchased a domain name. This MUST be a valid URL even if it's just an IP address, and if you're using an IP address you must specify the port number which is 3000 by default, for example if the IP address is '192.168.0.63', you'd use the following format.
http://192.168.0.63:3000
Next myDrive will ask what backend you would like to use to store the file chunks, there are 3 options to choose from, Amazon's S3, the Filesystem, and then just MongoDB. We will use the Filesystem in this example, but if you'd like to use Amazon S3 or just MongoDB myDrive will guide you through each step.
Now enter a file path to store the myDrive chunk data in.
Next enter a JWT secret, this is a password used to sign the JWT tokens when logging into accounts, this is different from the encryption token, and this JWT secret can be changed at any time (it was just cause all users to be signed out).
Next myDrive will ask if you have the SSL certificate, this allows data to be encrypted when it's sent over the internet, this is highly recommended if you plan to store sensitive data inside of myDrive, but in this guide we will select 'no' to make things simple. But if you do have the SSL certificate, use the following naming format on the root or the project.
certificate.crt, certificate.ca-bundle, And certificate.key
You should get the following message if all the environment variables were created successfully.