# ![CatAsk icon](./static/icons/catask-32.png) CatAsk a work-in-progress minimal single-user q&a software > [!NOTE] > CatAsk is alpha software, therefore bugs are expected to happen ## Prerequisites - MySQL/MariaDB - Python 3.10+ (3.12+ recommended) ## Install Clone this repository: `git clone https://git.gay/mst/catask.git` ### VPS-specific Go into the cloned repository, create a virtual environment and activate it: #### Linux ```python -m venv venv && . venv/bin/activate``` #### Windows (PowerShell) ```python -m venv venv; .\venv\Scripts\activate``` --- After that, install required packages: ```pip install -r requirements.txt``` ### Shared hosting-specific If your shared hosting provider supports [WSGI](https://w.wiki/_vTN2), [FastCGI](https://w.wiki/9EeQ), or something similar, use it (technically any CGI protocol could work) ## Post-install ## Configuration First, rename `.env.example` to `.env` and `config.example.json` to `config.json`, then configure all the values below: ### .env `DB_HOST` - database host (usually 127.0.0.1) `DB_NAME` - database name `DB_USER` - database user `DB_PASS` - database password `DB_PORT` - database port (usually 3306) `ADMIN_PASSWORD` - password to access admin panel `APP_SECRET` - application secret, generate one with this command: `python3 -c 'import secrets; print(secrets.token_hex())'` ### config.json Configure in Admin panel after installing (located at `https://yourdomain.tld/admin/`) --- After you're done configuring CatAsk, init the database: `flask init-db` If that doesn't work (e.g. tables are missing), try importing schema.sql into the created database manually ## Usage Start CatAsk with this command: ``` gunicorn -w 4 app:app ``` If you want CatAsk to be accessible on a specific host address, specify a `--bind` option to `gunicorn -w 4 app:app` (e.g. `--bind 127.0.0.1:5000`) For debugging, run `flask run --debug` Admin login page is located at `https://example.com/admin/login/` Runs on `127.0.0.1:8000` by default ### Caddy This repository contains an example Caddyfile that runs CatAsk on catask.localhost by reverse proxying it to 127.0.0.1:5000, you can modify it as needed ## Updating For instructions with updating from one version to another, check [UPDATE.md](https://git.gay/mst/catask/src/branch/main/UPDATE.md) file Check [CHANGELOG.md](https://git.gay/mst/catask/src/branch/main/CHANGELOG.md) file for release notes