Public | Automated Build

Last pushed: 2 years ago
Short Description
An OneDrive client in a docker container
Full Description



This is a useful tool to synchronize your data between OneDrive (personal account only) and any environment that supports Docker. It uses Ubuntu as base layer and OneDrive Free Client.

Quick Start

Step 1

docker pull kukki/docker-onedrive

Step 2

docker run -it --restart on-failure --name docker-onedrive
  -v /path/to/onedrive:/onedrive


  • Update /path/to to your actual path of onedrive root and onedrive.conf.
  • --restart on-failure is to set auto-restart when the sync is timeout due to the connection.

Step 3

  • Copy the URL in the prompt and visit it on your browser.

  • It authenticates and authorizes your Microsoft account.

  • After you accept the application, a response URI is updated in the browser.

  • Copy the URI to the prompt and hit Enter

Step 4

You can keep the docker container running in the foreground.

-- or --

You can hit CTRL-C to stop it and then re-start the container.

docker start docker-onedrive

Advanced Use

Step 1 - Register Your App

Step 2 - Retrieve Your Client ID

  • Choose Mobile application in Platforms.
  • The client ID is then available.

Step 3 - Apply the Client ID

  • Create file onedrive.conf in your convenient place with the following content:
client_id = "";
sync_dir = "/onedrive"
skip_file = ".*|~*"
skip_dir = ".*"
  • Copy and paste your client ID to clien_id parameter.
  • For reference of onedrive.conf settings, please see this configuration.

Step 4 - Re-create Docker Containers

docker rm docker-onedrive
docker run -it --restart on-failure --name docker_onedrive
  -v /path/to/onedrive:/onedrive
  -v /path/to/onedrive.conf:/usr/local/etc/onedrive.conf
  • Follow step 3 and step 4 in Quick Start.



Docker Pull Command
Source Repository