go-drive
A cross-platform, self-hosted file management server with a modern web UI.
Manage local files and a wide range of cloud storage providers from a single, unified interface.
Live Demo · Documentation · Releases
English | 简体中文
Table of Contents
- Docker - Docker Compose - Prebuilt BinaryOverview
go-drive is a lightweight file-management server written in Go with a Vue/TypeScript frontend. It lets you browse, upload, organize, and share files across many different storage backends — local disks, FTP/SFTP, WebDAV, S3-compatible object storage, OneDrive, Google Drive, MEGA, and more — all through one clean web interface.
The whole application ships as a single self-contained binary (the web UI and i18n assets are embedded), making it trivial to deploy on a server, NAS, or inside a container.
Default credentials: useradmin, password123456. Change the password immediately after the first login.
Features
- File management — browse, copy, move, rename, and delete with drag-and-drop and paste-to-upload support.
- Uploads & downloads — chunked uploads for large files and zip packaging for batch downloads.
- Access control — isolate users, groups, and anonymous visitors with virtual root paths and fine-grained per-path read/write permissions.
- LDAP authentication — connect to LDAP/LDAPS with just-in-time user creation and automatic group synchronization.
- Path mounting — mount any drive or subpath into a unified virtual tree.
- File preview — image gallery powered by PhotoSwipe, built-in audio/video players and PDF viewer, plus configurable external previewers.
- Archive preview — browse ZIP, 7z, and RAR files in the browser; download individual entries or pack a selection as a zip.
- Editors — text editing with CodeMirror and full code editing with Monaco Editor.
- Thumbnails — generate thumbnails for images, text, video, and audio (pluggable handlers, optional
libvips/ffmpeg). - Filename search — optional indexed filename search across mounted drives.
- WebDAV access — expose your drives over the WebDAV protocol.
- Automated jobs — run copy, move, delete, flow, and JavaScript actions on cron schedules or file events, with execution history and logs.
- File buckets — publish token-protected upload and public-read endpoints with path templates, type/size limits, caching, and hotlink protection.
- Extensible drives — add new storage backends with JavaScript, no recompilation required.
- Admin console — manage drives, users, groups, permissions, and jobs from the browser.
Supported Drives
| Drive | Notes | | --- | --- | | Local | Files on the host filesystem | | FTP | FTP server | | SFTP | SSH file transfer | | WebDAV | Any WebDAV-compatible server | | S3 | Amazon S3 and S3-compatible object storage | | OneDrive | Microsoft OneDrive | | Google Drive | Google Drive | | MEGA | Client-side encrypted cloud storage | | Dropbox | Implemented as a scripted (JavaScript) drive | | Qiniu | Qiniu Cloud, implemented as a scripted (JavaScript) drive |
See the documentation for per-drive setup details.
Quick Start
Docker
mkdir go-drive-data
docker run -d --name go-drive \
-p 8089:8089 \
-v "$(pwd)/go-drive-data:/app/data" \
devld/go-drive
go-drive-data is the data directory. Mapping it outside the container ensures your data survives application upgrades. Once running, open
The official Docker image bundles ffmpeg and libvips, and automatically enables the video/audio and high-performance image thumbnail handlers.
To customize the configuration, first extract the default config.yml from the image, then mount it back into the container:
# Extract config.yml from a throwaway container
cid=$(docker run -d devld/go-drive) && docker cp "$cid:/app/config.yml" . && docker stop "$cid" && docker rm "$cid"
Run with both the data dir and the config file mapped outside the container
docker run -d --name go-drive \
-p 8089:8089 \
-v "$(pwd)/go-drive-data:/app/data" \
-v "$(pwd)/config.yml:/app/config.yml" \
devld/go-drive
Docker Compose
services:
go-drive:
image: devld/go-drive
container_name: go-drive
ports:
- "8089:8089"
volumes:
- ./go-drive-data:/app/data
restart: unless-stopped
docker compose up -d
Prebuilt Binary
Download the archive for your platform from the Releases page, extract it, and run:
- Linux
./go-drive
- Windows
go-drive.exe.
By default go-drive reads config.yml from the working directory (if present) and listens on :8089. Useful flags:
./go-drive -c /path/to/config.yml # use a specific config file
./go-drive -show-config # print the parsed configuration
./go-drive -v # print version information
Configuration
go-drive is configured through a YAML file. A fully documented reference lives in docs/config.yml; copy it and adjust as needed. Selected options:
| Option | Default | Description |
| --- | --- | --- |
| listen | :8089 | Address the HTTP server binds to |
| data-dir | ./data | Directory for all application data (database, sessions, thumbnails, local files, etc.) |
| temp-dir | data-dir/temp | Temporary file directory |
| max-concurrent-task | 100 | Max concurrent tasks (copy, move, delete) |
| free-fs | false | Allow Local drives to use absolute paths (security risk) |
| trusted-proxies | _empty_ | Trusted proxy IPs/CIDRs for resolving the real client IP |
| api-path / web-path | _empty_ | Override API/static paths when served under a sub-path |
go-drive supports SQLite (default) and MySQL. WebDAV access, full-text search, thumbnail handlers, and reverse-proxy/sub-path deployment are all configured here too — see docs/config.yml and the documentation for the full reference.
⚠️ Settingfree-fs: truelets admin users browse the entire host filesystem through Local drives. Leave itfalseunless you understand the implications.
Building from Source
Prerequisites: the Go version pinned in go.mod, Node.js 24, and a C toolchain (SQLite requires CGO).
git clone https://github.com/devld/go-drive.git
cd go-drive
Build everything: frontend, backend, and release archive
make all
make all builds the Vue frontend (web/dist), embeds it together with the i18n assets into the Go binary, and produces a release archive under build/. For frontend-only development:
cd web
npm install
npm run dev # start the dev server
npm run lint # type-check + lint
npm run build-web # production build
Contributing
Contributions are welcome! Please:
- Fork the repository and create a feature branch.
- For backend changes, run the relevant package tests (
go test, andgo test -racefor concurrent code). - For frontend changes, run
npm run lintandnpm run build-webfromweb/. - Use Conventional Commits with a short lowercase scope (e.g.
fix(server): ...). - Open a pull request describing the motivation and behavior changes.
License
go-drive is released under the MIT License. Copyright © 2020 devld.
server/webdav is a modified copy of golang.org/x/net/webdav, including that package's internal fork of encoding/xml. It remains Copyright The Go Authors and is covered by the BSD-3-Clause license. See NOTICE.
drive/mega/internal/gomega is a modified copy of github.com/t3rm1n4l/go-mega. It remains Copyright 2019 Sarath Lakshman and is covered by the MIT License. See NOTICE.