停止为 Dropbox/Google Drive 付费,使用你自己的 S3 存储桶。
Show HN: Stop paying for Dropbox/Google Drive, use your own S3 bucket instead

原始链接: https://locker.dev

## Locker:你的自托管云存储 Locker 是 Dropbox 和 Google Drive 等服务的免费开源替代方案,它允许你自托管数据,从而完全掌控你的数据。你可以选择你的存储方式——本地磁盘、AWS S3、Cloudflare R2 或 Vercel Blob——只需通过简单的环境变量切换即可,避免厂商锁定和不可预测的成本。 Locker 专为高级用户设计,提供全面的文件管理工具,包括虚拟 bash shell(使用熟悉的 `ls` 和 `cat` 等命令)、强大的图片和 PDF *内部*搜索,以及具有基于角色的访问权限的协作工作区。 主要功能包括:密码保护和过期日期的安全共享、用于轻松收集文件的上传链接,以及用于集成的类型安全 API。Locker 优先考虑安全性,提供电子邮件/密码和 Google OAuth 身份验证。它使用 Next.js、PostgreSQL 和 tRPC 构建,并且可以轻松部署在任何 Node.js 平台上。

## Locker:一个自托管的Dropbox替代方案 一个新的开源项目,**Locker**,旨在利用您自己的S3兼容对象存储(如AWS S3、R2甚至本地存储)来提供一个Dropbox/Google Drive的替代方案。Locker是在一次“技术挑战”后开发的,它提供了一个虚拟文件系统并支持QMD搜索。 虽然它因其灵活性而受到称赞,但评论员指出,像Dropbox这样的服务的关键价值不仅仅是存储,而是通过专用应用程序在设备之间无缝同步。人们对商业blob存储的成本与Google One等捆绑服务相比表示担忧,并提出了Nextcloud、Syncthing、MinIO和Proton Drive等替代方案。 讨论还涉及端到端加密、离线访问等功能,以及项目仓库中清晰的许可证文件的重要性。另一个项目,ZeroFS,也被提及,它是一个类似的单二进制解决方案。
相关文章

原文
Skip to main content
Open Source

Your files, Your cloud,

Your rules.

The self-hostable alternative to Dropbox and Google Drive. Upload, organize, and share files from your own infrastructure.

Bring your own storage — local disk, S3, R2, or Vercel Blob. One env var to switch. Full type-safe API with tRPC.

Built for power users

Everything you need to manage files

Locker gives you the full toolkit for file management, sharing, and collaboration—all self-hosted on your own terms.

Storage Provider Agnostic

Swap between local filesystem, AWS S3, Cloudflare R2, or Vercel Blob with a single environment variable. Your data, your infrastructure.

Search Inside Images & PDFs

Find files by what's in them, not just the name. Locker transcribes images and PDFs into searchable text so every document is discoverable.

Virtual Bash Shell

Navigate your files with familiar commands. Use ls, cd, find, cat, and grep through a virtual filesystem API.

Workspace Teams

Invite team members with role-based access. Organize files across workspaces with granular permissions.

Secure by Default

Email/password and Google OAuth authentication. Sessions managed server-side with encrypted cookies.

API Keys

Programmatic access to your files through API keys. Build integrations and automate workflows with full tRPC type safety.

Why self-host?

Full control over your data

No vendor lock-in, no surprise pricing, no third party reading your files. Deploy on your own servers and keep everything under your roof.

We moved 4TB of team files off Google Drive in a weekend. Same S3 bucket we already had, fraction of the cost. 
Engineering Lead, 50-person startup
Self-hosting on AWS with S3 storage
100%
Open source
4
Storage providers
Type-safe
End-to-end with tRPC
0
Vendor lock-in

Bring your own backend

One env var. Any storage provider.

Set BLOB_STORAGE_PROVIDER in your .env and you're done. Switch providers anytime without touching a line of code.

Local Filesystem

Store files directly on your server. Zero config, zero cost.

AWS S3

AWS S3

The industry standard. Reliable, scalable, globally distributed.

Cloudflare R2

Cloudflare R2

S3-compatible with zero egress fees. Great for bandwidth-heavy workloads.

Vercel Blob

Vercel Blob

Serverless-native storage. One token, no infrastructure to manage.

Frequently Asked Questions

Locker is an open-source, self-hostable file storage platform. Think of it as your own Dropbox or Google Drive that you control completely—deploy it on your own servers, use your own storage backend, and own your data.

Locker supports local filesystem, AWS S3, Cloudflare R2, and Vercel Blob out of the box. You can switch between them by changing a single environment variable. No code changes required.

Yes. Locker is free and open source. You can use it for personal projects, your team, or your entire organization at no cost. You only pay for the infrastructure you choose to host it on.

You can generate shareable links for any file or folder. Each link can optionally have password protection, an expiration date, and a maximum number of downloads. Recipients don’t need an account to access shared files.

Yes. Upload links let anyone send files to your storage without creating an account. Great for collecting documents from clients, students, or collaborators.

Next.js 16 with App Router, PostgreSQL with Drizzle ORM, tRPC for type-safe APIs, BetterAuth for authentication, and Tailwind CSS for the UI. The project uses a Turborepo monorepo with pnpm workspaces.

Clone the repo, run pnpm install, start a PostgreSQL database, configure your .env file, run migrations, and start the server. The defaults work out of the box for local development. For production, deploy to any Node.js-compatible platform.

Ready to own your files?

Deploy Locker in minutes and take back control of your file storage. Free forever, open source, no strings attached.

联系我们 contact @ memedata.com