# PodX - Offline Library with OpenWebUI export ## Repo-friendly secrets - Secrets live in **.env** at the repo root (NOT committed). - Commit **.env.example**. Users copy it to `.env` and fill in their values. - We also include **.gitignore** to keep `.env` and data paths out of git. ## Quick start ```bash cp .env.example .env # edit values (MEILI_MASTER_KEY, OPENWEBUI_API_KEY, etc.) docker compose up -d --build # UI: http://:8088 # Meili: http://:7700 ``` The worker reaches OpenWebUI at `$OPENWEBUI_URL` (default: http://host.docker.internal:3003). ## Ingest helpers ```bash MEILI_URL=http://localhost:7700 MEILI_KEY=$MEILI_MASTER_KEY ./ingest/ingest_pdfs.sh /path/*.pdf MEILI_URL=http://localhost:7700 MEILI_KEY=$MEILI_MASTER_KEY ./ingest/ingest_epub.py /path/*.epub MEILI_URL=http://localhost:7700 MEILI_KEY=$MEILI_MASTER_KEY ./ingest/ingest_kiwix.sh /path/wiki.zim ``` ## Backfill existing files into OpenWebUI ```bash # From repo root: ./tools/backfill_openwebui.sh # Or include extra folders to scan: ./tools/backfill_openwebui.sh /some/other/folder /another/folder ``` - Reads `.env` for `OPENWEBUI_URL`, `OPENWEBUI_API_KEY`, `OPENWEBUI_KB_NAME`. - Uploads `*.txt`, `*.md`, `*.html` it finds in `./transcripts` and `./library/web` by default. ## Generating required secrets ### 1. Meilisearch master key Meilisearch needs a strong master key (like a root password). Generate one locally: ```bash # On Linux or Mac with OpenSSL installed openssl rand -hex 32 # Example output (keep it secret, do not reuse this exact value): 92e4d0d2e4c6f489a91dfc30b6fd6c985f6780ad827f1e7ce1bb3c6dc81d562b ``` Then put it in your `.env`: ```dotenv MEILI_MASTER_KEY=92e4d0d2e4c6f489a91dfc30b6fd6c985f6780ad827f1e7ce1bb3c6dc81d562b MEILI_KEY=${MEILI_MASTER_KEY} ``` ### 2. OpenWebUI API key To allow PodX to push documents into your OpenWebUI Knowledge Base, create an API key: 1. Go to your running OpenWebUI (e.g. [http://localhost:3003](http://localhost:3003)). 2. Log in with your admin account. 3. Navigate to **Settings → API Keys**. 4. Click **Generate new API key**, give it a name like `podx-worker`. 5. Copy the generated key and add it to `.env`: ```dotenv OPENWEBUI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` If the key is ever leaked, revoke it in OpenWebUI and generate a new one.