FATHOM 1.3 — cPanel Node.js (the 503-proof pack) ================================================ Zero npm packages. Node 18, 20, or 22 (14+ will boot). Do NOT upload the Grok / GROK1.2 project zip. That is a Vite app and WILL 503 on cPanel. This pack is the only thing that belongs on the server. 0. Unzip -------- You should see a folder named fathom (or the files below at the top level): app.js ← startup file. Required. server.js ← alias, ignore cron.js probe.js package.json lib/ data/ catalog.json + anchors.json (must be writable) public/ the website 1. Create the Node.js application --------------------------------- cPanel → Software → Setup Node.js App (Hostinger: Advanced → Node.js. If missing, ticket: enable CloudLinux Node.js Selector.) Create Application: Node.js version 20 or 22. NOT 10 / 12. Application mode Production Application root fathom (a folder in your home, e.g. /home/USER/fathom — not public_html unless you choose that) Application URL a subdomain is cleanest: fish.yourdomain.com Application startup file app.js ← type this exactly Create. Do not Start yet. Copy the nodevenv path shown (looks like /home/USER/nodevenv/fathom/20/bin/node). 2. Upload so app.js sits next to public/ and data/ ------------------------------------------------- File Manager → the application root. Upload the unzipped files. RIGHT: /home/USER/fathom/app.js /home/USER/fathom/public/index.html /home/USER/fathom/data/catalog.json WRONG (this is the usual 503): /home/USER/fathom/fathom/app.js ← extra nested folder /home/USER/public_html/app.js ← unless application root IS public_html uploading GROK1.2.zip / the Grok project Select the data folder → Permissions → 755. Skip “Run NPM Install”. There are no packages. 3. Environment variables (optional) ----------------------------------- On the Node.js app screen → Add variables: FORCE_IPV4 1 CONCURRENCY 3 FETCH_TIMEOUT_MS 12000 CRON_SECRET a long random string BASE_PATH /fathom (ONLY if the URL is a subpath) Save. 4. Start -------- Click Start (or Restart). Visit the Application URL. You should see the desk immediately (historic marks). That means Node is alive — not a 503. Open /api/ping on the same URL. You want {"ok":true,...}. Open /tape.json — this is the printed tape (JSON). If this is HTML, the host is not sending API URLs to Node. Open /health.html to probe shops (this is slow on purpose; the desk is not). If the desk says “Unexpected token '<' … is not valid JSON” or “Could not print the tape”: • The browser asked for JSON and got a web page. Usual causes: – Application URL is a subpath (example.com/fathom) and BASE_PATH is not set. Add BASE_PATH=/fathom, Save, Restart. – You opened the site without a trailing slash on a subpath. – /api is intercepted by the host. The desk now also reads /tape.json. • Scrapers can still be fine (probe.js talks to shops, not to /api). • After upload: Stop + Start, then hard-refresh the browser. 5. Cron (keeps the tape live) ----------------------------- cPanel → Cron Jobs → every 15 minutes: cd /home/USER/fathom && /home/USER/nodevenv/fathom/20/bin/node cron.js >> /home/USER/fathom/data/cron.out 2>&1 Use the nodevenv binary from step 1, not system `node`. 6. If you still see a 503 ------------------------- A 503 means Passenger never got a live Node process. In order: a) The app is not Started. Setup Node.js App → Start / Restart. b) Startup file is not app.js, or app.js is in a nested folder. File Manager: you must see app.js in the application root. If you see fathom/fathom/app.js, move the inner files up. c) You uploaded the Grok project (package.json mentions vite / tanstack). Delete it. Upload THIS pack only. d) Node 10/12. Edit the app, pick 20, Save, Restart. e) CloudLinux killed the process (memory). Set CONCURRENCY=2, Restart. Read data/boot.log in File Manager. f) stderr log on the Node.js app screen — that is the crash reason. This pack serves a diagnostic HTML page instead of dying when files are missing. If you see “Fathom did start — files are in the wrong folder”, that is a 200, not a 503: move the files as the page says, then Restart. After every upload: Stop + Start on the Node.js app screen. 7. Local smoke (optional) ------------------------- node app.js # then open http://127.0.0.1:8080/api/ping Marks are estimates, not investment advice.