Ubuntu 24+Firecrawl / Bull Board Upgrade Procedure

Ubuntu 24+Firecrawl / Bull Board Upgrade Procedure

2 min read

(Ubuntu 24 — Single Node / systemd / Playwright MS)


Prerequisites #

  • Already built in /home/firecrawl, and systemd services
    firecrowl-serverfirecrowl-workersfirecrowl-playwright
    are running
  • Node.js 20 & pnpm 10 installed
  • Redis running on localhost:6379

STEP 0 Stop Services & Backup #

sudo systemctl stop firecrowl-server firecrowl-workers firecrowl-playwright
cd /home
sudo cp -r firecrawl firecrawl_backup_$(date +%Y%m%d)

STEP 1 Update Repository #

  1. Register safe directory (first time only)
    git config --global --add safe.directory /home/firecrawl
  2. Shallow fetch to latest commit
    cd /home/firecrawl
    git fetch --depth 1 origin main
    git reset --hard origin/main

STEP 2 Clean Reinstall Dependencies #

cd /home/firecrawl/apps/api
rm -rf node_modules pnpm-lock.yaml package-lock.json
pnpm install                                # Get latest dependencies
pnpm approve-builds --all                   # Allow postinstall scripts

Add Missing Packages (required this time) #

# Playwright itself
pnpm add -D playwright
# domhandler type fix
pnpm add -D domhandler @types/domhandler

STEP 3 Source Code Fixes (TypeScript Error Resolution) #

Apply patches to the following 3 files.

3-1 src/lib/logger.ts
// omitted …
const meta = info.metadata as any;
return `${info.timestamp} ${info.level} [${meta.module ?? ""}:${meta.method ?? ""}]: ${info.message}`;
// omitted …
3-2 src/lib/extract/reranker.ts & fire-0/reranker-f0.ts
documents: documents as unknown as string[],
3-3 src/scraper/scrapeURL/lib/removeUnwantedElements.ts
import { Cheerio, load } from "cheerio";
import { AnyNode } from "domhandler";

STEP 4 Switch to Production Build Method (tsc→dist) #

4-1 Add scripts to package.json #

"scripts": {
  "build": "tsc",
  "start:prod": "npm run build && node dist/src/index.js"
}

4-2 Update systemd service #

/etc/systemd/system/firecrowl-server.service

[Service]
WorkingDirectory=/home/firecrawl/apps/api
EnvironmentFile=/home/firecrawl/apps/api/.env
ExecStart=/usr/bin/pnpm run start:prod
Restart=always
RestartSec=5
sudo systemctl daemon-reload

STEP 5 Build & Restart Services #

cd /home/firecrawl/apps/api
pnpm run build
sudo systemctl restart firecrowl-server firecrowl-workers firecrowl-playwright

STEP 6 Verification #

  • sudo systemctl status firecrowl-server shows active (running)
  • curl http://localhost:3002/test → 200 OK
  • Browser: http://<IP>:3002/admin/<TEST_API_KEY>/queues displays
  • http://<IP>:3000/html?url=https://example.com → Returns HTML

Updates During Operations (Future) #

  1. git pull & pnpm install
  2. pnpm run build
  3. sudo systemctl restart firecrowl-server firecrowl-workers

 

Updated on 2026/6/9

What are your feelings

  • Happy
  • Normal
  • Sad

©2020 BESTNET.LLC . All Rights Reserved.