ONEDRIVE(1)

πŸ‘‘ ONEDRIVE β€” the onedrive client, bestie edition πŸ’–

okay so. this is the manual page for onedrive, a User Command, and honestly? it's a whole vibe. it's A client for the Microsoft OneDrive Cloud Service and it's about to be your new fav thing. sit down, grab a snack πŸ“, we're doing this.


✨ NAME ✨

onedrive β€” A client for the Microsoft OneDrive Cloud Service


πŸ¦‹ SYNOPSIS πŸ¦‹

like, the shapes it comes in:

onedrive [OPTION] --sync
onedrive [OPTION] --monitor
onedrive [OPTION] --display-config
onedrive [OPTION] --display-sync-status
onedrive [OPTION] -h | --help
onedrive --version

πŸ’… DESCRIPTION πŸ’…

so what IS it β€” it's a fully featured, free, and actively maintained Microsoft OneDrive client. no cap. it seamlessly supports OneDrive Personal, OneDrive for Business, Microsoft 365 (formerly Office 365), and SharePoint document libraries. like, all of them. the whole friend group 🫢

it's designed for maximum flexibility and reliability β€” this powerful and highly configurable client works across all major Linux distributions and FreeBSD. and it can also be deployed in containerised environments using Docker or Podman 🐳 (iconic). it supports both one-way and two-way synchronisation modes, and it gives you secure and efficient file syncing with Microsoft OneDrive services β€” tailored to suit both desktop and server environments. literally built different.


🌈 FEATURES 🌈

here's the full list, and yes, every single one is a slay:

  • Compatible with OneDrive Personal, OneDrive for Business, and Microsoft SharePoint Libraries
  • Provides full support for shared folders and files across both Personal and Business accounts
  • Supports single-tenant and multi-tenant Microsoft Entra ID environments
  • Supports national cloud deployments including Microsoft Cloud for US Government, Microsoft Cloud Germany, and Azure/Office 365 operated by VNET in China
  • Supports bi-directional synchronisation (default) to keep local and remote data fully aligned
  • Supports upload-only mode to upload local changes without downloading remote changes
  • Supports download-only mode to download remote changes without uploading local changes
  • Supports a dry-run mode for safely testing configuration changes without modifying data
  • Implements safe conflict handling to minimise data loss by creating local backups when this is determined to be the safest resolution strategy
  • Provides comprehensive rules-based client-side filtering with inclusions, exclusions, wildcard matching (*), and recursive globbing (**)
  • Allows selective synchronisation of specific files, directories, or patterns
  • Caches synchronisation state for efficient processing and improved performance on large or complex sync sets
  • Supports near real-time processing of cloud-side changes using native WebSocket support
  • Supports webhook-based online change notifications where WebSockets are unsuitable (manual configuration required)
  • Monitors local file system changes in real-time using inotify
  • Implements the FreeDesktop.org Trash specification, enabling recovery of files deleted locally due to remote deletions
  • Protects against accidental data loss following configuration changes
  • Supports interruption-tolerant uploads and downloads with automatic transfer resumption
  • Validates file transfers to ensure data integrity
  • Enhances synchronisation performance through multi-threaded file transfers
  • Manages network usage through configurable bandwidth rate limiting
  • Supports desktop notifications for synchronisation events, warnings, and errors using libnotify
  • Provides desktop file-manager integration by registering the OneDrive folder as a sidebar location with a distinctive icon
  • Operates fully in both graphical and headless/server environments, with a graphical environment required only for Intune SSO, desktop notifications, and sidebar integration

πŸŽ€ CONFIGURATION πŸŽ€

by default, the OneDrive Client for Linux uses a sensible set of built-in defaults to interact with the Microsoft OneDrive service. yes bestie, it just works out of the box πŸ’…

the client figures out its configuration from three layers, and they get applied in this priority order:

  1. Application default values – internal defaults compiled into the client.
  2. Configuration file values – user-defined settings loaded from a configuration file (if present).
  3. Command-line arguments – values specified at runtime override both the configuration file and application defaults.

the built-in application defaults are enough for most users and give you a reliable operational baseline. creating a configuration file or using command-line options is optional, and only required when you wish to customise runtime behaviour. lowkey the defaults ate.

NOTE: the OneDrive Client does not create a configuration file automatically. if no configuration file is found, the client runs entirely using its internally defined default values. you only need to create a configuration file if you wish to override those defaults. πŸ™ˆ

if you do want to adjust the default settings, download a copy of the default configuration template into your local configuration directory. valid configuration file locations are:

  • ~/.config/onedrive – for per-user configuration.
  • /etc/onedrive – for system-wide configuration.

Example:

to download a copy of the default configuration template, run:

mkdir -p ~/.config/onedrive
wget https://raw.githubusercontent.com/abraunegg/onedrive/v2.5.11/config -O ~/.config/onedrive/config

for a full list of configuration options and command-line switches, refer to the online documentation: https://github.com/abraunegg/onedrive/blob/master/docs/application-config-options.md


🧚 CLIENT SIDE FILTERING 🧚

okay so what even is Client Side Filtering β€” in the context of the OneDrive Client for Linux, it means user-configured rules that determine what files and directories the client should upload or download from Microsoft OneDrive. these rules are crucial for optimising synchronisation, especially when you're dealing with large numbers of files or specific file types. and the OneDrive Client for Linux offers several configuration options to make it happen:

  • --skip-dir or 'skip_dir' config file option β€” specifies directories that should not be synchronised with OneDrive. useful for omitting large or irrelevant directories from the sync process.
  • --skip-dot-files or 'skip_dotfiles' config file option β€” excludes dotfiles, usually configuration files or scripts, from the sync. ideal for users who prefer to keep these files local.
  • --skip-file or 'skip_file' config file option β€” allows specifying specific files to exclude from synchronisation. offers flexibility in selecting essential files for cloud storage.
  • --skip-symlinks or 'skip_symlinks' config file option β€” prevents symlinks, which often point to files outside the OneDrive directory or to irrelevant locations, from being included in the sync.

additionally, the OneDrive Client for Linux allows the implementation of Client Side Filtering rules through a 'sync_list' file πŸ¦‹. this file explicitly states which directories or files should be included in the synchronisation. by default, any item not listed in the 'sync_list' file is excluded. this approach offers granular control over synchronisation, ensuring that only necessary data is transferred to and from Microsoft OneDrive. so much control. so much power. πŸ‘‘

these configurable options and the 'sync_list' file give users the flexibility to tailor the synchronisation process to their specific needs β€” conserving bandwidth and storage space while ensuring that important files are always backed up and accessible.

NOTE: after changing any Client Side Filtering rule, a full re-synchronisation must be performed using --resync. no skipping this one bestie, fr fr.

🌸 FIRST RUN 🌸

once you've installed the application, you'll need to authorise it using your Microsoft OneDrive account. this can be done by simply running the application without any additional command switches. that's it. main character energy ✨

please be aware that some organisations may require administrator approval before this client can be used. if administrator consent is required, use --display-admin-consent-url to generate the appropriate Microsoft Entra ID administrator consent URL for your tenant.

when run for the first time in a supported graphical environment, the client will attempt to open the Microsoft authorisation URL in your default web browser and listen for the authorisation response on the local loopback callback address http://127.0.0.1:53100/. after you sign in and grant access, authentication should complete automatically and you may close the browser window. easy peasy πŸŽ€

if local browser authentication cannot be used, the client will fall back to the manual authentication flow. in that mode, open the displayed URL in your browser, sign in, grant access, then copy the full redirect URI from the browser address bar and paste it back into the application. yep, you're copy-pasting. you got this 🫢

this process authenticates the application with your account information, after which the client is ready to sync your data between your local system and Microsoft OneDrive.


πŸ”” GUI NOTIFICATIONS πŸ””

if the client has been compiled with support for notifications, the client will send notifications about client activity via libnotify to the GUI via DBus when the client is being run in --monitor mode. little pings, little updates, we love to see it πŸ’–


πŸ“ APPLICATION LOGGING πŸ“

when running onedrive, all actions can be logged to a separate log file. this can be enabled by using the --enable-logging flag. by default, log files will be written to /var/log/onedrive. all logfiles will be in the format of %username%.onedrive.log, where %username% represents the user who ran the client.


ok and that's part 1 bestie β€” there's more coming, don't go anywhere πŸ’…βœ¨

✨ ALL CLI OPTIONS ✨

okay bestie, this is the main event πŸ’… these flags are literally the remote control for onedrive. and listen β€” if you run the client with no options at all, and you're already authenticated, it just… leaves. exits. does nothing else. no drama, no sync, nothing. so if you want action, you gotta pick a flag. let's go πŸƒβ€β™€οΈ

  • --sync, -s β€” one-time sync with Microsoft OneDrive. that's it, that's the whole vibe ✨
  • --monitor, -m β€” watch your filesystem and sync regularly with Microsoft OneDrive. your little guardian angel 🫢
  • --display-config β€” show the config the onedrive client is currently using. vibe check on your settings πŸ’…
  • --display-sync-status β€” query the OneDrive service and report back on any pending changes. like checking your notifications πŸ‘€
  • --auth-files ARG β€” do authentication without the interactive dialogue, via files that get read/written when you use this option. you pass the two files in as ARG in the format authUrl:responseUrl. the authorisation URL gets written to the authUrl file, then onedrive waits for the responseUrl file to show up, and reads the response from there.
⚠️ always give the full path when you use this, otherwise the app defaults to the default configuration path for these files (~/.config/onedrive/)
  • --auth-response ARG β€” authenticate without the interactive dialogue by just handing over the response URL directly. no files, just vibes 🌸
  • --check-for-nomount β€” checks if .nosync exists in the syncdir root. if it's there, no sync happens. periodt βœ‹
  • --check-for-nosync β€” checks for .nosync in each directory. if found, that directory gets skipped from sync. bye felicia πŸ‘‹
  • --classify-as-big-delete ARG β€” how many children in a locally-removed path it takes to get classified as a 'big data delete'. big yikes energy πŸ’€
  • --cleanup-local-files β€” cleans up extra local files when you're using --download-only. heads up, this removes local data 😭
  • --confdir ARG β€” set the directory where the config files live. your config's home base 🏠
  • --create-directory ARG β€” make a directory on OneDrive. no synchronisation happens. just a lil create πŸ’…
  • --create-share-link ARG β€” make a shareable link for a file that already exists on OneDrive. use --with-editing-perms if you want a read-write link instead of read-only. and use --share-password <password> to protect that link with a password. secure queen πŸ”
  • --debug-https β€” debug the OneDrive HTTPS communication. for when the wires are being mysterious πŸ”
  • --destination-directory ARG β€” destination directory for renamed or moved items on OneDrive. no synchronisation happens.
  • --disable-download-validation β€” turn off download validation when downloading from OneDrive. no cap, it just skips the check.
  • --disable-notifications β€” no desktop notifications in monitor mode. silent mode activated 🀫
  • --disable-upload-validation β€” turn off upload validation when uploading to OneDrive.
  • --display-admin-consent-url β€” shows a tenant-specific Microsoft Entra ID administrator consent URL, for environments where an admin has to approve before users can authenticate and use the client. for the locked-down corporate girlies 🏒
  • --display-quota β€” show the quota status of the client. no synchronisation happens. how much room do we have left bestie πŸ“Š
  • --download-file ARG β€” download a single file from Microsoft OneDrive. give the full online path to the file. no synchronisation happens. just one file, very demure ✨
  • --display-running-config β€” show what options the client was configured to use when it started up. receipts! 🧾
  • --download-only β€” mirror the OneDrive online state locally by only downloading changes from OneDrive. local changes do not get uploaded. one-way street πŸ›£οΈ
  • --dry-run β€” do a trial sync with zero changes made. dress rehearsal 🎭
  • --enable-logging β€” let the client write its activity to a separate log file. diary time πŸ““
  • --file-fragment-size ARG β€” set the file fragment size for big file uploads (in MB).
  • --force β€” force the deletion of data when a 'big delete' is detected. yes, the dangerous one. yes, it means it. be careful πŸ’€
  • --force-http-11 β€” force HTTP 1.1 for every operation. old-school but make it fashion πŸ‘‘
  • --force-sync β€” force a sync of one specific folder, but only when you're using --sync --single-directory, and it ignores all the non-default skip_dir and skip_file rules. main character folder energy ✨
  • --get-file-link ARG β€” display the file link of a synced file. gimme the URL πŸ”—
  • --get-sharepoint-drive-id ARG β€” query and return the Microsoft 365 Drive ID for a given SharePoint document library.
  • --help, -h β€” display application help. when in doubt, ask for help, that's growth 🌱
  • --list-shared-items β€” list OneDrive Business Shared Items. see what's been shared with you πŸ‘€
  • --local-first β€” sync from the local directory source first, before downloading changes from OneDrive. local girlies rise 🫢
  • --log-dir ARG β€” directory where the logging output is saved to. has to end with a slash, don't forget it πŸ“
  • --logout β€” log out the current user. it's not you, it's the session πŸ’”
  • --mirror-local-state β€” when used with --local-first, removes remote-only files and directories from Microsoft OneDrive so the online state matches your local filesystem. full mirror behaviour πŸͺž
  • --modified-by ARG β€” display the last-modified-by details of a given path. who touched this last, spill πŸ•΅οΈ
  • --monitor-fullscan-frequency ARG β€” how many scheduled monitor-interval sync cycles happen before an online full-scan true-up. note: this does not disable the local database consistency check.
  • --monitor-interval ARG β€” number of seconds between each sync operation when idle under monitor mode. your heartbeat interval πŸ’“
  • --monitor-log-frequency ARG β€” how often logging happens in monitor mode.
  • --no-remote-delete β€” don't delete local file 'deletes' from OneDrive when you're using --upload-only. nothing leaves 🚫
  • --print-access-token β€” print the access token. useful for debugging. don't post it anywhere bestie πŸ™ˆ
  • --reauth β€” reauthenticate the client with OneDrive. fresh start, new you 🌈
  • --remove-directory ARG β€” remove a directory on OneDrive. no synchronisation happens.
  • --remove-source-files β€” remove the source file after a successful transfer to OneDrive when using --upload-only. clean up as you go ✨
  • --remove-source-folders β€” remove the local directory structure after a successful file transfer to Microsoft OneDrive when using --upload-only --remove-source-files. full tidy-up 🧹
  • --resync β€” forget the last saved state, do a whole full sync. the hard reset of your dreams πŸ”„
  • --resync-auth β€” approve the use of performing a --resync action. consent is key 🫢
  • --share-password ARG β€” require a password to access the shared link when used with --create-share-link <file>. only supported for OneDrive Business and SharePoint environments that allow password-protected sharing.
  • --single-directory ARG β€” pick a single local directory inside the OneDrive root to sync. one folder only, no distractions πŸ’…
  • --skip-dir ARG β€” skip any directories matching this pattern from syncing. not today 🚫
  • --skip-dir-strict-match β€” when matching skip_dir directories, only match explicit matches. no fuzzy business.
  • --skip-dot-files β€” skip dot files and folders from syncing. hidden files stay hidden πŸ™ˆ
  • --skip-file ARG β€” skip any files matching this pattern from syncing.
  • --skip-size ARG β€” skip new files bigger than this size (in MB). too big, too much, moving on πŸ’€
  • --skip-symlinks β€” skip syncing of symlinks.
  • --source-directory ARG β€” source directory to rename or move on OneDrive. no synchronisation happens.
  • --space-reservation ARG β€” how much disk space to reserve (in MB) so you don't hit 100% disk utilisation. future-proofing queen πŸ‘‘
  • --sync-root-files β€” sync all files in the sync_dir root when using sync_list.
  • --sync-shared-files β€” sync OneDrive Business Shared Files to the local filesystem. shared is caring 🫢
  • --syncdir ARG β€” set the local directory used for synchronisation to OneDrive.
  • --threads ARG β€” set the number of worker threads used for parallel upload and download operations. multithreaded and thriving ⚑
  • --upload-only β€” mirror the locally configured sync_dir state to OneDrive by only uploading local changes to OneDrive. changes do not get downloaded. the other one-way street πŸ›£οΈ
  • --verbose, -v+ β€” print more details, useful for debugging (repeat for extra debugging). say it with me: more v = more tea β˜•
  • --version β€” print the version and exit.
  • --with-editing-perms β€” create a read-write shareable link for a file that already exists on OneDrive when used with --create-share-link <file>. edit access, slay πŸ’…

πŸ“š DOCUMENTATION

all the docs live on GitHub, go read them bestie:

https://github.com/abraunegg/onedrive/tree/master/docs/

πŸ‘€ SEE ALSO


and that's a wrap on the onedrive(1) manual, bestie πŸŽ€ this was v2.5.11, dated June 2026 β€” so you're reading the freshest edition, no cap. go forth and sync responsibly, protect your share links, and please, please respect --force πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from