Introduction
OneDrive Client for Linux is amazing but it’s for OneDrive. I started looking for an alternative and I found Nextcloud.
Comparison
- OneDrive’s first 5GB is free while Nextcloud is 3GB (for my cloud provider). 3GB is enough for me.
nextcloudcmd
can also perform two-way sync
Getting Started
If you’re on Arch:
pacman -Syu nextcloud
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.
- 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.
Create a temporary file in
~/Nextcloud/
To perform a two-way sync with
nextcloudcmd
:
nextcloudcmd --user 'login-email@mail.com' --password 'app-token-password' ~/Nextcloud/ https://efss.qloud.my/
- To copy all files from OneDrive to Nextcloud:
cp -r ~/OneDrive/ ~/Nextcloud/
After making sure all files are transferred to Nextcloud, delete your content and account from OneDrive
Optional: install Nextcloud on your Android phone to sync between devices.
Conclusion
Begone, M$.