Skip to main content

Goal

Configure storage, processing, rendering and delivery settings while preserving existing media and signing identity.

Prerequisites

  • Operator access to the existing private platform environment.
  • Known storage and edge configuration; the platform Compose file.

Workflow

1
Inventory the deployed environment and runtime values without printing secrets.
2
Preserve existing values and populate missing settings from verified configuration or documented defaults.
3
Select the spaces and output types that the installation should enable.
4
Check that the API and Assets workers receive matching values for each authorization boundary.

Scope and secret handling

This reference covers the ASSETS_* application configuration keys plus the Compose scratch setting. Additional shared dependencies such as DATABASE_URL, Redis/durable-job configuration, JWT_SECRET and optional OPENAI_API_KEY belong to the complete platform environment and must be preserved. Add these keys to the complete private platform environment. Do not replace the platform environment with a partial Assets set. Store operational values outside Git with owner-only permissions; never place credentials in frontend environment variables or Docker build arguments. The values below are defaults. Preserve existing working storage and signing values. 3D rendering requires server-side processing credentials and an explicit StackShift release mode.

Storage and origin delivery

  • ASSETS_BASE_PATH — Container path for Assets work/storage mounts; production Compose fixes this to /var/lib/stackshift/assets. Do not move existing storage by editing this value. Default: /var/lib/stackshift/assets.
  • ASSETS_MANAGED_STORAGE_BACKEND — Production requires the existing object backend. Generic application/Compose fallback is local; retain the deployed backend explicitly. Default: object.
  • ASSETS_MANAGED_OBJECT_ENDPOINT — Existing S3-compatible endpoint. Use the actual configured private/public storage service; do not substitute Cloudinary. Default: (empty).
  • ASSETS_MANAGED_OBJECT_REGION — Existing object-store signing region. Default: (empty).
  • ASSETS_MANAGED_OBJECT_BUCKET — Existing Assets bucket, not a new bucket created by this guide. Default: (empty).
  • ASSETS_MANAGED_OBJECT_ACCESS_KEY_ID — Server-only credential for the existing object store. Default: (empty).
  • ASSETS_MANAGED_OBJECT_SECRET_ACCESS_KEY — Server-only object-store secret; preserve or rotate through the storage owner. Default: (empty).
  • ASSETS_MANAGED_OBJECT_PREFIX — Existing object key prefix. Changing it is not a migration. Default: assets.
  • ASSETS_MANAGED_OBJECT_PATH_STYLE — Whether S3 requests use path-style addressing; preserve provider compatibility. Default: true.
  • ASSETS_CDN_BASE_URL — HTTPS customer-facing Assets delivery origin. Default: https://cdn.stackshift.cloud.
  • ASSETS_ORIGIN_BASE_URL — HTTPS API Assets origin behind delivery authorization. Default: https://api.stackshift.cloud.
  • ASSETS_EDGE_ORIGIN_TOKEN — Existing shared edge-to-origin credential; match the Worker ASSETS_ORIGIN_TOKEN (legacy ASSETS_EDGE_ORIGIN_TOKEN also supported). Default: (empty).
  • ASSETS_TRANSFORM_SIGNING_SECRET — Existing signing key; when previously unset it falls back to JWT_SECRET. Preserve that exact identity and match Worker ASSET_SIGNING_SECRET. Default: (empty).
  • ASSETS_REGION — Logical Assets region; not an instruction to provision replicas. Default: global.
  • ASSETS_REPLICATION_FACTOR — Preserve the actual deployment target. Production Compose defaults to one; setting three does not provision three replicas. Default: 1.

Processing and bounded resource controls

  • ASSETS_MAX_UPLOAD_BYTES — Maximum configured upload bytes, 524288000 by default; bucket/content policies can impose smaller limits. Default: 524288000.
  • ASSETS_MAX_TRANSFORMATION_WIDTH — Default maximum derived width in pixels. Default: 4096.
  • ASSETS_MAX_TRANSFORMATION_HEIGHT — Default maximum derived height in pixels. Default: 4096.
  • ASSETS_MAX_DERIVED_ASSETS_PER_ASSET — Default derived-output count limit for one asset. Default: 50.
  • ASSETS_MAX_DERIVED_ASSETS_PER_ACCOUNT — Default account derived-output count limit. Default: 5000.
  • ASSETS_PROVIDER_CONCURRENCY — External-provider concurrency; default two. This is not native video encode concurrency. Default: 2.
  • ASSETS_OCR_CONCURRENCY — OCR concurrency; default two. Default: 2.
  • ASSETS_SCRATCH_SIZE — Compose tmpfs size; the configured size is 8g. It is not an application feature switch. Default: 8g.
  • ASSETS_FFMPEG_PATH — FFmpeg executable in the worker image. Default: ffmpeg.
  • ASSETS_FFPROBE_PATH — FFprobe executable in the worker image. Default: ffprobe.
  • ASSETS_CLAMAV_ADDRESS — Native scanner service and port on the platform network. Default: clamav:3310.
  • ASSETS_NATIVE_VIDEO_ADMISSION — New native encode admission is enabled by default; an explicit false preserves delivery of existing packages. Default: true.
  • ASSETS_VIDEO_PROFILES — Comma-separated name:height:video-bitrate:audio-bitrate ladder; retain H.264/AAC and the configured recipe. Default: 240p:240:400k:64k,360p:360:800k:96k,480p:480:1400k:128k,720p:720:2800k:128k,1080p:1080:5000k:192k.
  • ASSETS_MODEL_PROCESSOR_IMAGE — Digest-pinned model preparation image. Model preparation follows ASSETS_3D_RELEASE_MODE once this is set. Default: (empty).
  • ASSETS_MODEL_RUNNER_SOCKET — Unix socket of the isolated model runner. Default: /run/stackshift-model-runner/runner.sock.
  • ASSETS_MODEL_SPOOL — Directory shared with the model runner for staged inputs. Default: /var/lib/stackshift/assets-model-spool.
  • ASSETS_MODEL_DAILY_JOBS — Model preparation runs each space can start per day. Default: 20.

Cloudflare control-plane configuration

  • ASSETS_CLOUDFLARE_ZONE_ID — Actual Cloudflare zone containing the Assets domain; verify the zone before reusing a platform identifier. Default: (empty).
  • ASSETS_CLOUDFLARE_ACCOUNT_ID — Cloudflare account that owns the existing Assets Worker. Default: (empty).
  • ASSETS_CLOUDFLARE_WORKER_SERVICE — Actual deployed Worker name. The checked-in edge example is stackshift-assets-gateway; do not create a duplicate service. Default: stackshift-assets-gateway.
  • ASSETS_CLOUDFLARE_API_TOKEN — Server-only token with the permissions needed by Assets zone/cache/custom-domain operations. Grant the specific zone/cache/custom-domain permissions used by your installation. Default: (empty).
  • ASSETS_CLOUDFLARE_API_BASE_URL — Cloudflare API base. Retain the official HTTPS endpoint in production. Default: https://api.cloudflare.com/client/v4.

3D rendering configuration

  • ASSETS_RENDER_CLOUD_NAME — Server-side 3D processing account namespace. Default: (empty).
  • ASSETS_RENDER_API_KEY — Server-side 3D processing key; must be supplied together with the account namespace and secret. Default: (empty).
  • ASSETS_RENDER_API_SECRET — Server-only 3D processing secret. Keep it available until outstanding cleanup is reconciled. Default: (empty).
  • ASSETS_3D_RELEASE_MODE — New-work admission for model preparation and rendering: disabled, allowlist, or all. ASSETS_3D_ALLOWLIST_SPACES lists canary space UUIDs when mode is allowlist. Delivery and cleanup continue while admission is disabled.

Existing AI and OCR-adjacent settings

  • ASSETS_AI_PROVIDER — Existing optional Assets AI provider selection; preserve current production configuration. Default: openai.
  • ASSETS_OPENAI_VISION_MODEL — Model identifier used by opt-in vision analysis; the template default is not an instruction to change an existing deployment. Default: gpt-5.6-luna.
  • ASSETS_OPENAI_MODERATION_MODEL — Existing AI moderation model; native video validation does not require AI video-content approval. Default: omni-moderation-latest.
  • ASSETS_OPENAI_TRANSCRIBE_MODEL — Opt-in transcript model. Uploaded captions do not call automatic transcription. Default: gpt-4o-transcribe.
  • ASSETS_OPENAI_IMAGE_EDIT_MODEL — Existing image-edit model. Default: gpt-image-2.
  • ASSETS_AI_EVAL_APPROVED_MODELS — Comma-separated evaluated model allowlist for existing AI operations; not video human-review approval. Default: gpt-5,gpt-5.6-luna,omni-moderation-latest,gpt-4o-transcribe,gpt-image-1.5,gpt-image-2.
  • ASSETS_AI_MAX_IMAGE_BYTES — Maximum image bytes for existing AI requests. Default: 10485760.
  • ASSETS_AI_MAX_AUDIO_CHUNK_BYTES — Maximum audio bytes per existing AI chunk. Default: 25000000.
  • ASSETS_AI_AUTO_QUARANTINE — Preserve existing AI policy behavior; not a substitute for native malware scanning. Default: true.
  • ASSETS_AI_VISION_INPUT_MICROS_PER_MTOK — Existing internal cost-model default for vision input, in micro-units per million tokens; not a verified provider price quote. Default: 1000000.
  • ASSETS_AI_VISION_OUTPUT_MICROS_PER_MTOK — Existing internal cost-model default for vision output. Default: 6000000.
  • ASSETS_AI_TRANSCRIBE_INPUT_MICROS_PER_MTOK — Existing internal cost-model default for transcription input. Default: 2500000.
  • ASSETS_AI_TRANSCRIBE_OUTPUT_MICROS_PER_MTOK — Existing internal cost-model default for transcription output. Default: 10000000.
  • ASSETS_AI_IMAGE_EDIT_MICROS_PER_IMAGE — Existing internal cost-model default per image edit. Default: 100000.

API, worker and edge consistency

The Compose configuration passes native-video and 3D rendering settings only to the API and dedicated Assets workers, including green release slots. Processing credentials must not be included in frontend, general-worker, or Mail-submission environments. ASSETS_SCRATCH_SIZE configures worker tmpfs. Production Assets workers retain two CPUs, four GiB RAM, eight GiB scratch and the existing shared release fence. Worker ASSET_SIGNING_SECRET must match API ASSETS_TRANSFORM_SIGNING_SECRET, and Worker ASSETS_ORIGIN_TOKEN must match API ASSETS_EDGE_ORIGIN_TOKEN. ASSETS_ORIGINS_JSON maps regions to HTTPS API origins; ASSETS_COLO_REGION_JSON optionally maps colos to those regions. Configure matching values on both sides of each authorization boundary.

Expected result

Storage and signing identity are preserved, and the selected spaces and media outputs have the intended settings.

Common failures

  • Replacing the complete platform environment with a partial Assets overlay.
  • Changing a fallback signing key and unintentionally invalidating current delivery URLs.
  • Treating a configured no-overage flag as provider-enforced spending protection.

Operator reference: Assets rollback and admission controls

Configure product rendering and roll back processing admission without interrupting existing delivery.

3D Studio: variants, product media and AR

Prepare a GLB, pin governed texture variants, estimate rendering units, create verified product media and publish 3D or AR experiences.

Native video processing and secure playback

Version-pinned video packages, scan and review gates, replacement behavior, playback sessions, API routes, and failure recovery.