2015-06-06 09:05:21 +00:00
---
title: "Install"
description: "Rclone Installation"
2016-04-18 17:55:07 +00:00
---
2015-06-06 09:05:21 +00:00
2016-10-06 16:20:45 +00:00
# Install #
2015-06-06 09:05:21 +00:00
Rclone is a Go program and comes as a single binary file.
2016-10-06 16:20:45 +00:00
## Quickstart ##
2015-06-06 09:05:21 +00:00
2016-10-06 16:20:45 +00:00
* [Download ](/downloads/ ) the relevant binary.
2018-08-28 14:30:47 +00:00
* Extract the `rclone` or `rclone.exe` binary from the archive
2017-03-29 09:06:22 +00:00
* Run `rclone config` to setup. See [rclone config docs ](/docs/ ) for more details.
2015-06-06 09:05:21 +00:00
2016-10-06 16:20:45 +00:00
See below for some expanded Linux / macOS instructions.
2015-06-14 14:04:39 +00:00
2020-05-25 06:29:23 +00:00
See the [Usage section ](/docs/#usage ) of the docs for how to use rclone, or
2015-06-06 09:05:21 +00:00
run `rclone -h` .
2015-06-28 09:38:27 +00:00
2021-03-13 20:02:40 +00:00
Already installed rclone can be easily updated to the latest version
using the [rclone selfupdate ](/commands/rclone_selfupdate/ ) command.
2017-12-04 20:58:14 +00:00
## Script installation ##
2018-02-08 14:56:39 +00:00
To install rclone on Linux/macOS/BSD systems, run:
2017-12-04 20:58:14 +00:00
curl https://rclone.org/install.sh | sudo bash
For beta installation, run:
curl https://rclone.org/install.sh | sudo bash -s beta
2017-12-14 11:00:22 +00:00
Note that this script checks the version of rclone installed first and
won't re-download if not needed.
2016-10-06 16:20:45 +00:00
## Linux installation from precompiled binary ##
Fetch and unpack
2017-03-29 09:06:22 +00:00
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
2016-10-06 16:20:45 +00:00
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64
Copy binary file
2015-06-28 09:38:27 +00:00
2017-02-26 10:09:23 +00:00
sudo cp rclone /usr/bin/
sudo chown root:root /usr/bin/rclone
sudo chmod 755 /usr/bin/rclone
2016-10-06 16:20:45 +00:00
Install manpage
2015-06-28 09:38:27 +00:00
sudo mkdir -p /usr/local/share/man/man1
sudo cp rclone.1 /usr/local/share/man/man1/
sudo mandb
2016-07-09 12:47:55 +00:00
2017-03-29 09:06:22 +00:00
Run `rclone config` to setup. See [rclone config docs ](/docs/ ) for more details.
2016-10-06 16:20:45 +00:00
rclone config
2019-11-22 20:09:16 +00:00
## macOS installation with brew ##
brew install rclone
## macOS installation from precompiled binary, using curl ##
To avoid problems with macOS gatekeeper enforcing the binary to be signed and
notarized it is enough to download with `curl` .
2016-10-06 16:20:45 +00:00
Download the latest version of rclone.
2017-03-29 09:06:22 +00:00
cd & & curl -O https://downloads.rclone.org/rclone-current-osx-amd64.zip
2016-10-06 16:20:45 +00:00
Unzip the download and cd to the extracted folder.
unzip -a rclone-current-osx-amd64.zip & & cd rclone-*-osx-amd64
Move rclone to your $PATH. You will be prompted for your password.
2017-09-26 14:58:03 +00:00
sudo mkdir -p /usr/local/bin
2016-10-06 16:20:45 +00:00
sudo mv rclone /usr/local/bin/
2017-09-26 14:58:03 +00:00
(the `mkdir` command is safe to run, even if the directory already exists).
2016-10-06 16:20:45 +00:00
Remove the leftover files.
cd .. & & rm -rf rclone-*-osx-amd64 rclone-current-osx-amd64.zip
2017-03-29 09:06:22 +00:00
Run `rclone config` to setup. See [rclone config docs ](/docs/ ) for more details.
2016-10-06 16:20:45 +00:00
rclone config
2019-11-22 20:09:16 +00:00
## macOS installation from precompiled binary, using a web browser ##
When downloading a binary with a web browser, the browser will set the macOS
gatekeeper quarantine attribute. Starting from Catalina, when attempting to run
`rclone` , a pop-up will appear saying:
“rclone” cannot be opened because the developer cannot be verified.
macOS cannot verify that this app is free from malware.
The simplest fix is to run
xattr -d com.apple.quarantine rclone
2019-09-02 13:30:11 +00:00
## Install with docker ##
The rclone maintains a [docker image for rclone ](https://hub.docker.com/r/rclone/rclone ).
These images are autobuilt by docker hub from the rclone source based
on a minimal Alpine linux image.
The `:latest` tag will always point to the latest stable release. You
can use the `:beta` tag to get the latest build from master. You can
2020-10-13 21:49:58 +00:00
also use version tags, e.g. `:1.49.1` , `:1.49` or `:1` .
2019-09-02 13:30:11 +00:00
```
$ docker pull rclone/rclone:latest
latest: Pulling from rclone/rclone
Digest: sha256:0e0ced72671989bb837fea8e88578b3fc48371aa45d209663683e24cfdaa0e11
...
$ docker run --rm rclone/rclone:latest version
rclone v1.49.1
- os/arch: linux/amd64
- go version: go1.12.9
```
2019-09-17 05:15:48 +00:00
There are a few command line options to consider when starting an rclone Docker container
from the rclone image.
2019-09-02 13:30:11 +00:00
2019-09-18 19:38:18 +00:00
- You need to mount the host rclone config dir at `/config/rclone` into the Docker
container. Due to the fact that rclone updates tokens inside its config file, and that
the update process involves a file rename, you need to mount the whole host rclone
config dir, not just the single host rclone config file.
2019-09-17 05:15:48 +00:00
- You need to mount a host data dir at `/data` into the Docker container.
- By default, the rclone binary inside a Docker container runs with UID=0 (root).
As a result, all files created in a run will have UID=0. If your config and data files
reside on the host with a non-root UID:GID, you need to pass these on the container
start command line.
2020-08-08 07:21:44 +00:00
- If you want to access the RC interface (either via the API or the Web UI), it is
required to set the `--rc-addr` to `:5572` in order to connect to it from outside
the container. An explanation about why this is necessary is present [here ](https://web.archive.org/web/20200808071950/https://pythonspeed.com/articles/docker-connection-refused/ ).
* NOTE: Users running this container with the docker network set to `host` should
probably set it to listen to localhost only, with `127.0.0.1:5572` as the value for
`--rc-addr`
2019-09-17 05:15:48 +00:00
- It is possible to use `rclone mount` inside a userspace Docker container, and expose
the resulting fuse mount to the host. The exact `docker run` options to do that might
vary slightly between hosts. See, e.g. the discussion in this
[thread ](https://github.com/moby/moby/issues/9448 ).
You also need to mount the host `/etc/passwd` and `/etc/group` for fuse to work inside
the container.
Here are some commands tested on an Ubuntu 18.04.3 host:
2019-09-02 13:30:11 +00:00
```
2019-09-17 05:15:48 +00:00
# config on host at ~/.config/rclone/rclone.conf
# data on host at ~/data
# make sure the config is ok by listing the remotes
docker run --rm \
--volume ~/.config/rclone:/config/rclone \
--volume ~/data:/data:shared \
--user $(id -u):$(id -g) \
rclone/rclone \
listremotes
# perform mount inside Docker container, expose result to host
mkdir -p ~/data/mount
docker run --rm \
--volume ~/.config/rclone:/config/rclone \
--volume ~/data:/data:shared \
--user $(id -u):$(id -g) \
--volume /etc/passwd:/etc/passwd:ro --volume /etc/group:/etc/group:ro \
--device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined \
rclone/rclone \
mount dropbox:Photos /data/mount &
ls ~/data/mount
kill %1
2019-09-02 13:30:11 +00:00
```
2016-10-06 16:20:45 +00:00
## Install from source ##
2021-02-03 17:41:06 +00:00
Make sure you have at least [Go ](https://golang.org/ ) go1.13
2018-08-28 14:30:47 +00:00
installed. [Download go ](https://golang.org/dl/ ) if necessary. The
latest release is recommended. Then
2016-10-06 16:20:45 +00:00
2019-07-28 17:47:38 +00:00
git clone https://github.com/rclone/rclone.git
2018-08-28 14:30:47 +00:00
cd rclone
go build
./rclone version
2020-07-27 10:47:46 +00:00
This will leave you a checked out version of rclone you can modify and
send pull requests with. If you use `make` instead of `go build` then
the rclone build will have the correct version information in it.
2020-03-04 14:01:25 +00:00
2020-07-27 10:47:46 +00:00
You can also build the latest stable rclone with:
2016-10-06 16:20:45 +00:00
2020-07-27 10:47:46 +00:00
go get github.com/rclone/rclone
2016-10-06 16:20:45 +00:00
2020-07-27 10:47:46 +00:00
or the latest version (equivalent to the beta) with
go get github.com/rclone/rclone@master
These will build the binary in `$(go env GOPATH)/bin`
(`~/go/bin/rclone` by default) after downloading the source to the go
module cache. Note - do **not** use the `-u` flag here. This causes go
Spelling fixes
Fix spelling of: above, already, anonymous, associated,
authentication, bandwidth, because, between, blocks, calculate,
candidates, cautious, changelog, cleaner, clipboard, command,
completely, concurrently, considered, constructs, corrupt, current,
daemon, dependencies, deprecated, directory, dispatcher, download,
eligible, ellipsis, encrypter, endpoint, entrieslist, essentially,
existing writers, existing, expires, filesystem, flushing, frequently,
hierarchy, however, implementation, implements, inaccurate,
individually, insensitive, longer, maximum, metadata, modified,
multipart, namedirfirst, nextcloud, obscured, opened, optional,
owncloud, pacific, passphrase, password, permanently, persimmon,
positive, potato, protocol, quota, receiving, recommends, referring,
requires, revisited, satisfied, satisfies, satisfy, semver,
serialized, session, storage, strategies, stringlist, successful,
supported, surprise, temporarily, temporary, transactions, unneeded,
update, uploads, wrapped
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-10-09 00:17:24 +00:00
to try to update the dependencies that rclone uses and sometimes these
2020-07-27 10:47:46 +00:00
don't work with the current version of rclone.
2016-10-06 16:20:45 +00:00
## Installation with Ansible ##
2016-07-09 12:47:55 +00:00
This can be done with [Stefan Weichinger's ansible
role](https://github.com/stefangweichinger/ansible-rclone).
Instructions
1. `git clone https://github.com/stefangweichinger/ansible-rclone.git` into your local roles-directory
2. add the role to the hosts you want rclone installed to:
```
- hosts: rclone-hosts
roles:
- rclone
```