← All work

CloudDrive: your own file cloud, one command away

A self-hosted alternative to Google Drive or Nextcloud. It runs as a single Go binary with a React interface, keeps your files as plain files on disk, and starts with one docker run command and a setup wizard. Built with security as the starting point, and open source under the AGPL licence.

Status
In production on our own server; prebuilt Docker image
Storage
Plain files on disk, no database
Stack
Go, React, TypeScript, Docker
Source
Open source on GitHub
CloudDrive file manager
The file manager: folders, search and uploads in the browser.

What it does

A complete file manager

Browse in a list or grid, drag and drop uploads that resume for large files, zip and unzip, restore from the trash, and search by name, tag or file contents.

Previews and version history

Previews for images, video, audio, PDF and text, with cached thumbnails. When a file is overwritten, the previous version is kept and can be restored in one click.

Sharing with limits

Public links, password-protected links and upload-only drop boxes, all with an expiry date.

Built for several users

Each user gets a home folder, with admin and user roles, storage quotas and private folders. Users can see their active sessions and sign out any of their devices.

Security built in

Passwords hashed with bcrypt, optional TOTP two-factor login, CSRF protection, rate limits that forged proxy headers can't get around, and an audit log of who did what.

Fits into your setup

Optional WebDAV to mount the drive as a network disk, folder flags that your own backup tool such as restic can pick up, dark mode, and an app you can install on phone or desktop.

Relevant if you're looking for…

CloudDrive is free and open source on GitHub, and it covers these needs.

  • An alternative to Google Drive that you host yourself: every user gets a home folder with previews, version history, search and a trash to restore from, and WebDAV lets you mount it as a network drive.
  • A Nextcloud alternative with few moving parts: CloudDrive is one Go binary with the React interface built in, and it needs no database because your files stay plain files on disk.
  • Self-hosted file sharing: share through public links, password-protected links or upload-only drop boxes, all with an expiry date.
  • Open-source cloud storage on GitHub: CloudDrive is free under the AGPL-3.0 licence, with the code at github.com/Defcons/clouddrive and a prebuilt Docker image for amd64 and arm64.

We build this for clients: Custom software and internal tools

How it works

  1. 01

    Run

    One docker run command, or a short Compose file.

  2. 02

    Set up

    Create the admin account in the first-run wizard. No config file or secret to write.

  3. 03

    Protect

    Put it behind your own HTTPS reverse proxy.

  4. 04

    Use

    Add users, share files, and let your backup tool pick up the flagged folders.

How it's built

CloudDrive is one Go binary that serves both the API and the React interface, which is built into it. There is no database: files are plain files on disk, and users, sessions and settings are JSON files written atomically, so a crash never leaves a half-written file and a damaged one is kept for recovery. A GitHub Actions workflow publishes an image for amd64 and arm64 and deploys it on every push to the main branch.

Security has been worked through in six audit rounds. The fifth, a fresh sweep of code already hardened four times, still found two high-severity issues, a path-traversal write and an image decode bomb, and both were fixed. Every file operation goes through the same path checks, which keep users inside their home folder and block the app's internal files, and work driven by a request, from uploads to image decoding, has a size cap.

Engineering highlights

  • Zero-config first run: the signing key is generated and stored on first boot
  • Session tokens are typed, so a half-finished two-factor login can never act as a session
  • Container runs as a non-root user with all capabilities dropped
  • CI actions pinned to exact commit hashes
  • Multi-architecture Docker image for amd64 and arm64
  • AGPL-3.0: anyone running a modified version as a service must share their changes

Questions

What do I need to run CloudDrive?

Docker on an amd64 or arm64 machine and your own HTTPS reverse proxy in front. You start it with one docker run command or a short Compose file, and the first-run wizard creates the admin account with no config file or secret to write.

How secure is CloudDrive?

It has been through six security audit rounds, and the fifth still found two high-severity issues, which were both fixed. Passwords are hashed with bcrypt, two-factor login with TOTP is optional, and an audit log records who did what.

Can you build something like this for our business?

Yes. We build systems for businesses the same way, quick to install, with few moving parts and security tested round after round, and we can deploy them on your servers or ours.

Want something like this?

CloudDrive shows how we build self-hosted systems: quick to install, few moving parts, and security that has been tested round after round.

Get in touch

← All work · Software & AI for businesses