Privfiles – Encrypted file storage using Fernet with zero Javascript

Source code for the onion service: l3n6v6dm63frml22tlmzacnasvp7co7wylu4hhcs34ukxe7q56yb4tyd.onion

Previews

home page
api page

Setup

Git clone

git clone https://github.com/privfiles/privfiles

Install Mongodb

community edition

Install python requirements

pip3 install -r requirements.txt

Nginx

server {
	listen 127.0.0.1:8080;
	client_max_body_size 4G;

	chunked_transfer_encoding on;

	location ~ /admin {
		auth_basic "privfiles admin";
		auth_basic_user_file /etc/apache2/.htpasswd;

		proxy_redirect off;
		proxy_buffering off;
		proxy_pass http://uvicorn;
	}

	location / {
		proxy_redirect off;
		proxy_buffering off;
		proxy_pass http://uvicorn;
	}
}

upstream uvicorn {
	server unix:/tmp/uvicorn.sock;
}

Adding fonts for recaptcha

Add .ttf fonts to privfiles/fonts for recaptcha generation

Configure

run.py

import uvicorn

from privfiles import PrivFiles
from privfiles.settings import B2Settings


app = PrivFiles(
    backblaze_settings=B2Settings(
        key_id="...",
        application_key="...",
        bucket_id="..."
    )
)


if __name__ == "__main__":
    uvicorn.run(
        app,
        uds="/tmp/uvicorn.sock",
        log_level="error"
    )

Running

Use something like pm2 to run run.py & api_task.py in the background.

Thanks to

GitHub

View Github