Finally, run your own S3 storage on any $5/month shared hosting!
Quick Start β’ Features β’ Screenshots β’ API Docs β’ License
Ever wanted Amazon S3-like storage but don't want to pay AWS prices? Or maybe you're stuck on shared hosting (cPanel) and can't run MinIO or other S3 alternatives?
Lite-S3 is a pure PHP implementation of S3-compatible object storage. It works on any hosting that supports PHP and MySQL β yes, even that cheap shared hosting you're already paying for!
| Feature | Description |
|---|---|
| π S3 Compatible | Works with AWS SDK, rclone, boto3, s3cmd |
| π₯ Multi-User | Each user gets their own credentials |
| π Permissions | Read / Write / Admin per bucket |
| π Big Files | Upload files up to 5GB with multipart |
| πΉ Range Requests | Video seeking and partial downloads |
| π‘οΈ Rate Limiting | Configurable request limits per IP |
| π Security Scan | Blocks malicious file uploads |
| π¨ Admin Panel | Beautiful web UI to manage everything |
| πΎ Easy Backups | Plain files + MySQL = simple backups |
| π Shared Hosting | Works on cPanel, DirectAdmin, Plesk |
| π·οΈ Tagging | Object & bucket tagging support |
| π Lifecycle | Bucket lifecycle rules & policies |
| π CORS | Full CORS configuration per bucket |
| π¦ Batch Ops | DeleteObjects batch delete API |
git clone https://github.com/nityam2007/lite-s3.git
cd lite-s3
docker-compose up -dThat's it! Everything auto-configures:
- β MySQL database created and initialized
- β Admin user created (admin/admin123)
- β Health check ready
URLs:
- API: http://localhost:8080/
- Admin Panel: http://localhost:8080/admin/
- Health Check: http://localhost:8080/health.php
Test it:
# List buckets
curl -u admin:admin123 http://localhost:8080/
# Create bucket
curl -X PUT -u admin:admin123 http://localhost:8080/my-bucket
# Upload file
curl -X PUT -u admin:admin123 -d "Hello World" http://localhost:8080/my-bucket/hello.txt
# Download file
curl -u admin:admin123 http://localhost:8080/my-bucket/hello.txtgit clone https://github.com/nityam2007/lite-s3.git
cd lite-s3
./setup.shThe setup script will:
- Check PHP and extensions
- Ask for database credentials
- Create database and import schema
- Generate
config.php - Set permissions
Then point your web server to the WWW/ folder.
- Download this repo and upload
WWW/contents to yourpublic_html - Create MySQL Database in cPanel β MySQL Databases
- Run Installer at
https://yourdomain.com/install.php - Delete
install.phpafter setup - Login with
admin/admin123and change password!
- Copy
config.sample.phptoconfig.php - Edit
config.phpwith your database credentials - Import
schema.sqlinto your MySQL database - Ensure these directories are writable:
storage/,logs/,uploads/ - Visit
/admin/to login
Lite-S3 supports multiple authentication methods:
| Method | Format | Best For |
|---|---|---|
| Basic Auth | -u access_key:secret_key |
Testing, simple scripts |
| AWS Signature V4 | AWS4-HMAC-SHA256 |
Production, AWS SDKs |
| AWS Signature V2 | AWS access_key:signature |
Legacy tools |
| Presigned URLs | ?X-Amz-Signature=... |
Shareable links |
# Using Basic Auth (simplest)
curl -X PUT -u your_access_key:your_secret_key \
-T ./myfile.txt \
https://yourdomain.com/my-bucket/myfile.txt
# Using AWS signature
curl -X PUT \
-H "Authorization: AWS your_access_key:your_secret_key" \
-T ./myfile.txt \
https://yourdomain.com/my-bucket/myfile.txtcurl -H "Authorization: AWS your_access_key:your_secret_key" \
https://yourdomain.com/my-bucket/myfile.txt -o myfile.txtimport boto3
s3 = boto3.client('s3',
endpoint_url='https://yourdomain.com',
aws_access_key_id='your_access_key',
aws_secret_access_key='your_secret_key'
)
# Upload
s3.upload_file('local.txt', 'my-bucket', 'remote.txt')
# Download
s3.download_file('my-bucket', 'remote.txt', 'local.txt')[mycloud]
type = s3
provider = Other
endpoint = https://yourdomain.com
access_key_id = your_access_key
secret_access_key = your_secret_keyLite-S3 implements core S3 features but is not 100% compatible with the full AWS S3 spec.
| Feature | Status | Notes |
|---|---|---|
| List Buckets | β Complete | |
| Create/Delete Bucket | β Complete | |
| Put/Get/Delete Object | β Complete | |
| List Objects (v1 & v2) | β Complete | |
| Head Object | β Complete | |
| CopyObject | β Complete | Server-side copy |
| Range Requests | β Complete | Byte-range downloads |
| Presigned URLs | β Complete | |
| AWS Signature V4 | β Complete | |
| AWS Signature V2 | β Complete | |
| Basic Auth | β Complete | |
| Multipart Uploads | β Complete | Full support |
| Rate Limiting | β Complete | Configurable limits |
| Security Scanning | β Complete | Blocks dangerous files |
| DeleteObjects (Batch) | β Complete | Delete multiple objects in one request |
| Object Tagging | β Complete | GET/PUT/DELETE object tags |
| Bucket Tagging | β Complete | GET/PUT/DELETE bucket tags |
| Bucket CORS | β Complete | Full CORS configuration |
| Bucket Lifecycle | β Complete | Expiration & transition rules |
| Bucket Versioning | β Complete | Enable/disable versioning |
| Bucket Policies | β Complete | JSON IAM-style policies |
| Object Metadata | β Complete | x-amz-meta-* headers |
| Object ACLs | β Missing | Bucket-level only |
- PHP 8.0+
- MySQL 5.7+ or MariaDB 10+
mod_rewriteenabled (Apache) or equivalent (nginx).htaccesssupport or nginx config
PHP Extensions (auto-detected):
pdo,pdo_mysql- Databasejson- API responseshash- Authenticationmbstring- String handling
Most shared hosting plans already have all of this! π
- Delete
install.phpafter setup - Change default password immediately (
adminβ something secure) - Use HTTPS in production (required for AWS SDK signature verification)
- Regular backups of both database and
storage/folder - Set proper permissions -
storage/,logs/,uploads/should be writable by web server - Keep
config.phpsecure - never commit to public repos
Health check endpoint for load balancers and monitoring:
curl http://localhost:8080/health.phpReturns JSON with status of database, storage, and extensions.
- Author: Nityam Sheth
- GitHub: @nityam2007
- Issues: Report bugs
This project is licensed under GNU GPLv3 with attribution requirements.
You can:
- β Use commercially
- β Modify and distribute
- β Use for any purpose
You must:
- π Keep attribution/credits visible
- π Release modifications under GPLv3
- π Link back to original project
See LICENSE for details.
Made with β€οΈ by Nityam Sheth
If this helped you, give it a β!


