- Connect the gateway or Node middleware to managed controls.
- Change access and budgets in Self-hosted → Controls, then publish.
- Check that the revision is acknowledged, then review decision logs and alerts.
Managed controls
Managed controls require Crawler Protection SDK/gateway 0.7.0+, the management backend and its database migration. Existing static runtimes and aggregate telemetry do not automatically enable this feature. The dashboard does not install software, deploy infrastructure or increase database capacity.
When no site has been selected, controls and analytics prefer a site with a current runtime report. Selecting an older site keeps that choice during refresh so its history remains inspectable.
Connect a gateway
Keep the existing validated installation configuration, Redis and operator API key. Add these server-side variables and restart your gateway:
VALIRON_API_KEY=<your-server-side-operator-key>
CRAWLER_SITE_ID=storefront
CRAWLER_MANAGED_CONTROLS=true
Use the same site ID for controls and telemetry. Continue CRAWLER_TELEMETRY_URL reporting for aggregate analytics and traffic alerts. On first successful control report, the installation registers with its current crawler access and mode, preserving a partial enforceGroups rollout. Selecting a new mode in Controls applies that mode to all configured route groups. Decision logging and outbound alerts start disabled. All instances sharing a site must use the same base configuration. Managed registration accepts at most 64 KiB of compact configuration JSON, 16 sites per account and 64 runtime instances per site in 24 hours.
Connect Node middleware
import { createCrawlerControlClient, createCrawlerRuntime } from '@valiron/crawler-protection';
const controls = createCrawlerControlClient({
configuration, // your validated deployment configuration
apiKey: process.env.VALIRON_API_KEY!,
site: process.env.CRAWLER_SITE_ID!,
});
await controls.refresh();
const stopControls = controls.start();
const runtime = createCrawlerRuntime({
configuration, redis, activation, clientIp, registry,
controlClient: controls,
});
// Mount runtime.nodeMiddleware/runtime.nuxtMiddleware before protected work.
// Keep your existing database/render admission wrappers and telemetry.
// On shutdown: stopControls(); telemetry.stop(); activation.stop();
The control client uses its fixed hosted endpoint by default. An optional endpoint must be trusted HTTPS (HTTP is accepted only for loopback tests), end in /operator/crawlers/control/runtime, and contain no credentials, query or fragment. Do not accept this value from website visitors. status() reports the locally held revision and lease availability. refresh() records failures in status; current() throws when no valid policy is available.
Choose access and budgets
Open Crawler Protection → Self-hosted → Controls, select a registered site, edit and Publish changes:
- Choose Allow within limits or Block for each installed crawler class and route group. Search, user fetches and training are separate identities. Allowing a class still requires its configured verifier and available budget; it does not grant every browser identifying itself as that service access.
- Set the fallback for other verified crawlers. Unverified traffic has a separate control: it includes ordinary anonymous visitors, so blocking it can block people. Independently authenticated shopper/checkout grants retain their own lanes.
- Reduce global, source, route or per-IP credits within the installed ceilings. Credits follow configured route costs; they are not necessarily one credit per request. Unknown traffic remains no more privileged than reduced provider budgets. Work-pool/concurrency ceilings, customer reservations, source verifiers and routing remain installation settings.
- Observe reports proposed access/rate denials while preserving hard safety and workload limits. Enforce applies access/rate decisions to catalog traffic. Review measured headroom before switching.
Customer publishing requires the owner's authenticated dashboard session. Authorized platform admins can also make customer-scoped changes through the admin workspace, with a required reason and atomic audit record; customer history labels those revisions Valiron support. Runtime operator API keys cannot publish, change alert destinations or read owner logs. Settings and the last 20 revisions are durable and account/site scoped. Concurrent edits use revision checks; refresh and review a conflicting revision rather than overwriting it. Rollback publishes the selected settings as a new increasing revision.
Know whether a revision is active
Runtimes poll every 30 seconds and report their previously applied revision before receiving an update. The dashboard distinguishes the desired revision from acknowledgment by instances with reports within the five-minute lease window. An acknowledgment is a runtime report, not independent deployment attestation. Instances may temporarily use different revisions during propagation; the installed safety ceilings remain the upper bound.
Control fetching runs in the background; it adds no hosted network call to the per-request control decision. It does not remove the existing hosted monthly quota admission call. Transient update failures retain the current policy only to its original expiry, at most five minutes. Authentication/configuration rejection invalidates the local policy immediately. Without a valid managed policy, new catalog admissions fail closed; authenticated customer grants remain independent. Already running work must still settle and release normally.
Changing routes, source candidates, work ceilings or the base configuration requires a planned installation update. Stop the old deployment, validate a replacement in Setup, use Version history → Replace the installed configuration, and deploy that exact file. Adoption resets access to the new installation defaults in dry run, disables decision logging, clears logs and replaces version history. Old configuration fingerprints are rejected. This can interrupt traffic; use a maintenance window. A runtime API key cannot silently overwrite the site's installed configuration.
Inspect recent decisions
Source-rule preview in Controls compares the published policy with your unsaved draft against up to 1,000 retained decision records from the last 24 hours. It shows source/class/route matches, the rule and mode before and after, and records matching a different rule or mode. Opening it is read-only; publishing remains a separate action. Logs are fetched only while preview is open and refresh with controls. Enable decision logging and generate traffic if the sample is empty. Unverified records can include people. Records for routes no longer installed are excluded. This is not a full backtest: logs omit customer-lane context, request-bucket state and work concurrency. Rate-only changes do not affect these matches, and a block-rule match does not prove the historical request would have been blocked. Safety and work limits remain active. The preview does not estimate infrastructure savings.
Integration health in Controls shows current runtime reports, exact revision/configuration acknowledgments and reported dropped-log counts. A report is current for less than five minutes; the runtime list covers the last 24 hours. Stale instances may have been intentionally stopped or replaced. Dropped counts are runtime-reported, not lifetime totals. Acknowledgment proves control connectivity only; validate route coverage, origin bypass prevention and work instrumentation separately. Use Analytics → Advanced diagnostics for telemetry and capacity diagnostics.
Decision logs is separately enabled in Controls. The dashboard shows up to 1,000 decisions per site from the last 24 hours; every received decision is stored by Valiron and kept. Each decision has source/class, route group, action, reason, verification state, runtime time, server receipt time and generated event ID. No raw IPs, URLs, user agents, credentials or caller-supplied request identifiers are collected by this log buffer. These coarse dimensions can still be business-sensitive; access is account scoped. Expand a reason in Decision logs for a plain-language explanation and a suggested investigation. Explanations distinguish admission from subsequent work limits; request-budget logs do not identify which bucket was exhausted. They describe the historical record, not the current policy.
Each process buffers up to 1,000 events, uploads at most 100 per control report, and drops new events when full. Retry event IDs are deduplicated in storage. This is a bounded recent sample, not a complete audit archive. The dashboard shows runtime drop indications; aggregate runtime telemetry remains the source of reported totals. Filter by source, route or decision and export the matching rows. Disabling logging stops collection and clears runtime buffers once runtimes receive the update; decisions already received are kept but no longer shown. Runtime clocks can differ; server receipt time controls the 24-hour view.
Configure notifications
Alerts can send email to the account email address and/or a public HTTPS webhook, only after the owner saves enabled destinations. Email requires server-side RESEND_API_KEY and optional CRAWLER_ALERT_EMAIL_FROM; the UI shows when email is unavailable. Webhooks must use public HTTPS on port 443 without URL credentials. DNS is resolved and checked again for each delivery, pinned to the checked public address; redirects are not followed.
Available triggers are runtime reporting absent for two minutes and a configured threshold of limited/blocked requests in the current fixed five-minute reporting window. The latter requires aggregate telemetry using the same site ID; it is not computed from sampled decision logs. Checks run about once a minute in bounded worker batches, so notifications can be delayed. A per-destination/type cooldown is configurable from 15 minutes to 24 hours. Delivery attempts and status are visible; failures retry up to three times. Deliveries are retained for seven days. These notifications supplement existing infrastructure alarms and do not change policy or reclaim workload holds.
Webhook bodies contain id, type (crawler.stale or crawler.blocked), site, occurredAt and a fixed message. Delivery is not signed; treat it as a notification and confirm incidents in the authenticated dashboard before taking privileged actions. Receivers should deduplicate by id: failures after delivery can produce retries. Turning destinations off or changing settings cancels queued deliveries on their next check; it cannot retract a delivery already in flight.
Management endpoints
All responses are private and noncacheable. API keys authenticate only POST /operator/crawlers/control/runtime, which registers/updates a site, receives a five-minute policy lease and uploads bounded decisions. A configuration fingerprint mismatch returns 409; excessively frequent reports or cardinality limits return 429.
Owner dashboard sessions authenticate:
GET /operator/crawlers/control: registered sites, installed ceilings, desired settings and runtime acknowledgments.POST /operator/crawlers/control/publish?site=...:{ expectedRevision, settings }or{ expectedRevision, rollbackRevision }.POST /operator/crawlers/control/adopt?site=...:{ expectedRevision, configuration }for a planned installation replacement.GET /operator/crawlers/control/history?site=...: last 20 revisions.GET /operator/crawlers/control/logs?site=...: bounded recent decisions.POST /operator/crawlers/control/alerts?site=...:{ expectedVersion, settings }to configure destinations/triggers.GET /operator/crawlers/control/deliveries?site=...: recent delivery statuses.
These controls do not enable paid request overages or change plan allowances. Database utilization, SQL query counts and money saved are not inferred from blocked requests.