Skip to content

Guided Installation Setup (Docker)

subnub edited this page Jun 12, 2020 · 12 revisions

Guided Installation

This page will help beginners to install and run myDrive, this guide will run myDrive using Docker, view the other guides to get myDrive running on a local machine or a Droplet.

  1. Installing Docker
  2. [Downloading myDrive]
  3. [Setup myDrive]

1. Installing Docker

Users will first need to install the run Docker.

Docker Download

2. Downloading myDrive

Next, Download myDrive from the main Github page, the easiest way to do this is to select 'Download Zip' from the 'Clone and Download' section. But you can also clone myDrive with the following command.

git clone https://github.com/subnub/myDrive.git

3. Setup myDrive

Next unzip the file, you should now have the following files, after this open up a terminal in the myDrive directory.

4. Environment Variables

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 Docker you should select 'yes'.

Next myDrive will ask if you'd like to include mongoDB with the myDrive image, if you're using a service such as Atlas select 'no', otherwise select 'yes, in this guide we will be selecting 'yes'.

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.

Clone this wiki locally