hush_music is a lightweight, self-hostable file sharing web application built with Python and Flask. It provides a simple interface for uploading, downloading, and managing files and folders, with a focus on privacy and ease of use.
The application features two access levels (view-only and editor), both protected by separate passwords. A key feature is the ability to generate temporary sharing links that automatically expire after 48 hours, ensuring that your shared files don't remain accessible forever.
- File & Folder Management: Upload, download, and delete files and entire folders.
- Dual Access Levels:
- Editor Mode: Full permissions to upload, delete, and manage content.
- View-Only Mode: Can only view and download files.
- Password Protection: Secure access for both editor and viewer roles.
- Temporary Sharing Links: Generate links to files that automatically expire after 48 hours.
- Simple Web Interface: Clean and intuitive UI for easy file navigation.
- Self-Contained: No database required — everything runs on the filesystem.
- Backend: Python 3, Flask
- Security: Environment variables, secure session handling
- Testing: pytest
- Templates: Jinja2
- Deployment: WSGI-ready (via
wsgi.py)
Follow these instructions to get a local copy up and running for development and testing purposes.
- Python 3.x
- pip
-
Clone the repository:
git clone https://github.com/lelabdev/hush_music.git cd hush_music -
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activateOn Windows:
.venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
Create a
.envfile in the root directory:SECRET_KEY=your_strong_secret_key_here VIEW_PASSWORD=your_view_password EDIT_PASSWORD=your_edit_password
🔐 Use a strong
SECRET_KEY(e.g., generated withopenssl rand -hex 32). Never commit this file.For reference, copy the example:
cp .env.example .env
(If
.env.exampledoesn't exist yet, create it from your.envtemplate.)
Start the development server:
python app.pyThe application will be available at http://127.0.0.1:5000.
⚠️ Use only for development. For production, use a WSGI server (e.g., Gunicorn + Nginx).
Ensure the codebase behaves as expected:
pytestYou can also run with coverage:
pytest --cov=./
├── app.py # Flask application factory
├── config.py # Loads and validates environment variables
├── requirements.txt # Python dependencies
├── test_app.py # Pytest suite
├── wsgi.py # WSGI entry point for production
├── routes/
│ └── main.py # Core routes and business logic
├── templates/ # HTML templates (Jinja2)
├── uploads/ # Stored files (add to .gitignore)
├── .env.example # Environment template (safe to commit)
└── .gitignore # Includes .env, .venv, uploads/, __pycache__/
Contributions are welcome! If you have a suggestion, bug report, or feature idea:
- Open an issue to discuss.
- Fork the repo, create a feature branch, and submit a pull request.
Please keep changes focused and include tests when possible.
This project is open source and available under the MIT License.