A self-hosted alternative to Google Drive and Dropbox.
- Why Personal Drive?
- Demo
- Features
- Requirements
- Installation
- Configuration
- Forgot Password
- Development
- Troubleshooting
- Todo
- Screenshots
- π‘οΈ Keep your data with yourself.
- π° Affordable hosting options:
- buyvm.net ( + their block storage )
- hostbrr.com
- host-c.com
- novacloud-hosting.com (contact them)
π Live Demo
- Share files:
- Password protection
- Set expiration
- Set custom URL
- A sharing control panel to pause and delete existing shares
- Media player and slideshow:
- Play and view images, videos and audios
- Preview text and PDF files
- Keyboard shortcuts available during slideshow: Left, Right, Escape
- Audiobook support, by adding rewind and save position
- Files are indexed
- Dynamically generated thumbnails
- Upload multiple files or entire folders recursively
- Select one or all files in a folder
- Download, delete, share selected files
- Two layouts: list view and tile view
- Sort based on size, type, or name
- Fast sort, even for thousands of files
- Breadcrumb navigation
- Rename functionality
- Drag and drop to upload files and folders
- Duplicate detection and overwriting/abort option
- Edit text files
- Create new files
- Markdown supported
- Move files
- Config option to disable authentication
- Config options to run behind a http proxy (reverse proxy)
- Two Factor Authentication powered by TOTP protocol. Ex: Google Authentication
- π₯οΈ A server running PHP with SQLite, PHP Composer, Node.js, npm.
- π Sudo access for setting permissions.
- π€ Webserver username (if not www-data)
- π Files for upload
- π₯ Friends to share files with (Optional)
Personal Drive is hosted on Docker Hub. Please read the following carefully, as the below config will need changes for your setup.
Make a new directory, cd into it, then create a new file docker-compose.yml.
mkdir personaldrive ; cd personaldrive ; touch docker-compose.ymlBelow is docker-compose.yml. Modify it in the following way:
/absolute/path/to/store/data/on/host- Change to the location where you intend to save your data. Make sure the directory is writable. In my case, I had to give 777 permissions.
services:
personal-drive:
image: docker.io/personaldrive/personaldrive
container_name: personal-drive
restart: unless-stopped
ports:
- "127.0.0.1:8080:80"
volumes:
- /absolute/path/to/store/data/on/host:/var/www/html/personal-drive-storage-folder
- personal-drive-data:/var/www/html/personal-drive/database/db
environment:
DISABLE_HTTPS: true
volumes:
personal-drive-data:Run docker compose up
Open http://localhost:8080
- https://sub.yoursite.com - set your real site.
services:
personal-drive:
image: docker.io/personaldrive/personaldrive
container_name: personal-drive
restart: unless-stopped
ports:
- "8080:80"
volumes:
- /absolute/path/to/store/data/on/host:/var/www/html/personal-drive-storage-folder
- personal-drive-data:/var/www/html/personal-drive/database/db
environment:
APP_URL: https://sub.yoursite.com
volumes:
personal-drive-data:
Run docker compose up
Next, we need a web server to point to this container. Config depends on the web server.
- For Caddy, it's simple if we use reverse_proxy. It handles HTTPS automagically. Highly recommended for personal sites!
sub.yoursite.com {
reverse_proxy localhost:8080
} The app will also be available on http://localhost:8080
Clone the repo and run the guided setup script.
git clone https://github.com/gyaaniguy/personal-drive.git
cd personal-drive
chmod +x setup.sh
./setup.shEnsure PHP and the web server allow large uploads.
It is vital that the storage, bootstrap/cache, and database folders are writable for the web server. The setup script attempts to set these permissions.
- βοΈ The storage folder can be changed from 'Settings'
- π Increasing upload limits is crucial and depends on your web server app - Apache, Nginx, Caddy. Detailed instructions are present on the 'Settings' page after app installation.
- π§ Increasing PHP and PHP-FPM (if used) memory limits is also crucial.
- π The following folders require write permissions:
storage
bootstrap/cache
databaseThe setup script adjusts permissions and ownership if provided with root access.
To run behind a Http proxy, configure to allow trusted headers and specify the ips to trust. This typically refers to the headers sent by your proxy server and the ip on which it is running.
TRUSTED_PROXIES=*- to trust all ips. add to .env file in root of the directory. ORTRUSTED_PROXIES=some.ip,ano.ther.ip- Optionally adjust headers to trust via
TRUSTED_HEADERSin .env
Your application will be accessible by anyone without any credentials !!! BE CAREFUL WITH THIS !!!
After setup, add DISABLE_AUTH=true to .env to disable login.
Only use this option if you know what you are doing 'create account' on setup will still be required
The admin password cannot be changed. This is done to reduce the attack surface. If you forget your password:
- Reinstall the app OR delete the
database/db/database.sqlitefile -> This will remove all 'shares' - Manually edit the password in the above database file
Built with Laravel 11 and React. Inertia.js connects React components to the Laravel backend. Uses SQLite as the database. PHP code follows PSR-12 standard.
90% coverage has been achieved. This includes testing for various scenarios and branches.
For local development, you may want to disable HTTPS. Change these in .env:
DISABLE_HTTPS=true
APP_ENV=developmentThen run:
php artisan cache:clear ; php artisan config:clear ; To build frontend components, run npm run build ; npm run dev
β οΈ Permissions are important! I have improved error handling, so the app informs the user. But if you are getting unexpected errors, please ensure important directories have write permissions.- Data storage folder -> as set in settings.
./databasefolder |./database/db/database.sqlitefile./bootstrap/cache./storage
- π οΈ Large uploads failing: PHP upload limits are annoyingly low.
- Edit
php.ini
- Edit
; php.ini
upload_max_filesize = 1G
post_max_size = 1G
max_file_uploads = 10000- Nginx/Apache can also have their own limits. Caddy just works.
These are just thoughts. Can't make any promises.
- Feature: Encryption. Vital, so the host can't read our files
- Feature: Improve search. Maybe in-content search, folder-specific. Maybe a special 'Notes' mode
- Feature: Collaboration. Perhaps a checkbox that allows guests to upload?
- Feature: More previewable files - doc, docx, ppt. Unsure if this will be feasible.



