Docs

Docker / Linux / CasaOS

DrivePinner also runs on Linux in a container: every drive becomes a folder under one host directory (/DATA/DrivePinner/<drive> on CasaOS), with the same pinning, offline guarantee, web UI, add-drive wizard and sync jobs as on the Mac. Images: fxerkan/drivepinner on Docker Hub, linux/arm64 (Raspberry Pi 4/5, also with the Pi 5's 16K-page kernel) and linux/amd64.

Quick start (Docker Compose)#

services:
  drivepinner:
    image: fxerkan/drivepinner:latest
    container_name: drivepinner
    restart: unless-stopped
    stop_grace_period: 60s            # drives are unmounted on stop
    devices: [/dev/fuse]
    cap_add: [SYS_ADMIN]
    security_opt: [apparmor:unconfined]
    ports: ["5590:5590"]              # web UI only
    environment:
      TZ: Europe/Istanbul
      # DRIVEPINNER_USER: admin           # optional: create the web UI account up front
      # DRIVEPINNER_PASSWORD: change-me   #   (otherwise the first visit asks you to create it)
    volumes:
      - ./config:/config              # rclone/rclone.conf + drivepinner/ (drives, pins, settings, logs)
      - ./cache:/cache                # the offline copies (rclone VFS cache)
      - type: bind
        source: /srv/drivepinner      # every drive as a folder, visible on the host
        target: /drives
        bind: { propagation: rshared, create_host_path: true }
docker compose up -d

Open http://<host>:5590/. The first visit shows Create your DrivePinner account: choose a username and a password (at least 8 characters). From then on every browser signs in with it. Then Add drive. The full file with CasaOS metadata is docker/compose.yaml.

Create your DrivePinner account
Create your DrivePinner account

CasaOS#

Copy docker/compose.yaml to /var/lib/casaos/apps/drivepinner/docker-compose.yml and start it:

sudo docker compose -p drivepinner -f /var/lib/casaos/apps/drivepinner/docker-compose.yml up -d

The app then shows up on the CasaOS dashboard (title, icon, port 5590 from the x-casaos block). It can also be pasted into CasaOS › App Store › Custom Install › Import. Data lives in /DATA/AppData/drivepinner/{config,cache}, drives in /DATA/DrivePinner.

Signing in to a provider (Google Drive, OneDrive, Dropbox…) from another device#

The add-drive wizard works from any browser, a phone included. Because DrivePinner is not on the device where you sign in, the provider sends your browser back to http://127.0.0.1:53682/?state=…&code=… (Google) or http://localhost:53682/?… (most others) at the end, and that page shows "This site can't be reached". That is expected, and the wizard says so before you start, with a picture of that page:

Sign-in steps with the expected error page
Sign-in steps with the expected error page
  1. Tap Sign in with …, sign in and approve. The provider opens in a new tab.
  2. The error page appears. Copy its address:
    • iPhone / iPad (Safari): tap the address bar, tap it once more so the whole address is selected, then Copy.
    • Android (Chrome): tap the address bar, then the Copy icon next to the address.
    • Computer: click the address bar, Ctrl+C (⌘C on a Mac).
  3. Come back to the DrivePinner tab and paste it into the box (or tap Paste address, shown when the browser lets pages read the clipboard, i.e. over HTTPS). Pasting finishes the sign-in by itself; the wizard shows the progress and continues to the next step.

Why not a sign-in without copying? rclone's built-in app registrations only allow a redirect to this loopback address (Google retired the copy-a-code "out-of-band" flow in 2022, and rclone has no device-code sign-in), so the paste step is the way that works with rclone's default client IDs. Alternatives: run rclone authorize "drive" on a computer with a browser and paste the token into rclone config in the container, or put an existing rclone.conf into config/rclone/ and add its remotes with the wizard or docker exec drivepinner drivepinner add-drive <remote:> [name].

Google Drive client: new Google drives use DrivePinner's built-in Google app when it is configured, or the client set with the environment variables DRIVEPINNER_GOOGLE_CLIENT_ID and DRIVEPINNER_GOOGLE_CLIENT_SECRET (see DrivePinner's Google app).

What is different from the Mac version#

MacDocker / Linux
MountFUSE-T (NFS fallback)kernel FUSE (rclone mount, allow_other, files 0644)
Drives folder~/DrivePinner/drives in the container, bound :rshared to the host
Web UI127.0.0.1:5590, optional LAN access (account or QR link)0.0.0.0:5590, always behind the account sign-in
RC passwordKeychain/config/drivepinner/.rc-password (0600), rotated on every start
Background jobslaunchd agentscore/supervisor.py (service + web, queue every 2 s, daily job, sync jobs every 5 min)
Finder menu, badges, menu bar, thumbnailsyesno ("Show in Finder" and thumbnails are hidden)
WebDAV share passwordsKeychain/config/drivepinner/serve-passwords.json (0600); publish the share ports yourself

Account and sign-in#

  • First visit: "Create your DrivePinner account" (username, password twice, at least 8 characters). Or preseed it with DRIVEPINNER_USER + DRIVEPINNER_PASSWORD in the compose file (used only while no account exists; remove the password from the file afterwards if you like, the account stays).
  • The password is stored as PBKDF2-HMAC-SHA256 (310 000 iterations, random salt) in /config/drivepinner/account.json (0600). Sessions are server-side (sessions.json, 0600, only a hash of each session id); the browser keeps a random session id in an HttpOnly, SameSite=Lax cookie for 30 days.
  • Settings › Account: change password (signs out every other device) and Sign out (also in the sidebar and, on a phone, in the More menu).
  • Five failed sign-ins per minute from one address, then a one-minute wait; the message never says whether the username or the password was wrong.
  • Forgot the password / reset: docker exec drivepinner drivepinner reset-account (or delete /DATA/AppData/drivepinner/config/drivepinner/account.json and sessions.json). The next visit shows the setup page again. Drives and settings are not touched.
  • Requests from inside the container (health check, docker exec) need no sign-in. Everything from outside does, whatever host name or reverse proxy is used; POSTs also need the page's CSRF token and a same-origin Origin.
  • Behind an HTTPS reverse proxy that sets X-Forwarded-Proto: https, the cookie is marked Secure.

Recovery token (optional, also for scripts)#

An access token still works as a recovery or API method: DRIVEPINNER_TOKEN, or a random one generated once into /config/drivepinner/web-token (0600; delete it and restart to rotate). Open http://<host>:5590/?t=<token> to sign this browser in, or send it as the X-DP-Lan header from scripts. Whoever can read the token can use the web UI: keep the config folder private.

Security notes#

  • The container runs as root with CAP_SYS_ADMIN, /dev/fuse and an unconfined AppArmor profile: FUSE mounts that the host and other containers can see need it. Only port 5590 is published; rclone's RC API and GUI listen on 127.0.0.1 inside the container, protected by the rotating RC password.
  • rclone.conf holds your provider tokens. It lives only in the /config volume, never in the image.
  • /DATA/DrivePinner is readable by every user of the host (0644 files): put it somewhere private if the host is shared.

Stopping#

Offline test#

The offline guarantee test runs inside the image against a test folder, with its own isolated instance and a local proxy as "the network":

docker exec drivepinner /app/tests/offline_e2e.sh "gdrive:Some Test Folder" a.txt sub/b.bin
docker exec -e E2E_WRITE=1 -e E2E_PROVIDER=dropbox drivepinner /app/tests/offline_e2e.sh dropbox:test a.txt

Building#

docker buildx build --platform linux/arm64,linux/amd64 -f docker/Dockerfile -t fxerkan/drivepinner:0.9.2 --push .

The Dockerfile installs the official rclone binary (pinned version, SHA256 checked against rclone's published SHA256SUMS), fuse3, tini and Python 3 on debian:trixie-slim.