39 KiB
Installing or Upgrading the OneDrive Client for Linux
Table of Contents
Overview
This document explains how to install or upgrade the OneDrive Client for Linux.
The preferred installation method is to use pre-built distribution packages wherever they are available and current. On some distributions, particularly Debian, Ubuntu, Linux Mint, and Raspberry Pi OS, the versions provided in the default distribution repositories are outdated and unsupported. These must not be used.
If your distribution provides a current maintained package, you should install the client from your package manager. If your distribution does not provide a supported package, or you need to build the client for a custom or minimal environment, building from source is supported and documented below.
Before continuing, identify your Linux distribution and follow the installation path appropriate to your system.
Recommended Installation Method (Using Pre-Built Packages)
Important Notice for all Debian | Ubuntu | Linux Mint | Pop!_OS | Raspbian | Zorin Users
Important
Do NOT install the OneDrive client from your distribution’s default repositories. These packaged versions are outdated, unsupported, and contain known defects.
Instead, install the fully supported and actively maintained version from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide
Which Installation Method Should I Use?
| Distribution & Version | Distribution Package Name & Link | Distribution Package Version | Correct Installation Method |
|---|---|---|---|
| Alpine Linux | onedrive | Alpine Stable may ship older versions. If your version is outdated, you need to build from source | |
| Arch Linux Manjaro Linux |
onedrive-abraunegg | Install via: pamac build onedrive-abraunegg from the Arch Linux User Repository (AUR)Note: You must first install 'base-devel' as this is a pre-requisite for using the AUR Note: If asked regarding a provider for 'd-runtime' and 'd-compiler', select 'liblphobos' and 'ldc' Note: System must have at least 1GB of memory & 1GB swap space AUR package onedrive-abraunegg follows the release versionsAUR package onedrive-abraunegg-git follows the 'master' branch |
|
| CentOS Stream 8 | onedrive | Note: You must install and enable the EPEL Repository first. Install via: sudo dnf install onedrive |
|
| CentOS Stream 9 | onedrive | Note: You must install and enable the EPEL Repository first. Install via: sudo dnf install onedrive |
|
| CentOS Stream 10 | onedrive | Note: You must install and enable the EPEL Repository first. Install via: sudo dnf install onedrive |
|
| Debian 11 | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| Debian 12 | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| Debian 13 | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| Debian Sid | onedrive | Install via: sudo apt install --no-install-recommends --no-install-suggests onedrive |
|
| Fedora | onedrive | Install via: sudo dnf install onedrive |
|
| FreeBSD | onedrive | Install via: pkg install onedrive |
|
| Gentoo | onedrive | Install via: sudo emerge net-misc/onedrive |
|
| Homebrew | onedrive-cli | Install via: brew install onedrive-cli |
|
| Linux Mint 21.x | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| Linux Mint 22.x | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| Linux Mint Debian Edition 6 | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| Linux Mint Debian Edition 7 | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| NixOS | onedrive | Install via: nix-env -iA nixpkgs.onedrive or services.onedrive.enable = true in configuration.nix |
|
| MX Linux 25 | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| openSUSE Tumbleweed | onedrive | Install via: sudo zypper install onedrive |
|
| openSUSE Build Service | onedrive | No API available for version information | |
| Raspbian | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| RedHat Enterprise Linux 8 | onedrive | Note: You must install and enable the EPEL Repository first. Install via: sudo dnf install onedrive |
|
| RedHat Enterprise Linux 9 | onedrive | Note: You must install and enable the EPEL Repository first. Install via: sudo dnf install onedrive |
|
| RedHat Enterprise Linux 10 | onedrive | Note: You must install and enable the EPEL Repository first. Install via: sudo dnf install onedrive |
|
| Slackware | onedrive | Install via SlackBuilds: https://slackbuilds.org/result/?search=onedrive | |
| Solus | onedrive | Install via: sudo eopkg install onedrive |
|
| Ubuntu 22.04 LTS | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| Ubuntu 24.04 LTS | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide | |
| Ubuntu 26.04 LTS | onedrive | Install from the openSUSE Build Service (OBS) repository by following the Ubuntu / Debian Package Installation Guide |
Important
Distribution versions that are considered End-of-Life (EOL) are no longer supported or tested with current client releases.
Important
Distribution package maintainers are volunteers who generously contribute their time to make software available for your system. New releases of the client may take some time to appear in your distribution’s repositories.
If you believe a new release is significantly delayed, please contact your distribution’s package maintainer directly to request an update.
Do not open a bug report or discussion about this here, as we have no control over the packaging process for your distribution.
When Should You Build From Source?
You should only build from source in the following circumstances:
- You are packaging for a custom or minimal distribution.
- Your distribution does not have a package for your to install. Refer to repology as a source of all 'onedrive' client versions available across tracked distributions.
- You require code newer than the latest release or are building a Pull Request to validate a bugfix.
Outside of these 3 reasons, you should not be building the client yourself. You should endeavour where possible to use a pre-built package.
Important
If your distribution does not currently offer a packaged version of the client, you should request that your distribution maintainers package and support it as part of their official repositories.
Building from Source
If you need to build the client from source, follow this high-level process:
- Ensure your system meets the minimum build requirements.
- Install the necessary build dependencies and a supported D compiler.
- Clone the repository, configure the build options, compile, and install the client.
Minimum Build Requirements
- For successful compilation of this application, it's crucial that the build environment is equipped with a minimum of 1GB of memory and an additional 1GB of swap space.
- Install the required distribution package dependencies covering the required development tools and development libraries for curl, sqlite and dbus where required.
- Install a supported D compiler. For supported Linux distributions, the preferred compiler is the distribution-provided LDC – the LLVM-based D Compiler package.
Important
To compile this application successfully, the minimum compiler versions accepted by the build system are: DMD 2.091.1, LDC 1.20.1, and GDC 15.
You only need one D compiler installed. Where your distribution provides a suitable LDC package, use that package rather than manually installing a separate compiler toolchain. This keeps the compiler and runtime libraries under the distribution package manager and avoids compiler activation/deactivation steps.
Alternative D Compilers
DMD remains supported when a suitable distribution-provided LDC package is not available or when DMD is specifically required for development or testing.
GDC version 15 or later is also supported and may be used on platforms where it is the suitable packaged compiler. Common package names are listed on the GDC website.
Install Build Dependencies (By Distribution)
Arch Linux | Manjaro Linux
sudo pacman -S git make pkg-config curl sqlite dbus ldc
For GUI notifications the following is also necessary:
sudo pacman -S libnotify
CentOS 6.x | RHEL 6.x
CentOS 6.x and RHEL 6.x reached End of Life status on November 30th 2020 and is no longer supported or tested against.
CentOS 7.x | RHEL 7.x
CentOS 7.x and RHEL 7.x reached End of Life status on June 30th 2024 and is no longer supported or tested against.
CentOS Stream 8
CentOS Stream 8 reached End of Life on May 31st 2024 and is no longer supported or tested against.
CentOS Stream 9 | CentOS Stream 10
LDC is provided through EPEL. Enable EPEL for the applicable CentOS Stream release before installing the build dependencies.
sudo dnf groupinstall 'Development Tools'
sudo dnf install epel-release
sudo dnf install libcurl-devel sqlite-devel dbus-devel ldc
For GUI notifications the following is also necessary:
sudo dnf install libnotify-devel
Debian 9
Debian 9 reached the end of its five-year LTS window on July 18th 2020 and is no longer supported or tested against.
Debian 10
Debian 10 reached the end of its five-year LTS window on September 10th 2022 and is no longer supported or tested against.
Debian 11 | Debian 12 | Debian 13 | Linux Mint Debian Edition 6 | Linux Mint Debian Edition 7 - x86_64
sudo apt install build-essential
sudo apt install libcurl4-openssl-dev libsqlite3-dev pkg-config git curl ldc systemd-dev libdbus-1-dev
For GUI notifications the following is also necessary:
sudo apt install libnotify-dev
Debian 11 | Debian 12 | Debian 13 - ARMHF and ARM64
Note
For Debian ARM platforms it is advisable to use the distribution provided 'ldc' package to ensure compiler consistency.
sudo apt install build-essential
sudo apt install libcurl4-openssl-dev libsqlite3-dev pkg-config git curl ldc systemd-dev libdbus-1-dev
For GUI notifications the following is also necessary:
sudo apt install libnotify-dev
Fedora
Note
Fedora 41 and above uses dnf5 which removes some deprecated aliases, specifically 'groupinstall' in this instance.
sudo dnf group install development-tools
sudo dnf install libcurl-devel sqlite-devel dbus-devel ldc
For GUI notifications the following is also necessary:
sudo dnf install libnotify-devel
FreeBSD
Note
Install the required FreeBSD packages as 'root' unless you have installed 'sudo'
For FreeBSD it is advisable to use the distribution provided 'ldc' package to ensure compiler consistency.
pkg install bash bash-completion gmake pkgconf autoconf automake logrotate libinotify git sqlite3 ldc
For GUI notifications the following is also necessary:
pkg install libnotify
Gentoo
sudo emerge --onlydeps net-misc/onedrive
MX Linux 25
sudo apt install build-essential
sudo apt install libcurl4-openssl-dev libsqlite3-dev pkg-config git curl ldc systemd-dev libdbus-1-dev
For GUI notifications the following is also necessary:
sudo apt install libnotify-dev
OpenSUSE Leap | OpenSUSE Tumbleweed
sudo zypper refresh
sudo zypper install gcc git libcurl-devel sqlite3-devel ldc dbus-1-devel
For GUI notifications the following is also necessary:
sudo zypper install libnotify-devel
OpenBSD 7.7
pkg_add bash gmake autoconf automake libinotify git sqlite3 curl dmd
Note
If asked to chose package for autoconf, select
autoconf-2.72p0If asked to chose package for automake, select
automake-1.16.5p0
For Bash completion support, also install:
pkg_add bash-completion
For GUI notifications, also install:
pkg_add libnotify
Note
Install the required OpenBSD packages as 'root' unless you have installed 'sudo'
OpenBSD 7.8
Important
Building the client with the D compilers supplied by the official OpenBSD 7.8 package repository is not supported.
On
amd64, OpenBSD 7.8 does not provide DMD or LDC packages, and its GDC package is version 11.2.0, which is older than the minimum supported GDC version of 15.
OpenBSD 7.9
pkg_add bash gmake autoconf automake libinotify git sqlite3 curl gdc
Note
If asked to chose package for autoconf, select
autoconf-2.72p0If asked to chose package for automake, select
automake-1.16.5p0
For Bash completion support, also install:
pkg_add bash-completion
For GUI notifications, also install:
pkg_add libnotify
Note
Install the required OpenBSD packages as 'root' unless you have installed 'sudo'
Raspbian - ARMHF and ARM64
Caution
The minimum LDC compiler version required to compile this application is 1.20.1, which is not available for Debian Buster or distributions based on Debian Buster. You are advised to first upgrade your platform distribution to one that is based on Debian Bullseye (Debian 11) or later.
Note
These dependencies were validated using:
Linux raspberrypi 5.10.92-v8+ #1514 SMP PREEMPT Mon Jan 17 17:39:38 GMT 2022 aarch64(2022-01-28-raspios-bullseye-armhf-lite) using Raspberry Pi 3B (revision 1.2)Linux raspberrypi 5.10.92-v8+ #1514 SMP PREEMPT Mon Jan 17 17:39:38 GMT 2022 aarch64(2022-01-28-raspios-bullseye-arm64-lite) using Raspberry Pi 3B (revision 1.2)Linux ubuntu 5.15.0-1005-raspi #5-Ubuntu SMP PREEMPT Mon Apr 4 12:21:48 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux(ubuntu-22.04-preinstalled-server-arm64+raspi) using Raspberry Pi 3B (revision 1.2)
sudo apt install build-essential
sudo apt install libcurl4-openssl-dev libsqlite3-dev pkg-config git curl ldc systemd-dev libdbus-1-dev
For GUI notifications the following is also necessary:
sudo apt install libnotify-dev
RedHat Enterprise Linux (RHEL) 8 | RedHat Enterprise Linux (RHEL) 9 | RedHat Enterprise Linux (RHEL) 10
LDC is available for supported RHEL releases through EPEL. Enable the appropriate EPEL repository and its required CodeReady Builder repository for your RHEL release before installing the build dependencies.
sudo dnf groupinstall 'Development Tools'
sudo dnf install libcurl-devel sqlite-devel dbus-devel ldc
For GUI notifications the following is also necessary:
sudo dnf install libnotify-devel
Note
Make sure repos are enabled/subscribed. Minimal images/containers sometimes don’t have group metadata; on those, the group may appear “not available” until you enable the right repos (or use a full image).
Ubuntu 16.x
Ubuntu 16.x LTS reached the end of its five-year LTS window on April 30th 2021 and is no longer supported or tested against.
Ubuntu 18.x
Ubuntu 18.x LTS reached the end of its five-year LTS window on May 31th 2023 and is no longer supported or tested against.
Ubuntu 20.x
Ubuntu 20.x LTS reached the end of its five-year LTS window on May 31th 2025 and is no longer supported or tested against.
Ubuntu 22.x | Ubuntu 24.x
Note
These dependency requirements also apply to any distribution derived from Ubuntu, including but not limited to:
- Lubuntu
- Linux Mint
- Pop!_OS
- Peppermint OS
- Zorin OS
sudo apt install build-essential
sudo apt install libcurl4-openssl-dev libsqlite3-dev pkg-config git curl ldc systemd-dev libdbus-1-dev
For GUI notifications the following is also necessary:
sudo apt install libnotify-dev
Clone, Configure, Build, Install
High Level Steps to building the OneDrive Client for Linux
The overall process is as follows:
- Install the required platform dependencies and the distribution-provided LDC package (see above)
- Clone the GitHub repository
- Run the configure script adding any applicable build options (see below), then build the application
- Either run the built binary directly from the build directory, or install it system-wide
Building the Application Using Default configure Settings
Building the application on Linux using LDC, DMD or GDC
When LDC is installed from your distribution packages, no compiler activation step is required. The compiler is installed into the normal system path and can be detected directly by configure.
Clone, build and install the client:
git clone https://github.com/abraunegg/onedrive.git
cd onedrive
./configure
make clean; make;
sudo make install
Note
If more than one supported D compiler is installed and you need to select a specific compiler, pass it explicitly to
configure. For example, use./configure DC=ldc2for LDC or./configure DC=gdcfor GDC.If you intentionally install a compiler outside your distribution package manager, follow that compiler's own instructions to make it available in your shell environment before running
configure.
Building the application on FreeBSD using gmake
git clone https://github.com/abraunegg/onedrive.git
cd onedrive
./configure
gmake clean; gmake;
gmake install
Note
Build and install the application as 'root' unless you have installed 'sudo'
Building the application on OpenBSD using gmake
Note
Install packages and perform the final system-wide installation as
root. The configure and compilation steps should normally be run as a non-root build user.
Configure the shared library search path for libinotify
The libinotify package installs its shared library in /usr/local/lib/inotify, which is not one of the default shared-library directories processed at boot.
Add the following setting to /etc/rc.conf.local:
shlib_dirs="/usr/local/lib/inotify"
If shlib_dirs is already defined, append /usr/local/lib/inotify to the existing space-separated list instead of defining the variable a second time.
This setting causes OpenBSD's normal boot process to add the directory to the shared-library hints automatically. To apply the change immediately without rebooting, run the following once as root:
ldconfig -m /usr/local/lib/inotify
You can inspect the active shared-library hints with:
ldconfig -r | grep '/usr/local/lib/inotify'
Configure login.conf for non-root compilation
OpenBSD applies resource limits through login classes. A D compiler may hit the login class data-size limit even when the system still has free memory.
Before changing /etc/login.conf, confirm that the failure is caused by a resource limit and identify the login class assigned to the build user. Adjust only that class rather than changing the global default class unless a system-wide change is intentional.
The following values were used successfully while preparing this documentation:
:datasize-cur=8192M:\
:datasize-max=infinity:\
Add or update those capabilities within the existing entry for the build user's login class. The values above are tested examples, not mandatory values for every OpenBSD system; use the smallest limits that allow the compiler to complete.
After editing /etc/login.conf, rebuild the capability database as root:
cap_mkdb /etc/login.conf
Then log out and log back in before checking the effective limits with:
ulimit -a
Compiling the application on OpenBSD using gmake
OpenBSD's base shell is ksh, while this project's configure script must be run with the installed Bash shell.
git clone https://github.com/abraunegg/onedrive.git
cd onedrive
bash ./configure
gmake clean; gmake;
gmake install
Building on ARM | Raspberry Pi
Caution
The minimum LDC compiler version required to compile this application is 1.20.1, which is not available for Debian Buster or distributions based on Debian Buster. You are advised to first upgrade your platform distribution to one that is based on Debian Bullseye (Debian 11) or later.
Important
For successful compilation of this application, it's crucial that the build environment is equipped with a minimum of 1GB of memory and an additional 1GB of swap space. To verify your system's swap space availability, you can use the
swaponcommand. Ensuring these requirements are met is vital for the application's compilation process.
Note
The
configurestep will detect the correct version of LDC to be used when compiling the client under ARMHF and ARM64 CPU architectures.
git clone https://github.com/abraunegg/onedrive.git
cd onedrive
./configure; make clean; make;
sudo make install
Build Options for Customising the Application
The configure script provides several options that allow you to tailor the build to your needs. These options can be used to enable or adjust specific features in the client, including:
- Enabling GUI desktop notifications
- Enabling shell completion support
- Enabling internal debugging to assist with troubleshooting and performance analysis
- Specifying a custom systemd service installation directory
Build Option: Enable GUI Desktop Notifications
To enable GUI notification support, include the --enable-notifications option when running configure, for example:
./configure --enable-notifications
Enabling this option allows the client to send GUI notifications through the Display Manager via the DBus interface.
Tip
Package maintainers are encouraged to enable this option.
When this option is enabled, the client automatically checks at runtime whether GUI notifications can be delivered via the Display Manager through the DBus interface. If this option is not enabled, GUI notifications are disabled.
Build Option: Enable Shell Completion Support
To enable command-line shell completions, include the --enable-completions option when running configure, for example:
./configure --enable-completions
When enabled, completion scripts will be installed for bash, zsh, and fish shells.
By default, the installation directories are detected automatically. If needed, you can manually specify the installation paths using the following options:
--with-bash-completion-dir=<DIR>
--with-zsh-completion-dir=<DIR>
--with-fish-completion-dir=<DIR>
Tip
Package maintainers are encouraged to enable this option.
Build Option: Enabling internal debugging
To enable internal debugging support, include the --enable-debug option when running configure, for example:
./configure --enable-debug
Enabling this option builds the client with additional debug symbols outside of creating a separate debug package build.
This is particularly useful when investigating performance issues (e.g. with perf) or diagnosing application crashes.
What difference does this make?
Without this option, if the application encounters a crash, the stack trace may contain unresolved symbols, often shown as ??:??, which makes identifying the cause very difficult.
With --enable-debug enabled, the resulting crash stack trace includes full source file and line information. This allows the issue to be located and isolated quickly and accurately.
Tip
Package maintainers are encouraged to enable this option.
Build Option: Customising the Systemd Service Installation Directory
By default, systemd service files are installed into the directories detected via pkg-config --variable=systemdsystemunitdir systemd and related settings.
If you need to override these locations, specify one or both of the following options when running configure:
--with-systemdsystemunitdir=<DIR> # System-wide service unit directory
--with-systemduserunitdir=<DIR> # User-level service unit directory
To disable installation of a service file entirely, pass no as the directory value. For example:
./configure --with-systemduserunitdir=no
This prevents the corresponding service unit from being installed.
Upgrading the Client
Caution
Before starting any upgrade, stop any running systemd service for the client. This ensures the service is restarted using the updated binary.
How you upgrade depends on how the client was originally installed:
If installed from a distribution package
When the package maintainer publishes an updated version, the client will be upgraded automatically as part of your normal system package updates (e.g., apt upgrade, dnf upgrade, zypper up, etc.).
If installed from source
To upgrade a source-built installation, the recommended approach is:
- Uninstall the existing client (see instructions below).
- Re-clone the repository.
- Re-compile and re-install the new version.
Note
The uninstall process removes all components, including systemd service files. If you created custom systemd unit files (e.g., for SharePoint library access), you will need to recreate or restore them after re-installation.
You may choose to skip the uninstall step and simply re-compile and re-install over the top.
However, this risks leaving multiple onedrive binaries on your system.
Depending on your system PATH, the wrong binary may be executed.
After installation, verify the version in use:
onedrive --version
This confirms that the upgrade was successful.
Uninstalling the client
How to uninstall depends on how the client was installed.
If installed from a distribution package
Uninstall the client using your distribution’s package management tools.
Refer to your distribution’s documentation for the correct removal command (e.g. apt remove, dnf remove, zypper remove, etc.).
If installed from source
If you built and installed the client from a GitHub clone, run the following command from within the cloned repository directory:
sudo make uninstall
This removes the installed onedrive binary and associated system files.
Optional: Remove client configuration and state
If you do not plan to upgrade or reinstall and wish to remove all client data, run:
rm -rf ~/.config/onedrive
Important
If you used the
--confdiroption, replace~/.config/onedrivewith the custom configuration directory you specified.
Optional: Remove only the application key
If you want to retain your items database but remove the stored authentication token, run:
rm -f ~/.config/onedrive/refresh_token
This preserves sync state while requiring re-authentication on next run.