n8n - 💡(How to fix) Fix N8n bug cli publish

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

CLI publish/unpublish commands should notify the running n8n process to deactivate/reactivate the workflow and its triggers, matching the behavior of the UI Publish/Unpublish action. If this is technically not possible, the commands should fail with a clear error instead of silently writing to the DB.

  • error: all
RAW_BUFFERClick to expand / collapse

Bug Description

The CLI commands n8n publish:workflow and n8n unpublish:workflow (and their deprecated predecessors n8n update:workflow --active=true/false) only write to the database. They do not notify the running n8n process to deactivate or reactivate triggers.

Each command even prints a warning: "Note: Changes will not take effect if n8n is running. Please restart n8n for changes to take effect if n8n is currently running."

This makes the commands effectively useless in any production scenario where n8n is running — which is virtually always. A CLI publish/unpublish should either affect the running process (like the UI does) or not exist as a command.

To Reproduce

  1. Start n8n with at least one active workflow containing a trigger (e.g. IMAP, Webhook, Cron)
  2. Confirm the workflow is active and the trigger is connected
  3. Run: n8n unpublish:workflow --id=<workflow-id>
  4. Observe: the command prints "Workflow unpublished successfully" followed by the warning about changes not taking effect
  5. Check the running n8n process: the workflow is still active, trigger still connected, no deactivation logged
  6. Run: n8n publish:workflow --id=<workflow-id>
  7. Same result: database updated, running process unaffected

The only way to actually restart a trigger is via the UI (Publish button) or a full container restart.

Expected behavior

CLI publish/unpublish commands should notify the running n8n process to deactivate/reactivate the workflow and its triggers, matching the behavior of the UI Publish/Unpublish action. If this is technically not possible, the commands should fail with a clear error instead of silently writing to the DB.

Debug Info

core

  • n8nVersion: 2.20.7
  • platform: docker (self-hosted)
  • nodeJsVersion: 24.14.1
  • nodeEnv: production
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: fb4613cc-eb98-48aa-bfc4-d1649f71047d

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

Generated at: 2026-05-21T08:23:39.834Z

Operating System

Ubuntu 24.04

n8n Version

2.20.7

Node.js Version

24.14.1

Database

SQLite (default)

Execution mode

main (default)

Hosting

self hosted

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

CLI publish/unpublish commands should notify the running n8n process to deactivate/reactivate the workflow and its triggers, matching the behavior of the UI Publish/Unpublish action. If this is technically not possible, the commands should fail with a clear error instead of silently writing to the DB.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

n8n - 💡(How to fix) Fix N8n bug cli publish