#1504·postiz-app

Self-hosted Temporal: backend crashes on startup with "cannot have more than 3 search attribute of type Text"

Author: Call-OnDadCreated May 8, 2026Updated Sep 29, 2026
Labelstype: bugstale

Description

Environment Postiz: ghcr.io/gitroomhq/postiz-app:latest (as of May 2026) Temporal: temporalio/auto-setup:latest Deployment: self-hosted Docker Compose Problem The Postiz backend crashes on every fresh install when using the recommended temporalio/auto-setup image. The backend process exits with:

[Error: 3 INVALID_ARGUMENT: Unable to create search attributes: cannot have more than 3 search attribute of type Text.] Backend failed to start on port 3000 Root cause temporalio/auto-setup ships with two default Text-type search attributes pre-created:

CustomTextField CustomStringField Temporal's community/OSS edition enforces a hard limit of 3 Text-type search attributes. On startup, TemporalRegister.onModuleInit() attempts to add two more (organizationId and postId), bringing the total to 4 — which exceeds the limit and crashes the backend.

The relevant code in libraries/nestjs-libraries/src/temporal/temporal.register.ts:

const neededAttribute = ['organizationId', 'postId']; const missingAttributes = neededAttribute.filter((attr) => !customAttributes[attr]); if (missingAttributes.length > 0) { await connection.operatorService.addSearchAttributes({ ... }); } Workaround Before starting Postiz, shell into the postiz-temporal container and remove the unused default attributes:

docker exec postiz-temporal temporal operator search-attribute remove
--name CustomTextField --name CustomStringField --yes Then restart the Postiz container. The backend starts successfully.

Suggested fixes Add a compose init step (similar to the existing postiz-init pattern) that removes the default Text attributes before Postiz starts — so it works out of the box on fresh installs. Graceful error handling — catch the INVALID_ARGUMENT search attribute error in TemporalRegister.onModuleInit() and log a warning rather than crashing the entire backend. Use a custom Temporal image or environment variable to suppress the default custom attributes at Temporal startup. Related: env var mismatch Community Docker Compose examples (and some third-party guides) use TEMPORAL_INTERNAL_URL for the Temporal address, but the actual code in temporal.module.ts reads process.env.TEMPORAL_ADDRESS. Using the wrong name silently falls back to localhost:7233, causing a connect ECONNREFUSED error that looks unrelated to the env var issue. It may be worth adding TEMPORAL_ADDRESS to .env.example to make this discoverable

Reproduction steps

Deploy Postiz using Docker Compose with temporalio/auto-setup:latest as the Temporal service Ensure TEMPORAL_ADDRESS is correctly set to the Temporal container (e.g. postiz-temporal:7233) Start the stack: docker compose up -d Wait for postiz-temporal to report healthy Observe postiz container crash-looping — docker logs postiz shows: [Error: 3 INVALID_ARGUMENT: Unable to create search attributes: cannot have more than 3 search attribute of type Text.] Backend failed to start on port 3000 Confirm the cause by listing Temporal's existing search attributes: docker exec postiz-temporal temporal operator search-attribute list Output includes CustomTextField and CustomStringField (both Text type) — 2 of the 3 available slots already occupied before Postiz attempts to register its own

Expected behavior

Backend starts successfully and registers organizationId and postId as search attributes

Actual Behavior with Screenshots

Backend exits immediately on every startup attempt with an INVALID_ARGUMENT error from Temporal

Operating system

Linux

Node Version

Node.js v22.20.0

Provide any additional context for the Bug.

No response

Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

None