explaingit

abraunegg/onedrive

12,424DAudience · ops devopsComplexity · 3/5Setup · moderate

TLDR

A free Linux and FreeBSD command-line client for Microsoft OneDrive that syncs files two-way with filtering rules, real-time change detection, and headless server support.

Mindmap

mindmap
  root((OneDrive Linux))
    What It Does
      Sync OneDrive on Linux
      Two-way sync
      Upload or download only
    Sync Features
      File filtering rules
      Dry-run mode
      Resume transfers
      Conflict backup
    Auth
      OAuth2 browser
      Device auth flow
      Intune SSO
    Change Detection
      WebSocket remote
      inotify local
    Audience
      Linux admins
      DevOps teams
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Sync your Microsoft OneDrive files on a Linux server or desktop without a graphical Microsoft client

USE CASE 2

Run upload-only or download-only sync with filtering rules to selectively mirror specific folders

USE CASE 3

Use dry-run mode to test your sync configuration and filtering rules before any files are moved

USE CASE 4

Authenticate headlessly on a server using the device-authorization OAuth2 flow instead of a browser

Tech stack

DLinuxOAuth2WebSocketinotify

Getting it running

Difficulty · moderate Time to first run · 30min

Requires compiling the D-language client from source on most Linux distributions before first use.

In plain English

This project is a free OneDrive client that runs on Linux and FreeBSD. It lets you sync files between your local computer and your Microsoft OneDrive account, including personal accounts, OneDrive for Business, Microsoft 365, and SharePoint document libraries. It is actively maintained and has been the primary community alternative since the original OneDrive Linux client project was abandoned around 2018 and formally archived in 2024. The client supports several sync modes. By default it runs a two-way sync, keeping local and remote files in agreement. You can also set it to upload-only (so it never pulls changes down) or download-only (so it never pushes local changes up). There is also a dry-run mode that lets you test your configuration without actually moving any files, which is useful when you are setting up filtering rules and want to confirm what will and will not be synced. Filtering is one of the more detailed features. You can write rules to include or exclude specific files, folders, or patterns, so only the parts of your OneDrive you care about get synced locally. The client tracks sync state in a local cache so it can make fast decisions even when you have a large number of files. Changes on the cloud side are detected using a WebSocket connection for near real-time updates, and local changes are picked up through the Linux inotify system. For authentication, the client uses the standard OAuth2 login flow, which means you sign in through a browser and it handles the token management from there. On servers or headless machines where there is no browser available, it offers a device-authorization flow instead. Enterprise users can also configure single sign-on through Microsoft Intune if their organization requires it. The client handles interrupted transfers by resuming them automatically, validates file integrity after each transfer, and creates local backups when it detects a conflict it cannot resolve safely. Desktop notifications and file-manager sidebar integration are available for users running a graphical environment, but every core feature works fine on servers with no graphical interface at all.

Copy-paste prompts

Prompt 1
Help me install and configure the abraunegg OneDrive client on Ubuntu to sync my personal OneDrive account
Prompt 2
How do I set up filter rules in the abraunegg OneDrive client to only sync specific folders and file types?
Prompt 3
Show me how to run the Linux OneDrive client in upload-only mode so it never pulls remote changes down
Prompt 4
How do I authenticate the abraunegg OneDrive client on a headless Linux server without an available browser?
Prompt 5
How do I enable near-real-time sync using the WebSocket monitor mode in the abraunegg OneDrive client?
Open on GitHub → Explain another repo

← abraunegg on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.