IO (In & Out) Remastered minimalist files server
lightweight, minimal dependencies, python based files server with web UI, for easy LAN files sharing.
FlaskSQLAlchemy(+alembicfor migrations)whimdb, herehtml,cssand somejsgunicorndocker
- web based UI
- accounts based authentication
- chunked files upload
- configurable user's files storage size
- grouping files into directories
- searching for files & directories
- generating zip files on the fly for downloads
- directories sharing (via link)
- user accessible read-only logs like actions, authentications etc. (cleaned after 28 days)
- support for internationalization (i18n)
- background tasks for files cleanup
- support for HTTPS
- docker based containerization
As with most of my projects, it was about learning, getting a working files server was a nice bonus.
Creating this project (with dependencies limitations in mind) required some extra work, following modules had to be created from scratch:
- csrf protection (
io_csrf) - session based authentication
- forms rendering + validation (
io_forms) - files chunk based uploader
- generating & streaming zip files on the fly
- page based data pagination
- i18n module (
io_i18n) - every icon
-
Clone this repo
-
Create
.env.dockerfile and setup its values:
cp .env.docker.template .env.docker
- Create
.env.appfile and setup its values:
cp .env.app.template .env.app
- (Optional) Enable HTTPS, generate new certificates, or provide your own
openssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365
- Run docker container.
docker compose --env-file .env.docker build --no-cache
docker compose --env-file .env.docker up -d
- Clone this repo
- Create
.env.appfile
cp .env.app.template .env.app
- Change
REDIS_SERVER_ADDRESSin.env.appto127.0.0.1 - Install development dependencies
pip3 install -r requirements/common.txt
pip3 install -r requirements/dev.txt
- Start whimdb server
whimdb-server --port 6000
- Start webserver
python3 app.py
python3 migrate.py
- Bash into container
docker container exec -it "ior-app" bash
- Run management cli
python3 run_management_cli.py
App contains some example tests for available routes. To run them:
pytest -v tests/