$selfhostrecipes.com
·9 min read

AIHOT: Run Your Own Curated Industry News Site with Docker Compose

AIHOT is an MIT-licensed engine that collects sources, scores them with an LLM and publishes a curated news site with daily digests. Here is how I would deploy it with Docker Compose, and what to check before it faces the internet.

self-hostingdocker-composeaipostgresqltutorial

01What AIHOT actually is

AIHOT started as an AI news site, and the repository is the engine behind it. It pulls items from a set of sources, has an LLM pre-filter them, scores the survivors twice, writes a headline and summary in Chinese, groups reports about the same story into one event, and ranks events by how many independent sources are talking about them. Each morning it also produces a daily digest, with weekly and monthly editions compiled from the dailies. The interesting part for a self-hoster is the framing. The author's pitch is that it is a site framework, not a finished product: swap in your own sources and your own selection criteria, and you get a hot-topics site for your own industry. The prompts and the inclusion thresholds all live in the repo, so changing the editorial taste does not mean changing code. A few honest caveats from the README itself. The author says they are a designer rather than a professional developer and that the code was rewritten together with an AI assistant. The repo is the same engine that runs the live site, exported from it, rather than a polished general-purpose framework. Updates are synced when possible, not guaranteed. The code is MIT licensed, but the AIHOT name and logo are not covered, so you should rebrand. I am an independent blogger and have no affiliation with the project; everything here comes from its public repo at https://github.com/KKKKhazix/AIHOT. Also note that the project documentation is written primarily in Chinese, with an English README linked from the main one. The default demo content is Chinese-language output too. Keep that in mind before you commit an evening to it.

Read the README's section on what stays behind in the AIHOT-only version. Some AI-specific features, such as the model leaderboard, are intentionally not part of the open-source engine, so do not expect to find them.

02Architecture: three processes and a database

The architecture doc describes three application processes. The api (Fastify) serves the site's own endpoints, the public API, RSS, MCP, the admin endpoints and image proxying. The worker runs the pg-boss job queue and scheduled jobs: fetching sources, calling models, clustering, heat calculation, digests, alerts and cleanup. The web process is a server-rendered React Router app that only talks to the api over HTTP and never touches the database. In the Compose deployment, that maps to five containers: db (PostgreSQL 17), setup, api, worker and web. The setup container runs database migrations and seed data on every start and then exits, which is a pattern I like because upgrades and first installs go through the same path. The deploy docs also note that the web container only receives site and API configuration, while database credentials, model keys, admin secrets and the data volumes go only to the backend containers. One design rule worth knowing about: pages never call a model. Readers only see results already stored in the database, and models are called only from worker jobs. Paid requests (model, X, WeChat accounts, Jina) also get a receipt recorded first, so a restart or retry reuses a result you already paid for, and each paid service has per-minute, per-hour and per-day caps that pause it when exceeded. For a self-hosted thing that calls an LLM API on your credit card, I consider that circuit breaker a major plus.

Everything that calls a paid API uses your own keys. Before leaving it running, find the paid-request limits in the admin settings and set them to something you are comfortable with.

03Getting it running locally

You need Docker with Compose, Node.js 24 (only for generating the configuration) and an API key for an OpenAI-compatible model endpoint. The docs mention DeepSeek, Qwen and Zhipu as options. The init script defaults to DeepSeek settings; for another provider, edit LLM_BASE_URL, LLM_MODEL and LLM_EXTRA_JSON in the generated .env following the examples in .env.example. If you use a reasoning model, also set LLM_REASONING_TOKENS so the model has output budget left for the actual answer. Without it, the docs say reasoning can use up the whole output allowance and every call fails with an empty answer. The quick start is four commands. The init script writes .env with random secrets and an admin password and prints that password once. If Node is not available on the machine, the deploy doc says to copy .env.example to .env and fill in ADMIN_PASSWORD (at least 12 characters), SESSION_SECRET, IMG_PROXY_SIGN_SECRET, POSTGRES_PASSWORD and LLM_API_KEY yourself, generating the secrets with openssl rand -hex 32. After startup, the site is on port 3000 and the admin area is at /admin, logged in with the ADMIN_PASSWORD from .env. Content starts appearing after a minute or two, and the first import of demo material takes roughly half an hour to process, since each item is pre-screened, scored, structured, summarized and clustered. The repo ships with 18 public overseas AI news sources as a demo.
[quickstart.sh]
1git clone https://github.com/KKKKhazix/AIHOT.git myhot
2cd myhot
3node scripts/init-env.ts --llm-key "your-llm-api-key"
4docker compose up -d --build

04Turning the demo into your own site

Almost everything you would change lives in two folders. The site folder holds the site's identity: name, copy, edition times, brand assets, terms and privacy pages. The industry folder holds the domain knowledge: taxonomy and tags, topics, starter sources, prompts and thresholds. The docs say framework code should rarely need touching, and features that only your site needs can go into a separate modules folder instead. The step I would spend the most time on is the scoring rubric, in the industry prompts folder. The author recommends keeping the structure (five weighted dimensions, noise suppression rules, safety boundaries) and replacing only the examples of what counts as important and what counts as noise. Because the default thresholds were calibrated for the AI industry, the docs suggest labelling 100 to 200 items of your own as should-select or should-not-select, then running the bundled evaluation script against them and iterating on prompts or thresholds. Sources come in six kinds: RSS, web lists, JSON endpoints, X accounts, WeChat public accounts, and your own scripts pushing items in. X and WeChat sources need third-party paid services. Each source has a tier that sets its selection threshold. Two defaults matter for legal comfort: site_fulltext and syndicate_fulltext are both off, so the site shows summaries and a link to the original unless you turn full text on for a source that explicitly allows it. The README also suggests handing the repo to a coding agent with a short instruction to read the customization docs and adapt the site to your industry. I would still review every prompt change by hand, since those prompts define what your site publishes.

The deploy docs describe safety valves such as COLLECT_ENABLED and MODEL_CALLS_ENABLED. Only the literal value true switches them on. If you just want to tweak the UI without spending on models, set them to false.

05Putting it behind a domain and HTTPS

For anything beyond localhost, set SITE_URL to the address readers actually use. RSS, share links, the sitemap and the agent Markdown all build absolute links from it, and it does not adapt to whatever address the browser used. The project ships a Caddy service behind a Compose profile named https. Point your domain at the server, set the variables below in .env, and start with the profile enabled. The 3000 port is bound to localhost so only Caddy reaches it, and TRUST_PROXY makes the app read visitor addresses from forwarded headers. If you already run Nginx or another proxy, the docs say to skip the Caddy profile and reverse-proxy to port 3000 on localhost instead. Pass X-Forwarded-For and X-Forwarded-Proto, because the admin login uses the latter to decide whether the connection is HTTPS, and without it the login cookie loses its Secure flag. Also set TRUST_PROXY=true in that case. If a CDN or caching proxy sits in front, respect the Cache-Control headers the app returns. The docs say not to add longer cache lifetimes, not to serve stale responses after expiry, and not to stack caches on dynamic content.
[.env]
1SITE_URL=https://example.com
2SITE_DOMAIN=example.com
3PORT=127.0.0.1:3000
4TRUST_PROXY=true

06Updates, backups and day-two operations

Persistent data sits in three Docker volumes: db for PostgreSQL, data for uploaded images, the image cache and local backups, and caddy for certificates. A plain docker compose down keeps them, while docker compose down -v deletes them, so be careful with that flag. For built-in backups, configure the DB_BACKUP_STORE_* variables for any S3-compatible object storage. The docs say a backup then runs daily at 04:10, producing a database dump and, when there are files to include, an archive of uploads. For a quick manual database-only export, use the command in the block below. It does not include attachment directories, so treat it as a supplement. Updating follows a strict order in the docs: back up first, pull and build, stop api, worker and web, run setup, then bring everything up. The old services need to be stopped before migrations because migrations can drop tables or columns, and old code would break against them. If setup fails, look at the error and do not start the services. Sites using HTTPS keep the --profile https flag. The update notes in the deploy doc are long and dated, with per-release warnings about new options, so read the entries between your version and the latest before pulling. For troubleshooting, follow the api, worker and web logs, and use the admin Runs page to see the latest result of each scheduled job and the Sources page for per-source fetch status.
[update-and-backup.sh]
1docker compose exec -T db pg_dump -U aihot aihot | gzip > myhot-$(date +%F).sql.gz
2
3git pull
4docker compose build
5docker compose stop api worker web
6docker compose run --rm setup && docker compose up -d
7
8docker compose logs -f --tail 100 api worker web

07Should you run it?

I would run AIHOT if I wanted a niche news site with an editorial pipeline and was willing to treat the prompts as the product. It gives you a working scaffold: collection, deduplication, scoring, clustering, digests, RSS, a public API and MCP access, all on a stack of Node.js, TypeScript, PostgreSQL and Compose that is easy to inspect. I would hesitate if I wanted a zero-maintenance reader app, because this is a publishing engine with ongoing model costs and a calibration job. I would also hesitate if I could not read Chinese documentation, since most of the docs and the default output are in Chinese. The author is upfront that issues may not get quick replies and that upstream syncs are best-effort, so plan on owning your fork. If you want upstream changes later, the README suggests forking rather than only cloning. If you try it, start with the demo sources on a local machine, watch the first import finish, and only then swap in your own sources and rubric. Remember to replace the name and logo, and check the terms and privacy templates before going live, since the docs describe those pages as templates. The repository is at https://github.com/KKKKhazix/AIHOT, and the official docs there are the source of truth if anything above has changed.

About the Author

Frank Pegasus

DevOps engineer and self-hosting enthusiast with over a decade of experience running containerized workloads in production. Creator of selfhostrecipes.com.