Skip to content

configuration

github-actions[bot] edited this page Dec 1, 2026 · 7 revisions

⚙️ Configuration

← All documentation

All settings are environment variables. For development, copy .env.example to backend/.env.

Any variable can instead be read from a file: set NAME_FILE to the file's path, such as DATABASE_URL_FILE=/run/secrets/database_url. That's how Docker secrets work. When both are set, the file wins.

Variable Default Purpose
DATABASE_URL required Which database to use and how to reach it. See the database
BIND_ADDR 0.0.0.0:8080 Listen address
STATIC_DIR unset (/app/static in the image) Serve the built frontend from this folder
LOG_DIR unset (/app/data/logs in the image) Where Rollcall also writes its log, one file a day (rollcall.YYYY-MM-DD.log), keeping the last 14. Unset, it logs only to the console
BACKUP_DIR backups (/app/data/backups in the image) Where backups are saved. See Docker
UPLOAD_DIR uploads (/app/uploads in the image) Where uploaded photos are saved. Created if it's missing
CORS_ORIGIN unset An extra allowed origin, for calling the API from another site
BASE_PATH unset Serve Rollcall under a sub-path, such as /rollcall. See a sub-path
FRAME_ANCESTORS 'self' Which pages may show Rollcall in a frame, as a CSP frame-ancestors list separated by spaces. To put Rollcall on a Home Assistant dashboard, add its address: 'self' https://ha.example.com. 'none' allows no frames at all. See security headers
PUBLIC_URL unset The address people open Rollcall at, such as https://rollcall.example.com (with the sub-path, if any). Notifications link to the spool or page they're about when it's set
UPDATE_CHECK true Once a day, ask GitHub whether a newer build of the image or download is out, and tell admins at the top of each page. It sends no data about your install, only the build's commit. false turns it off. Builds you make yourself never check
PUID, PGID 10001 The user and group IDs the image runs Rollcall as. See Docker
RUST_LOG rollcall=info,tower_http=info in the image Log levels
SCRAPER_TIMEOUT_SECS 12 How long the link parser waits for a page
SCRAPER_USER_AGENT a browser-like value User agent for fetching product pages
SCRAPER_ALLOW_PRIVATE_HOSTS false Allow the link parser to fetch pages on private networks. While it's off, every address the parser connects to is checked, redirects included, so a page can't send it to your network
CATALOG_URLS the Open Filament Database, then its GitHub releases Where the community filament catalog is downloaded from, or off. See the filament catalog
CATALOG_CACHE catalog.json.gz (/app/data/catalog.json.gz in the image) Where the last copy of the catalog is kept
SPOOLMANDB_URLS SpoolmanDB's site Where SpoolmanDB, the catalog's second source, is downloaded from, or off. See the filament catalog
SPOOLMANDB_CACHE spoolmandb.json, next to CATALOG_CACHE Where the last copy of SpoolmanDB is kept
ANTHROPIC_API_KEY unset Turns on Claude for the AI step, until an admin picks something else in Settings › AI. See the AI step
LLM_MODEL claude-opus-5-5 Claude's model for that step
ANTHROPIC_BASE_URL https://api.anthropic.com Where Claude's API is, for a proxy or gateway in between

🛡️ Security headers

Every response has X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-origin, and a Content-Security-Policy with frame-ancestors from FRAME_ANCESTORS, so other sites can't put Rollcall in a frame to trick you into clicking (clickjacking). The web interface's pages also allow only Rollcall's own scripts. Images can come from anywhere, since product photos come from the shops' sites.

HTTPS, and Strict-Transport-Security, are your reverse proxy's job; see reverse proxy.

🗄️ The database

Rollcall runs on PostgreSQL, SQLite, or MySQL/MariaDB. The start of DATABASE_URL picks which one:

Database DATABASE_URL Notes
PostgreSQL 18 postgres://user:password@host:5432/rollcall The default in the examples.
SQLite sqlite:///app/data/rollcall.db One file, no database server. The file is created if it's missing. In the image, keep it in the /app/data volume.
MySQL 8.0+ or MariaDB 10.6+ mysql://user:password@host:3306/rollcall mariadb:// works too. Create the database first, with CHARACTER SET utf8mb4.

Special characters in a password, such as @, : or /, need percent-encoding in the URL: p@ss becomes p%40ss.

Rollcall creates and updates its tables when it starts, on any of them. Each database keeps its own data: switching DATABASE_URL to another one starts with an empty Rollcall. To bring your data along, restore a backup on the new one; see moving to another database.

Names are compared without regard to case on all three. On MySQL and MariaDB, the default collation also ignores accents, so two brands or locations whose names differ only by an accent count as the same name.

🧭 A sub-path

To serve Rollcall at https://example.com/rollcall/ instead of its own host name, set BASE_PATH=/rollcall and have your reverse proxy pass the whole path through, without removing /rollcall. The web interface, the API (/rollcall/api/...), and photos all move under it, and / redirects to /rollcall/. Reverse proxy has the setup for each proxy. With nginx:

location /rollcall/ {
    proxy_pass http://rollcall:8080;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
}

QR labels, API tokens and the slicer script use the full address, such as --url https://example.com/rollcall. The image works with any BASE_PATH. A frontend you build yourself needs ROLLCALL_BUILD_BASE=/__rollcall_base__ set for npm run build, or its links point at /.

🔐 Docker secrets

With Compose, keep the database password out of docker-compose.yml:

services:
  rollcall:
    environment:
      DATABASE_URL_FILE: /run/secrets/database_url
    secrets:
      - database_url

secrets:
  database_url:
    file: ./database_url.txt   # postgres://rollcall:the-password@db:5432/rollcall

A newline at the end of the file is ignored.

📚 The filament catalog

Search the community catalog in + Add spool searches two community databases, both under the MIT license:

Rollcall downloads each one the first time someone searches, keeps a copy (CATALOG_CACHE, SPOOLMANDB_CACHE), and downloads it again when the copy is a day old, in the background. A color that's in both shows once: the Open Filament Database's entry, with anything it lacks (such as a spool size, the empty spool's weight, or the HueForge TD) filled in from SpoolmanDB. Searching happens on your server; nothing about your spools is sent anywhere.

The Open Filament Database

CATALOG_URLS lists where to get the file, separated by commas, tried in order until one answers:

  1. https://api.openfilamentdatabase.org/json/all.json.gz, the database's own site.
  2. https://github.com/OpenFilamentCollective/open-filament-database/releases/latest/download/all.json.gz, the same file attached to its GitHub releases.

If none answers, Rollcall keeps using the copy it has. An entry can also be a file on the server, such as /app/data/all.json.gz, for an install with no internet access. Set CATALOG_URLS=off to leave the Open Filament Database out.

SpoolmanDB

SPOOLMANDB_URLS works the same way. The default is https://donkie.github.io/SpoolmanDB/filaments.json, the database's compiled file (about 6 MB). Set SPOOLMANDB_URLS=off to leave SpoolmanDB out.

The search works as long as one source loads. With both set to off, the search box doesn't appear.

🤖 The AI step

An optional AI model helps with links: when a product page still leaves important fields empty, it reads the page text and fills only those gaps (it never overwrites a value the parser found; see Link parser). You check the form before saving.

An admin picks the model in Settings › AI:

Choice What it is
None No AI. Links are read by Rollcall's own parser only. Free, and nothing leaves your server.
A model on your own server Any server with an OpenAI-compatible chat API: Ollama, llama.cpp, LM Studio, vLLM and others. Give its address as Rollcall's server sees it (such as http://ollama:11434), the model's name, and a key only if the server wants one. Any chat model works, such as qwen2.5 or llama3.2. Free, and pages stay on your network.
Claude Anthropic's model, with an API key from the Anthropic Console. Usually the most accurate, and billed by Anthropic.

Test asks the model to read a short sample, so a wrong address, model name or key shows up right away. The key is kept in the database and never shown again; backups leave it out, so enter it again after restoring on a new server.

Until an admin picks something, ANTHROPIC_API_KEY decides, as before: Claude when it's set, none when it isn't. With it set, Claude works without a key in Settings.

To run Ollama next to Rollcall with Docker Compose, add it as a service and pull a model once:

  ollama:
    image: ollama/ollama
    restart: unless-stopped
    volumes:
      - ollama:/root/.ollama
docker compose exec ollama ollama pull qwen2.5:7b

Then pick A model on your own server with the address http://ollama:11434 and the model qwen2.5:7b, and add ollama: under volumes: at the bottom of the file. A 7B model wants roughly 6 GB of memory, and is much faster on a GPU than on a CPU.

Clone this wiki locally