Quick start
SSH into your server and run one command. It installs Docker if needed, generates secrets, and starts yourdrive. Nothing to clone or configure by hand.
curl -fsSL https://yourdriveapp.com/install.sh | sudo bashThe script asks how people will reach yourdrive (a domain with automatic HTTPS, a domain behind your own proxy, or the server's IP), then where files should live. With bundled storage, the connection details are printed at the end of the install. When it finishes, open the printed URL and register your account. The first registered user automatically becomes admin and is guided through the setup wizard to connect storage.
HTTPS
With a domain that points at the server, choose automatic HTTPS and the installer runs Traefik with a Let's Encrypt certificate: the site is served on https, and http redirects. With an IP, or if you prefer your own proxy (Caddy, nginx, Cloudflare Tunnel), it serves plain HTTP on a port for your proxy to front.
Where files live
Choose your own bucket (S3, R2, Wasabi, Azure, MinIO) and connect it in the setup wizard, or choose this server's disk and the installer bundles storage next to the app: the wizard then offers "Bundled storage" with every field filled in, and files live in a Docker volume on the server.
With automatic HTTPS and bundled storage together, media is served at storage.<your domain>: add a DNS record pointing it at the same server. Without HTTPS, bundled storage serves media on port 9000.
Updates
In the app, Settings → Software updates → Update now pulls the newest images and restarts the server. An updater container alongside the app does this work; it holds the Docker socket so it can restart the stack, and the app containers never do. Re-running the install command updates too.
Easypanel
Already run Easypanel? Deploy yourdrive from its template list: the frontend, backend, database and (optionally) storage are set up together in a new project.
In Easypanel, pick a project, open Templates, search for yourdrive and deploy. Leave Bundled S3 Storage on to keep files on the same server, or turn it off to connect AWS S3, Cloudflare R2, Wasabi or Azure Blob in the setup wizard. Then open the app's domain and register: the first account becomes the admin. With bundled storage, choose "Bundled storage" in the wizard; every field is already filled in.
To update, back up the database, set the same new version tag on the frontend and backend images, and deploy. Database changes apply on start.
Requirements
You don't need Node.js, npm, or Docker pre-installed. The install script handles all of it.
Storage setup
Storage credentials are configured through the admin UI, with no environment variables to edit. After registering as admin, open Storage settings in the sidebar.
AWS S3
Self-hosted S3 (MinIO and friends)
Point the wizard at your server's S3 endpoint and turn on path-style URLs:
Endpoint: http://minio:9000 (the address the server uses)
Public URL: https://minio.example.com (the address browsers use)
Bucket: yourdrive
Path-style URLs: onCloudflare R2
https://<account-id>.r2.cloudflarestorage.comEnvironment variables
The install script generates and sets these for you. Listed here for reference, or if you're customizing a manual deploy.
| Variable | Required | Description |
|---|---|---|
| DATABASE_URL | Yes | PostgreSQL connection string |
| JWT_SECRET | Yes | Min 32 chars. Signs all JWT auth tokens. |
| ENCRYPTION_KEY | Yes | Min 32 chars. AES-256 key for storage credentials. |
| PORT | No | Backend port (default: 3001) |
| CORS_ORIGIN | No | Allowed frontend origin (default: localhost:5173) |
| SIGNED_URL_EXPIRES | No | Signed URL TTL in seconds (default: 3600) |
| MAX_FILE_SIZE | No | Largest single upload in bytes (default: 10 GB) |
| TRASH_RETENTION_DAYS | No | Days before Trash is emptied automatically (default: 30) |
| TRUST_PROXY_HOPS | No | Reverse proxies in front of the backend (default: 1, the bundled nginx). Use 2 behind Caddy or Traefik. |
ENCRYPTION_KEY must remain stable. Changing it will make existing storage configurations in the database unreadable.Server install reference
Covered in Quick start above. This section covers what the install script does under the hood, and how to customize it.
Under /opt/yourdrive (or wherever YOURDRIVE_DIR points), the script generates strong secrets, writes a production docker-compose.yml that pulls the published images, and starts the stack: no source checkout, no manual .env editing.
It's safe to re-run: it reuses the existing install and just pulls the latest images. Useful overrides, set as env vars before the pipe:
YOURDRIVE_DIR=/opt/yourdrive # install directory
YOURDRIVE_DOMAIN=drive.example.com # skip the prompt
YOURDRIVE_TLS=auto # auto (Traefik + Let's Encrypt) or none
YOURDRIVE_ACME_EMAIL=you@example.com # certificate notices (auto mode)
YOURDRIVE_STORAGE=cloud # cloud (your bucket) or disk (bundled)
YOURDRIVE_TAG=latest # image version to deploy
YOURDRIVE_PORT=8080 # port to serve on without TLS (default 80)If port 80 is already in use, for example by Coolify, Traefik or another web server, the installer leaves it alone and serves yourdrive on a free port from 8080 up instead, then shows you the address. It only reports success once yourdrive answers; if it doesn't, it shows the logs and what to fix.
Without automatic HTTPS, put a reverse proxy (Caddy, nginx, Cloudflare Tunnel) in front of yourdrive's port to terminate TLS before handling real user data.
Sharing
Open the menu on any file or folder (or the share button in the photo viewer) and choose Share. Anyone with the link can open it, no account needed. Turn downloads off to let people view without saving, and turn a link off at any time. Links stop working when the file moves to Trash.
With Team you can also add a password or an expiry date, and create upload requests: a link that lets clients send files into one of your folders without seeing what's already there.
Single sign-on (OIDC)
People can sign in with your own OpenID Connect provider: Authentik, Authelia, Keycloak, Google, Microsoft Entra or any other. It's included in every plan, Community too. Password sign-in keeps working alongside it.
1. In yourdrive, open Settings → Single sign-on and copy the Redirect URL (https://your-domain/api/v1/auth/oidc/callback).
2. In your provider, create an OpenID Connect application (a "confidential" client) with that redirect URL and the scopes openid email profile. Copy its issuer URL, client ID and client secret.
3. Paste them into yourdrive, choose the button text ("Sign in with …"), and save. yourdrive checks the issuer before saving.
Someone signing in for the first time is matched to their existing account by email, but only when the provider confirms the email is verified. For people without an account, choose what happens: Only people with an account (the default; add them on the Users page), Ask me first (they wait under Waiting for approval on the Users page, admins get an email, and you approve or decline each one), or Let them in right away. New accounts count toward your plan's user limit; once it's reached, new sign-ins are refused with a clear message. Declined people can't ask again; add them by hand if you change your mind. Sign-in uses PKCE, a nonce and a signed ID token, and the session never appears in a URL.
To decide who can sign in, list your Allowed email domains (for example example.com). Only people whose verified email is at one of them get in, checked on every sign-in, so removing a domain takes effect at once. Leave it empty to allow anyone your provider lets in. With a public provider such as Google, where anyone can have an account, set it or choose Ask me first.
Two-step sign-in
Anyone can turn on two-step sign-in under Account settings: scan the QR code with an authenticator app (1Password, Bitwarden, Google Authenticator, Aegis or any other TOTP app) and enter a code to confirm. From then on, signing in with a password also asks for the 6-digit code. It's in every plan.
Turning it on shows 10 recovery codes, once. Each signs in a single time if the phone is lost; save them in a password manager. Someone who loses both can ask an admin, who turns two-step sign-in off for them on the Users page so they can sign in with their password and set it up again. Single sign-on skips this step, since your provider runs its own checks.
Finder, Explorer and Files (WebDAV)
yourdrive speaks WebDAV, so the file apps people already have can open it: Finder on a Mac, File Explorer on Windows, the Files app on iPhone and iPad, and rclone for scripts and backups. It's in every plan. The address is your yourdrive address followed by /dav/, for example https://drive.example.com/dav/.
Devices sign in with an app password, never the account password. Make one per device under Account settings → Desktop and phone access; it's shown once. Delete it there to sign that device out. Changing your password deletes every app password. People who sign in with single sign-on use app passwords too.
Connect
- Mac: in Finder, choose Go → Connect to Server, enter the address, then your username and app password.
- Windows: in File Explorer, right-click This PC → Map network drive → enter the address. Windows only signs in over HTTPS.
- iPhone and iPad: in Files, tap ••• → Connect to Server.
- rclone: add a WebDAV remote with vendor
other:
rclone config create yourdrive webdav \
url=https://drive.example.com/dav/ vendor=other \
user='<your username>' pass='<app password>'
rclone sync ~/Pictures "yourdrive:My Drive/Pictures"You see two folders: My Drive and Shared with me. Everything follows the same rules as the web app: viewers of a shared folder can open files but not change them, what editors add belongs to the folder's owner, storage limits apply, and deleting moves things to Trash. yourdrive lets two files share a name in one folder; over WebDAV the newer ones show as name (2).ext. The hidden files desktops write (.DS_Store, ._ files, Thumbs.db, Office lock files) are kept in memory for an hour instead of in your drive.
Behind your own reverse proxy, pass /dav through to yourdrive with request bodies unbuffered and no size limit, like /api. The bundled nginx already does.
Add a Team license
Community is free for personal use with up to 3 users. To unlock Team features, open Settings → License as an admin and paste your key (it starts with YD1.). It takes effect immediately, with no restart.
The key is checked on your server, offline. yourdrive never phones home to validate it. Team is a yearly subscription: each renewal comes with a new key. If you don't renew, the server goes back to Community when the year ends, and nothing is deleted.
API Reference
All API routes are prefixed with /api/v1 and require a Authorization: Bearer <token> header unless noted.
Authentication
| POST | /auth/register | Register a new user. First user becomes admin. |
| POST | /auth/login | Returns { token, user } on success. |
| GET | /auth/me | Returns the currently authenticated user. |
Files
| POST | /files/upload?folderId= | Multipart file upload. Streams directly to storage; optional destination folder. |
| GET | /files?q=&type=&favorite=&page=&limit= | List/search files. type accepts all, media, image, or video. |
| GET | /files/stats | Library stats: counts by type + total bytes. |
| GET | /files/trash | List soft-deleted files. |
| POST | /files/bulk | Bulk operation: { action, fileIds, folderId? }. action includes move. |
| GET | /files/:id/content | Stream file content through backend. |
| GET | /files/:id/thumbnail | Grid thumbnail (JPEG) for a photo or video, built on demand. |
| GET | /files/:id/url | Get signed URL for direct download. |
| PATCH | /files/:id/favorite | Toggle star status. |
| POST | /files/:id/restore | Restore file from trash. |
| DELETE | /files/:id | Soft delete (moves to trash). |
| DELETE | /files/:id/permanent | Permanently delete from storage + DB. |
Folders
| GET | /folders/browse?folderId= | Returns { breadcrumb, folders, files } for a folder (root if omitted). |
| GET | /folders | Flat list of all folders, used by the move picker. |
| POST | /folders | Create a folder: { name, parentId? }. |
| PATCH | /folders/:id | Rename or move a folder: { name?, parentId? }. |
| DELETE | /folders/:id | Delete a folder. Its files move to Trash; child folders cascade. |
Admin (admin role required)
| GET | /admin/storage/status | Returns { configured, provider, providerLabel }. providerLabel is auto-detected (e.g. "Cloudflare R2"). |
| GET | /admin/storage | Returns current config (credentials masked). |
| POST | /admin/storage | Save storage configuration. |
| POST | /admin/storage/test | Test connection without saving. |
| DELETE | /admin/storage | Remove storage configuration. |
| GET | /users | List all user accounts with file counts. |
| POST | /users | Create a new user account. |
| PATCH | /users/:id | Change a user's role (USER or ADMIN). |
| DELETE | /users/:id | Delete a user and their files/folders. |
Getting help
Stuck on an install, a proxy or a storage provider? Ask in the yourdrive Discord, where other self-hosters and the team answer. For anything private (billing, licenses, security reports), email support@yourdriveapp.com.