Skip to main content

Getting Started

This guide gets PRISM running in under five minutes.

Prerequisites​

  • Docker (recommended) or a Linux server with a Rust toolchain
  • Google Chrome or Chromium installed and available in $PATH (the Docker image bundles Chromium automatically)
  • A licence file. PRISM is commercial software and this is not optional for the part you came to see: without a licence it starts, proxies every request and renders nothing, so the crawler test below returns your origin's JavaScript shell and looks like a working install. Email sales@trident-cache.com for a trial; see Licensing.

Quick Start with Docker​

# config.toml — the [license] path is what makes rendering happen
cat > config.toml <<'TOML'
[server]
origin = "http://host.docker.internal:3000"

[license]
path = "/etc/prism/license.lic"
TOML

docker run -d -p 4000:4000 -p 4001:4001 \
-e RUST_LOG=info \
-v "$PWD/config.toml:/etc/prism/config.toml:ro" \
-v "$PWD/license.lic:/etc/prism/license.lic:ro" \
docker.trident-cache.com/prism:latest

Port 4000 serves proxied traffic. Port 4001 exposes the admin API.

Leave the licence out and everything below still appears to work — the container starts, /health answers, traffic flows — except the rendering, which is the whole product. GET /status on the admin port reports licensed, and that is the field to check first when the crawler test returns a bare shell.

By default PRISM expects your SPA origin at http://localhost:3000. Override it with a config file or environment variable (see Configuration).

Quick Start from Binary​

Install from the signed package repositories (recommended — this also installs the systemd unit and a default config):

# Debian / Ubuntu
curl -fsSL https://pkg.trident-cache.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/trident.gpg
echo 'deb [signed-by=/usr/share/keyrings/trident.gpg] https://pkg.trident-cache.com/prism/apt stable main' | sudo tee /etc/apt/sources.list.d/trident-prism.list
sudo apt update && sudo apt install prism

RPM and Alpine repositories live at the same host — see the README for the dnf and apk variants. Then start the service:

sudo systemctl enable --now prism

Minimal Configuration​

Create a config.toml:

[server]
address = "127.0.0.1:4000"
origin = "http://my-app:3000"
mode = "bot-only" # or "render-all"
  • address -- the host and port PRISM listens on.
  • origin -- the upstream SPA that PRISM will fetch pages from and render.
  • mode -- bot-only renders only for detected bots (default). render-all renders every request through headless Chrome.

Test It​

Send a request with a regular browser User-Agent:

curl -s -o /dev/null -w "%{http_code}" http://localhost:4000/
# 200 -- proxied directly from origin, no rendering

Now send a request as Googlebot:

curl -s -H "User-Agent: Googlebot" http://localhost:4000/ | head -20
# Fully rendered HTML with all JS-generated content

If that returns the same near-empty shell the browser request did, PRISM is running unlicensed — check curl -s http://localhost:4001/status for "licensed": false before looking anywhere else.

The X-Prism-Cache response header tells you whether the result was a cache hit or miss.

Verify with the Admin API​

Check that PRISM is healthy:

curl http://localhost:4001/health
# {"status":"ok"}

View Prometheus metrics:

curl http://localhost:4001/metrics

Next Steps​

  • Configuration -- full reference for config.toml options
  • Rendering -- tune Chrome pool size, timeouts, and wait strategies
  • Deployment -- production deployment patterns with Docker, systemd, and Kubernetes