Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the location of the database #24

Open
frankenstein91 opened this issue Apr 12, 2020 · 1 comment
Open

Change the location of the database #24

frankenstein91 opened this issue Apr 12, 2020 · 1 comment

Comments

@frankenstein91
Copy link

With this ticket I want to start a discussion about the location of the database. Currently the database is stored in the file system of the server, this could lead to legal problems in some countries. The operator of the software could be forced to hand over the database file to state authorities. Sqlite, however, offers the possibility to work in RAM. Here it would only be necessary to leave the path empty, at least that is how I understand it.

I found the path here:
https://github.com/Tethik/burn-after-reading/blob/master/burn/api.py#L16

@Tethik
Copy link
Owner

Tethik commented Apr 13, 2020

You can control the location of the sqlite database as well as the location of the files using the BURN_DATA_PATH environment variable. Per default this location is set to /dev/shm/burn. /dev/shm is typically a tmpfs filesystem mounted in RAM for many linux distributions. So the database is actually already stored in memory.

However, technically /dev/shm is not guaranteed to exist, so for future improvement it might be worth looking into what the sqlite driver supports.

Though you should be aware that even if you store the data in RAM, it's still pretty likely that a state authority could extract that information. Most likely the server you run the application on is virtualized and can fairly easily have its entire memory dumped from the hypervisor. There's also a clear availability issue with saving in memory, which may not be worth the tradeoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants