Install Git Alpine

Install Git Alpine
  1. Install Git Alpine Linux
  2. Install Git Alpine Windows
  3. Alpinelinux Install Git
  4. Install Git Alpine Windows
  5. Alpine Install Git Package
  1. Assuming a GNU/Linux environment, otherwise see alternative guides.
  2. Install git, to conveniently download the source code, and your distro's default build tools metapackage to do the cross-compilation process.
  3. Some feeds might not available over git but only via subversion (short: svn) or mercurial. If you want to obtain their source-code, you need to install svn and mercurial as well.
  4. Install other prerequisite packages, as indicated in the table and examples below.
  5. Unset environment variables like SED and GREP_OPTIONS and aliases/functions like which.

Sudo yum install -y epel-release sudo yum update -y sudo yum groupinstall -y 'Development tools' sudo yum install -y elfutils-libelf-devel cmake3 git bison flex ncurses-devel sudo yum install -y luajit luajit-devel # for Lua support Install and compile LLVM. You could compile LLVM from source code.

  1. I'm not able to install pip in Docker. Here's my Dockerfile: FROM ubuntu:14.04 # Install dependencies RUN apt-get update -y RUN apt-get install -y git curl apache2 php5 libapache2-mod-php5 php5-mcrypt php5-mysql python3.4 python-pip When building, I get.
  2. As of 2021-08-03, the GitLab Runner Docker image based on Alpine uses Alpine 3.12.0. However, you can upgrade the image’s OS before it is available in the GitLab repositories. To build a gitlab-runner Docker image for the latest Alpine version.


This table contains the package name for each build prerequisite in different GNU/Linux and Unix like distributions.

  • Bleeding edge distros like Archlinux may fail to build base-files if Cryptographically signed package lists in Global build settings is enabled.
Prerequisite Debian SUSE Red Hat macOS (via MacPorts) Fedora Arch Gentoo
asciidoc asciidoc asciidoc asciidoc asciidoc asciidoc asciidoc app-text/asciidoc
GNU Bash bash bash bash bash bash bash app-shells/bash
GNU Binutils binutils binutils binutils binutils binutils binutils sys-devel/binutils
bzip2 bzip2 bzip2 bzip2 bzip2 bzip2 bzip2 app-arch/bzip2
flex flexflex flex flex flex flex sys-devel/flex
git git-core git-core git git-core git git dev-vcs/git
GNU C++ Compiler g++ gcc-c++ gcc-c++ ? gcc-c++ gcc sys-devel/gcc
GNU C Compiler gcc gcc gcc ? gcc gcc sys-devel/gcc
GNU Time ? ? ? ? ? time sys-process/time
getopt util-linux util-linux util-linux getopt util-linux util-linux sys-apps/util-linux
GNU awk gawk gawk gawk gawk gawk gawk sys-apps/gawk
help2man help2man ? ? ? help2man help2man sys-apps/help2man
intltool-update intltool intltool intltool intltool intltool intltool dev-util/intltool
libelf-dev libelf-dev ? ? ? elfutils-libelf-devel libelf virtual/libelf
libz, libz-dev zlib1g-dev zlib-devel zlib-devel zlib zlib-devel zlib sys-libs/zlib
GNU make make make make gmake make make sys-devel/make
ncurses libncurses5-dev ncurses-devel ncurses-devel ncurses ncurses-devel ncurses sys-libs/ncurses
openssl/ssl.h libssl-dev libopenssl-devel openssl-devel openssl openssl-devel openssl dev-libs/openssl
patch patch patch patch patchutils patch patch sys-devel/patch
perl-ExtUtils-MakeMaker perl-modules perl-ExtUtils-MakeMaker perl-ExtUtils-MakeMaker p5-extutils-makemaker perl-ExtUtils-MakeMaker perl-extutils-makemaker virtual/perl-ExtUtils-MakeMaker
perl-Thread-Queue ? ? ? ? perl-Thread-Queue ? virtual/perl-Thread-Queue
python2-dev python2-dev python-devel ? python2 ? python2 dev-lang/python:2
? python3-dev ? ? ? ? ? ?
unzip unzip unzip unzip unzip unzip unzip app-arch/unzip
GNU Wget wget wget wget wget wget wget net-misc/wget
xgettext gettext gettext-tools gettext gettext gettext gettext sys-devel/gettext
xsltproc xsltproc libxslt-tools ? libxslt libxslt libxslt dev-libs/libxslt
zlib, zlib-static zlib1g-dev zlib-devel-static zlib-devel zlib-devel zlib-devel,zlib-static zlib sys-libs/zlib (USE=static-libs)

Package prerequisites

Unfortunately not all dependencies are checked by make config, especially for packages.You may encounter compile errors because you need a specific library in your system, and the only way is to search the missing library from the compiler error log and see what package contains it in your own distro.

The following table is a partial list of such dependencies:

Install Git Alpine Linux

Package Prerequisite Debian SUSE Red Hat macOS Fedora Arch Gentoo
boost bjam / boost-jam libboost-dev boost-jam boost dev-util/boost-build
intltool [Perl] XML::Parser libxml-parser-perl perl-XML-Parser perl-XML-Parser intltool dev-perl/XML-Parser
libftdi libusb-config libusb-dev libusb-devel libusb dev-libs/libusb-compat
lilo as86,ld86 bin86 dev86 bin86 sys-devel/bin86
lilo bcc bcc dev86 aur/bcc sys-devel/dev86
lilo uudecode sharutils sharutils sharutils app-arch/sharutils
luajit x86 g++ libs on amd64 hosts gcc-multilib
classpath javac, gcj openjdk-7-jdk java-1.7.0-openjdk-devel jdk7-openjdk dev-java/oracle-jdk-bin, sys-devel/gcc[gcj], and one (or both) of dev-java/icedtea-bin:7 and dev-java/icedtea:7
mac80211 b43-fwcutter b43-fwcutter b43-fwcutter net-wireless/b43-fwcutter
jamvm zip zip app-arch/zip

Linux distributions


Arch / Manjaro

Arch users may install the openwrt-devel meta-package from the AUR or alternatively, manually install the build dependencies as follows:

CentOS / Fedora

Debian / Ubuntu



This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies

Rclone is a Go program and comes as a single binary file.


  • Download the relevant binary.
  • Extract the rclone or rclone.exe binary from the archive
  • Run rclone config to setup. See rclone config docs for more details.
  • Optionally configure automatic execution.

See below for some expanded Linux / macOS instructions.

See the Usage section of the docs for how to use rclone, orrun rclone -h.

Already installed rclone can be easily updated to the latest versionusing the rclone selfupdate command.

Script installation

To install rclone on Linux/macOS/BSD systems, run:

For beta installation, run:

Note that this script checks the version of rclone installed first andwon't re-download if not needed.

Linux installation from precompiled binary

Fetch and unpack

Copy binary file

Install manpage

Run rclone config to setup. See rclone config docs for more details.

macOS installation with brew

macOS installation from precompiled binary, using curl

To avoid problems with macOS gatekeeper enforcing the binary to be signed andnotarized it is enough to download with curl.

Download the latest version of rclone.

Unzip the download and cd to the extracted folder.

Move rclone to your $PATH. You will be prompted for your password.

(the mkdir command is safe to run, even if the directory already exists).

Remove the leftover files.

Run rclone config to setup. See rclone config docs for more details.

macOS installation from precompiled binary, using a web browser

When downloading a binary with a web browser, the browser will set the macOSgatekeeper quarantine attribute. Starting from Catalina, when attempting to runrclone, a pop-up will appear saying:

The simplest fix is to run

Install with docker

The rclone maintains a docker image for rclone.These images are autobuilt by docker hub from the rclone source basedon a minimal Alpine linux image.

The :latest tag will always point to the latest stable release. Youcan use the :beta tag to get the latest build from master. You canalso use version tags, e.g. :1.49.1, :1.49 or :1.

There are a few command line options to consider when starting an rclone Docker containerfrom the rclone image.

  • You need to mount the host rclone config dir at /config/rclone into the Dockercontainer. Due to the fact that rclone updates tokens inside its config file, and thatthe update process involves a file rename, you need to mount the whole host rcloneconfig dir, not just the single host rclone config file.

  • 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 filesreside on the host with a non-root UID:GID, you need to pass these on the containerstart command line.

  • If you want to access the RC interface (either via the API or the Web UI), it isrequired to set the --rc-addr to :5572 in order to connect to it from outsidethe container. An explanation about why this is necessary is present here.

    • NOTE: Users running this container with the docker network set to host shouldprobably set it to listen to localhost only, with as the value for--rc-addr
  • It is possible to use rclone mount inside a userspace Docker container, and exposethe resulting fuse mount to the host. The exact docker run options to do that mightvary slightly between hosts. See, e.g. the discussion in thisthread.

    You also need to mount the host /etc/passwd and /etc/group for fuse to work insidethe container.

Here are some commands tested on an Ubuntu 18.04.3 host:

Install from source

Make sure you have at least Go go1.13installed. Download go if necessary. Thelatest release is recommended. Then

This will leave you a checked out version of rclone you can modify andsend pull requests with. If you use make instead of go build thenthe rclone build will have the correct version information in it.

You can also build the latest stable rclone with:

or the latest version (equivalent to the beta) with

These will build the binary in $(go env GOPATH)/bin(~/go/bin/rclone by default) after downloading the source to the gomodule cache. Note - do not use the -u flag here. This causes goto try to update the dependencies that rclone uses and sometimes thesedon't work with the current version of rclone.

Install git alpine linux

Installation with Ansible

This can be done with Stefan Weichinger's ansiblerole.


  1. git clone into your local roles-directory
  2. add the role to the hosts you want rclone installed to:

After installing and configuring rclone, as described above, you are ready to use rcloneas an interactive command line utility. If your goal is to perform periodic operations,such as a regular sync, you will probably wantto configure your rclone command in your operating system's scheduler. If you need toexpose service-like features, such as remote control,GUI, serveor mount, you will often want an rclonecommand always running in the background, and configuring it to run in a service infrastructuremay be a better option. Below are some alternatives on how to achieve this ondifferent operating systems.

NOTE: Before setting up autorun it is highly recommended that you have tested your commandmanually from a Command Prompt first.

Autostart on Windows

The most relevant alternatives for autostart on Windows are:

  • Run at user log on using the Startup folder
  • Run at user log on, at system startup or at schedule using Task Scheduler
  • Run at system startup using Windows service

Running in background

Install Git Alpine Windows

Rclone is a console application, so if not starting from an existing Command Prompt,e.g. when starting rclone.exe from a shortcut, it will open a Command Prompt window.When configuring rclone to run from task scheduler and windows service you are ableto set it to run hidden in background. From rclone version 1.54 you can also make itrun hidden from anywhere by adding option --no-console (it may still flash brieflywhen the program starts). Since rclone normally writes information and any errormessages to the console, you must redirect this to a file to be able to see it.Rclone has a built-in option --log-file for that.

Example command to run a sync in background:

User account

As mentioned in the mount documentation,mounted drives created as Administrator are not visible to other accounts, not even theaccount that was elevated as Administrator. By running the mount command as thebuilt-in SYSTEM user account, it will create drives accessible for everyone onthe system. Both scheduled task and Windows service can be used to achieve this.

NOTE: Remember that when rclone runs as the SYSTEM user, the user profilethat it sees will not be yours. This means that if you normally run rclone withconfiguration file in the default location, to be able to use the same configurationwhen running as the system user you must explicitely tell rclone where to findit with the --config option,or else it will look in the system users profile path (C:WindowsSystem32configsystemprofile).To test your command manually from a Command Prompt, you can run it withthe PsExecutility from Microsoft's Sysinternals suite, which takes option -s toexecute commands as the SYSTEM user.

Start from Startup folder

To quickly execute an rclone command you can simply create a standardWindows Explorer shortcut for the complete rclone command you want to run. If youstore this shortcut in the special 'Startup' start-menu folder, Windows willautomatically run it at login. To open this folder in Windows Explorer,enter path %APPDATA%MicrosoftWindowsStart MenuProgramsStartup,or C:ProgramDataMicrosoftWindowsStart MenuProgramsStartUp if you wantthe command to start for every user that logs in.

This is the easiest approach to autostarting of rclone, but it offers nofunctionality to set it to run as different user, or to set conditions oractions on certain events. Setting up a scheduled task as described belowwill often give you better results.

Start from Task Scheduler

Task Scheduler is an administrative tool built into Windows, and it can be used toconfigure rclone to be started automatically in a highly configurable way, e.g.periodically on a schedule, on user log on, or at system startup. It can runbe configured to run as the current user, or for a mount command that needs tobe available to all users it can run as the SYSTEM user.For technical information, see

Run as service

For running rclone at system startup, you can create a Windows service that executesyour rclone command, as an alternative to scheduled task configured to run at startup.

Mount command built-in service integration

For mount commands, Rclone has a built-in Windows service integration via the third partyWinFsp library it uses. Registering as a regular Windows service easy, as you just have toexecute the built-in PowerShell command New-Service (requires administrative privileges).

Example of a PowerShell command that creates a Windows service for mountingsome remote:/files as drive letter X:, for all users (service will be running as thelocal system account):

The WinFsp service infrastructuresupports incorporating services for file system implementations, such as rclone,into its own launcher service, as kind of 'child services'. This has the additionaladvantage that it also implements a network provider that integrates intoWindows standard methods for managing network drives. This is currently notofficially supported by Rclone, but with WinFsp version 2019.3 B2 / v1.5B2 or laterit should be possible through path rewriting as described here.

Third party service integration

To Windows service running any rclone command, the excellent third party utilityNSSM, the 'Non-Sucking Service Manager', can be used.It includes some advanced features such as adjusting process periority, definingprocess environment variables, redirect to file anything written to stdout, andcustomized response to different exit codes, with a GUI to configure everything from(although it can also be used from command line ).

There are also several other alternatives. To mention one more,WinSW, 'Windows Service Wrapper', is worth checking out.It requires .NET Framework, but it is preinstalled on newer versions of Windows, and italso provides alternative standalone distributions which includes necessary runtime (.NET 5).WinSW is a command-line only utility, where you have to manually create an XML file withservice configuration. This may be a drawback for some, but it can also be an advantageas it is easy to back up and re-use the configurationsettings, without having go through manual steps in a GUI. One thing to note is thatby default it does not restart the service on error, one have to explicit enable thisin the configuration file (via the 'onfailure' parameter).

Alpinelinux Install Git

Autostart on Linux

Start as a service

To always run rclone in background, relevant for mount commands etc,you can use systemd to set up rclone as a system or user service. Running as asystem service ensures that it is run at startup even if the user it is running ashas no active session. Running rclone as a user service ensures that it onlystarts after the configured user has logged into the system.

Install Git Alpine Windows

Run periodically from cron

Alpine Install Git Package

To run a periodic command, such as a copy/sync, you can set up a cron job.