biblioteka (library in Polish) is a web storage application designed for users to self-host on their own machines/servers
biblioteka is simple and lightweight, with a plain low-noise UI. Feel free to add your own custom styling to /client/style.css if you prefer a different look
Features include multiple users, persistent sessions using JWT authentication, basic directory and file operations, and a command line interface for admin tasks
Project Background
The main design goals are:
For users to be able to self-host web file storage. Note that you will still need to know how to correctly setup and administer a web server securely
To be accessible on all web enabled devices, therefore the browser is the only platform for the frontend
biblioteka was tested on Linux, but should work with any operating system
Use the command go build biblioteka.go in the cloned repo to build the biblioteka binary for your system
(Optional) add custom styling to /client/style.css if you like
Copy the resulting biblioteka binary and the /client directory to wherever you would like to run the application from. Note that the biblioteka binary and the client directory should be in the same directory
Configuration
Initial Setup
Once installed, create a directory called config in the same directory as the biblioteka binary. Inside config create a file called host and enter on one line the host and port number the application is to run on. For example 123.123.1.1:3000 where 123.123.1.1 is the ip address of the host and 3000 is the port you would like it to run on
Then open the biblioteka CLI (see Usage section) and run the keygen command to generate a JWT signing key. The application will save the jwt.key file in the config directory
Run the create-user command to create a user. Enter the help command for details
For the newly created user, run the define-storage-dir command to tell the application where the user's files are to be stored. Enter the help command for details
Note that biblioteka requires a TLS certificate to run outside of localhost
Adding Users
Use the create-user CLI command to create a user and their web login password (see Usage section)
Then create that user's storage directory and use the CLI command define-storage-dir to enter the storage directory's filepath into the application
Usage
CLI
Once biblioteka is running and listening on a port, running biblioteka again as a seperate process will open the biblioteka CLI
enter help to see a list of available commands
Development and Testing
For development and testing remember to:
Add a host file in /config (see Configuration section)
Run the CLI command keygen to generate a JWT signing key
Add a user 'testuser' with password '12345678' using the create-user CLI command before running tests
Use the CLI command define-storage-dir to add the storage directory location for 'testuser'
All tests and static code scans can be ran by executing the script /testAll.sh