In this tutorial, we will demonstrate how to install myDrive on nixOS Latest using the official myDrive GitHub repository.
To proceed with the installation of myDrive, we first need to download the latest version of the code by cloning the official myDrive GitHub repository:
$ git clone https://github.com/subnub/myDrive.git
myDrive has several dependencies that we need to install before we can run it. We will use the Nix package manager to install these dependencies.
$ nix-shell ./nix/shell.nix
There are several configuration settings that need to be set up before we can run myDrive. Use the config.edn
file to set up the required configuration. You will find it in the root myDrive
directory.
{:database-url "jdbc:postgresql://localhost:5432/mydrive?user=myuser&password=mypassword"
:server {:port 8080}
:mailer {:user "myuser@gmail.com", :password "mypassword"}
:storage {:type :local, :dir "/path/to/mydrive/root-directory"}
:auth {:init {:admin-name "MyUserName", :admin-email "example@domain.com"}
:google {:oauth2 {:client-id "myclientid.apps.googleusercontent.com"
:client-secret "myclientsecret"}}}}
Replace the database-url
with your own postgresql
database details, mailer
with your email credentials, storage-dir
with your desired directory path, init
with your desired admin username and email, and google
with your oauth2 credentials.
Save and close the file after.
Now that you have configured your settings, you can run myDrive by executing:
$ lein run
Doing so should run myDrive and give you a URL that you can visit to access the application. Just enter the URL on your web browser and you are good to go.
You should now have myDrive running on nixOS. Feel free to play around with the application and tweak the settings to your liking.
That’s it! Thank you for reading this tutorial on how to install myDrive on nixOS Latest.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!