Installation¶
Requirements¶
- Chromium or Google Chrome -- PRISM uses headless Chrome for rendering
- Linux (x64 or arm64), macOS, or Docker
- Memory: minimum 1GB, recommended 2GB+ (Chrome is memory-hungry)
- Open files: 65535 recommended (
LimitNOFILEin systemd)
Docker Compose (Recommended)¶
The easiest way to run PRISM. Includes Chromium in the container.
# docker-compose.yml
services:
prism:
image: ghcr.io/trident-cache/prism:latest
ports:
- "4000:4000" # Proxy
- "4001:4001" # Admin API
environment:
- PRISM_ORIGIN=http://your-spa:3000
deploy:
resources:
limits:
memory: 2G
Update Docker to Latest¶
OS Packages (Debian/Ubuntu)¶
# Add repository
curl -sSfL https://get.trident-cache.com/prism | sh -s -- --add-repo
# Install
apt update
apt install trident-prism
# Install Chromium
apt install chromium
# Start
systemctl enable --now prism
OS Packages (RHEL/Rocky/Fedora)¶
# Add repository
curl -sSfL https://get.trident-cache.com/prism | sh -s -- --add-repo
# Install
dnf install trident-prism chromium
# Start
systemctl enable --now prism
Binary Download¶
# Download and install (auto-detects OS and architecture)
curl -sSfL https://get.trident-cache.com/prism | sh
# With systemd service setup
curl -sSfL https://get.trident-cache.com/prism | sh -s -- --with-service
The installer:
- Downloads the correct binary for your platform
- Installs to
/usr/local/bin/prism - With
--with-service: createsprismsystem user, installs systemd units, creates config directory
Verify Installation¶
# Check version
prism version
# Validate config
prism --config /etc/prism/config.toml validate
# Start manually (foreground)
prism --config /etc/prism/config.toml run
File Locations¶
| Path | Purpose |
|---|---|
/usr/bin/prism |
Binary |
/etc/prism/config.toml |
Configuration |
/etc/default/prism |
Environment variables |
/var/lib/prism/ |
Data directory |
/var/log/prism/ |
Log directory |
/usr/lib/systemd/system/prism.service |
Systemd service |
/usr/lib/systemd/system/prism.socket |
Systemd socket |
Systemd Service¶
The systemd unit includes security hardening:
[Service]
Type=simple
User=prism
Group=prism
ExecStart=/usr/bin/prism --config ${PRISM_CONFIG}
Restart=on-failure
RestartSec=5s
# Security
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
MemoryMax=2G
LimitNOFILE=65535
LimitNPROC=4096
Chrome needs /dev/shm
Chrome requires /dev/shm for shared memory. The systemd unit includes ReadWritePaths=/dev/shm. In Docker, ensure --shm-size=512m or mount /dev/shm.
Environment Variables¶
Set in /etc/default/prism:
Next Steps¶
- Configuration Reference -- all config options explained
- Admin API -- health checks, metrics, cache purge