cover

TL;DR
Use Nextcloud instead of M$’s OneDrive. Purge OneDrive in 10 min. Introduction video by The Linux Experiment.

Introduction

OneDrive Client for Linux is amazing but it’s for OneDrive. I started looking for an alternative and I found Nextcloud.

Comparison

  1. OneDrive’s first 5GB is free while Nextcloud is 3GB (for my cloud provider). 3GB is enough for me.
  2. nextcloudcmd can also perform two-way sync

Getting Started

  1. Sign up
Note
When you sign up, there is a default cloud provider. In my case it’s Qloud.

providers

  1. If you’re on Arch: pacman -Syu nextcloud

  2. You can’t use your login name and password for the following fields in nextcloudcmd:

➜ nextcloudcmd --user 'mymail@mail.com' --password 'mypassword' ~/Nextcloud/ https://efss.qloud.my/

02-06 20:56:50:325 [ info nextcloud.sync.accessmanager ]:       2 "" "https://efss.qloud.my/ocs/v1.php/cloud/capabilities?format=json" has X-Request-ID "string-here"
02-06 20:56:50:325 [ info nextcloud.sync.networkjob ]:  OCC::JsonApiJob created for "https://efss.qloud.my" + "ocs/v1.php/cloud/capabilities" ""
02-06 20:57:12:232 [ warning nextcloud.sync.credentials.http ]: Stop request: Authentication failed for  "https://efss.qloud.my/ocs/v1.php/cloud/capabilities?format=json"
02-06 20:57:12:232 [ warning nextcloud.sync.networkjob ]:       QNetworkReply::AuthenticationRequiredError "Host requires authentication" QVariant(int, 401)
02-06 20:57:12:233 [ info nextcloud.sync.networkjob.jsonapi ]:  JsonApiJob of QUrl("https://efss.qloud.my/ocs/v1.php/cloud/capabilities?format=json") FINISHED WITH STATUS "AuthenticationRequiredError Host requires authentication"
02-06 20:57:12:233 [ warning nextcloud.sync.networkjob.jsonapi ]:       Network error:  "ocs/v1.php/cloud/capabilities" "Host requires authentication" QVariant(int, 401)
02-06 20:57:12:233 [ debug default ]    [ main(int, char**)::<lambda ]: Server capabilities QJsonObject()
Error connecting to server

It took me some time to figure out this authentication issue. The solution is creating an app token.

  1. In your cloud provider, create an app token. In my case:

I. Go to Security

II. Under Devices & sessions, you should see an input field App name. Type your app name (I just typed Linux) to generate a password. Save it for the password field below.

  1. Create a temporary file in ~/Nextcloud/

  2. To perform a two-way sync with nextcloudcmd:

nextcloudcmd --user 'login-email@mail.com' --password 'app-token-password' ~/Nextcloud/ https://efss.qloud.my/
  1. To copy all files from OneDrive to Nextcloud:
cp -r ~/OneDrive/ ~/Nextcloud/
  1. After making sure all files are transferred to Nextcloud, delete your content and account from OneDrive

  2. Optional: install Nextcloud on your Android phone to sync between devices.

Conclusion

Begone, M$.