TheHackerLibrary is a free, not sponsored library of hacking learning resources. The goal is to reference security posts so that it is easy for anyone to just dig dive into a topic without buying courses.
This project is live here, however you can easily self-host it too using docker.
The first step is to clone the git repository:
git clone https://github.com/niozow/thehackerlibrary.git
cd thehackerlibraryThen copy the .env.example and change environment variable :
cp .env.example .env
cat .env
POSTGRES_USER="thehackerlibrary"
POSTGRES_PASSWORD="thehackerlibrary"
POSTGRES_DB="thehackerlibrary"
AUTH_URL="http://localhost:3000"
AUTH_SECRET=""
AUTH_GITHUB_ID=""
AUTH_GITHUB_SECRET=""AUTH_SECRET: Generate it usingopenssl rand -base64 32AUTH_GITHUB_IDandAUTH_GITHUB_SECRETcan be set by creating a new github OAuth app from the settings.AUTH_URLmust be the URL of the website.POSTGRES_*should be information related to the postgres database.
Then you can launch the app using docker :
docker compose up -dThe database will be empty and uninitialised, you can use the following from thehackerlibrary.py to upload data and initialise it:
thehackerlibrary import ./data/All referenced posts are stored in the ./data directory in forms of YAML files. You can edit those YAML files to contribute to the project. However, as editing the YAML directly is tedious because of references, I suggest you edit those using thehackerlibrary.py. You can then make a Pull Request to contribute.

