Self Hosted Google drive alternative
PERSONAL DRIVE
A self-hosted alternative to Google Drive and Dropbox.
See the full changelog.
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
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.
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.
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. OR TRUSTED_PROXIES=some.ip,ano.ther.ip TRUSTED_HEADERS in .envYour 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:
database/db/database.sqlite file -> This will remove all 'shares'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.
Tests cover various scenarios and branches. Live coverage:
./check.sh runs everything locally - phpcs (PSR-12), phpstan, Pest, eslint, JS tests, and an install smoke test.
CI: The pre-push hook in .githooks/pre-push runs it before every push; bypass once with git push --no-verify.
tests/install/smoke.sh proves a fresh install still produces a working app. Needs Docker.
…The regular-install mode is part of check.sh. Docker mode is manual - it rebuilds the image and takes a few minutes.
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
./database folder | ./database/db/database.sqlite file./bootstrap/cache ./storagephp.ini; php.ini
upload_max_filesize = 1G
post_max_size = 1G
max_file_uploads = 10000These are just thoughts. Can't make any promises.
Features we looked into but appear unfeasible. Not on the roadmap for now.
List View
Tile View
No open issues yet, or sync has not completed.