Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We are setting up a virtual private server (not hosted by us), on which we will be user testing our Django-based web application. The user-generated content produced in these tests will be very sensitive. We would like to keep this content encrypted, for example in case back-up media goes missing. The content will be stored in a MySQL or SQLite database.

As I understand it, we cannot encrypt the file system of the VPS. If we encrypt the database, using something like SQLcipher (, is there a way of passing the key to Django without storing it on the server? We will be booting up the server for each test, so that part is not a concern.

share|improve this question

1 Answer 1

As you said you can't encrypt the filesystem of the VPS. I don't know which feature offers your VPS but you can try to create a second filesystem mounted on /var/lib/mysql (in the case of mysql Server) and encrypt it (for example using the software LUKS).

Another alternative is create a encrypted loop-device filesystem using a file of your VPS and mount it on /var/lib/mysql; here there is some references of this solution

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.