OpenCloud is a free, open-source, and self-hosted cloud file server and management system. OpenCloud works similarly to other cloud file providers, like iCloud, OneDrive, or Google Drive.
Clone the repository and install dependencies. Copy the .env.example
file to .env
and fill in the required values. Generate the Prisma client with pnpm exec dotenv -- "pnpm --filter server run db:generate"
. Then, run the server and webui using pnpm run start
. You can also use a command line tool like pm2 to run the server and webui in the background (with pm2 start "pnpm run start"
). The server will be available at localhost:8080
. WebUI will be available at localhost:3000
.
Clone the repository and install dependencies. Copy the .env.example
file to .env
and fill in the required values. Generate the Prisma client with pnpm exec dotenv -- "pnpm --filter server run db:generate"
. Then, run the server using pnpm run start --filter server
. You can also use a command line tool like pm2 to run the server in the background (with pm2 start "pnpm run start --filter server"
). The server will be available at localhost:8080
.
There are two options: Automatic hosting using Vercel or local self-hosting.
Fork the repository and create a new project on Vercel. Connect the project to your forked repository. Copy the .env.example
file into the deployment configuration panel and fill in the required values. Then, deploy the project. The web client will be available at the domain you select in the Vercel control panel. Ensure that the domain you use is listed in the OPENCLOUD_WEBUI_URL
environment variable in the server configuration for CORS to work correctly on the server.
Clone the repository and install dependencies. Copy the .env.example
file to .env
and fill in the required values. Then, run WebUI using pnpm run start --filter webui
. You can also use a command line tool like pm2 to run WebUI in the background (with pm2 start "pnpm run start --filter webui"
). WebUI will be available at 127.0.0.1:3000
(or localhost:3000
).
The backend server is built using TypeScript, Fastify, Prisma, argon2, and Zod.
The web client (WebUI) is built using TypeScript, Next.js, React, Tailwind, Zod, Framer Motion, and shadcn/ui.
OpenCloud clients communicate with the backend server using the OpenCloud Server REST API.
OpenCloud uses a token-based authentication system. On login, this server return an access-token and refresh-token. The access-token only provides access to protected resources for 15 minutes. Just prior to access-token expiration, the client will preemptively fetch a new token using the refresh-token, which has a 1 week lifespan. To protect the account in the event of a compromised refresh-token, this system implements refresh-token rotation and automatic refresh-token reuse detection. This mechanism is outlined in this blog post by the team at Auth0.
OpenCloud is developed and maintained by Controllyx. OpenCloud is distributed under the AGPL v3.0 license.