n8n source control and environments

Separate n8n development, staging and production instances can sync workflows through Git, but the feature requires the Business plan or Enterprise. Here is how the setup works and what to confirm first.

On this page

What n8n source control gives a team running several instances

n8n source control and environments let a team build workflows in a development instance, keep them in a Git repository, and promote them to staging and production by pulling a versioned change instead of rebuilding it in a live editor. A team needs this once it runs more than one n8n instance and must move changes through a fixed sequence with a record of who changed what and when. Without it, promotion usually means exporting JSON by hand, copying it into production, and hoping nobody edited the live copy in the meantime. That gap is hard to audit and harder to roll back.

Plan the budget before you plan the branches. n8n's pricing page states that environments with Git are included only in the Business and Enterprise plans, so a Community or Starter setup cannot use this feature. Business is listed at 667 euros per month billed annually and is currently self-hosted only. Enterprise is custom priced and is available for self-hosted or cloud deployments. Confirm with n8n whether each instance in your promotion chain needs its own license, how the monthly rate is billed for multiple environments, and whether the Git feature is available in the exact deployment model you plan to run. The plan fee is recurring. Any DeployOpen implementation work is quoted separately from a written scope.

Several mechanics decide whether this fits your process, and you should confirm each one against current n8n documentation before design. Confirm how branches map to instances, whether a given environment reads one branch or can be pointed at another, and how push and pull permissions are assigned to users or roles. Confirm what travels with a workflow, such as folders, variables and credential references, and what stays local to each instance. Confirm how the interface reports conflicts when the same workflow changed in two places. Write these answers down as questions for the vendor, then check them in a test instance connected to a throwaway repository before you rely on them.

The decisions that matter most are organizational. Choose who may push changes out of development, who may pull into production, and whether anyone can bypass the staging step during an incident. Decide where the Git repository lives and who administers it, because the repository becomes the record of what production should be running. Plan how environment-specific values, such as endpoints and test accounts, will differ between instances without being edited by hand in production. Run a two-instance rehearsal, promote one harmless workflow, and confirm that the change lands, that permissions behave as written, and that a rollback is possible before the process goes live.

Which n8n plan and environment layout fits your team

This table compares the three n8n paths for moving workflows between development, staging and production: the free Community edition with manual export and import, the Business plan for Git-backed environments, and Enterprise for custom terms. Read each row for what n8n's pricing page lists, which team size or change pattern it suits, and what your team still runs itself. The main takeaway is that Git-backed environments sit on a paid plan, so the choice depends on how often changes move between stages.

OptionWhat the pricing page listsSuitsLeft for your team
Community edition (free, self-hosted)Free self-hosted edition. The pricing page says all plans include unlimited users, workflows and integrations, but lists no Git-backed environments for this edition.Small teams with infrequent changes, or a team that is comfortable promoting workflows by hand.Exporting and importing workflows between stages, tracking which version is live, reviewing changes, and keeping credentials consistent across instances. Confirm the export and import steps for your version.
Business (self-hosted only)667 euros per month billed annually, per n8n's pricing page. Includes environments with Git, SSO and LDAP, and log streaming.Teams that promote changes regularly across separate instances and want Git history and reviewed changes.Designing the Git repository and branching model, deciding who can push and pull, hosting the separate instances, and managing access to the Git platform. Confirm the environment setup steps for your version.
Enterprise (custom pricing)Custom pricing for self-hosted or cloud. Per n8n's pricing page, it adds dedicated support with an SLA. Multi-main high availability is restricted to Enterprise self-hosted deployments.Organizations that need contractual support terms, multi-main high availability, or custom license terms.Negotiating terms and confirming in writing which features the quote includes. The team still builds and runs the Git workflow, environments and promotion process.
Choosing before you buyPlan features change over time, so the pricing page is the reference for what each plan includes at purchase.Any team comparing the options before a budget decision or a rollout date.Checking the current pricing page, asking the vendor to confirm features in writing, and mapping your change frequency and number of stages to a plan before you commit.

How dev, staging and production map to Git branches

Start with the branch model, because it decides how changes reach production and how easily they can be reversed. A common pattern runs one n8n instance per environment: development, staging and production. Each instance is tied either to its own branch or to a deliberate promotion path in which a change moves forward through gates you define. For example (illustrative), a team might keep develop, staging and main branches, with the development instance reading develop, the staging instance reading staging and the production instance reading main. Another team might keep a single main branch and promote by tag. Both can work, but they produce different review histories and different rollback steps, so choose the model before the first production workflow is built.

The model shapes review. When each environment reads its own long-lived branch, promotion is a merge between branches, and the diff between branches shows what staging has that production does not yet have. That is useful for audit, but branches can drift if a hotfix lands in production and never returns to development. A single-branch model with tags keeps one history and makes each promoted version a fixed point, but reviewers then depend on tag discipline and on your own record of which workflows changed. For rollback, ask what reverting means in each model: reverting a commit, redeploying an earlier tag, or restoring a workflow to an earlier state inside n8n. These actions affect running executions, scheduled triggers and credentials differently, so test each one.

Several details must come from n8n's documentation before you design around them, because the material available to you does not settle them. First, confirm which branch each instance reads and where that setting lives, including whether it can change without redeploying the instance. Second, confirm whether promotion is a merge performed in Git, a pull initiated from within the target instance, or a push from development, and who is allowed to trigger it. Third, confirm how deleted workflows are handled: whether deleting a workflow in development removes it from the branch, whether a pull removes it from staging or production, and what happens to webhooks, schedules and executions that depend on it. Record each answer with the n8n version you tested, since behavior can change between releases.

Test these answers in a sandbox before any production workflow depends on them. Create a throwaway workflow in development, promote it, delete it in development, pull again and observe each step. Repeat once with a change made directly in production so you can see how drift appears and how your team would correct it. Check the plan requirement early: n8n's pricing page lists environments with Git as a Business and Enterprise feature, and it lists the Business plan at 667 euros per month billed annually, currently self-hosted only. Ask any implementation partner to quote the three instances, the Git host, the review process and the promotion runbook as separate lines, so you can see which costs are one-time setup and which recur.

Setting up n8n source control across three environments

This sequence takes a self-hosted n8n setup from one instance to three linked environments, with development, staging and production each tied to its own Git branch. Each step ends with a check, so the team confirms that promotion works before any production workflow depends on it.

  1. Confirm the Business or Enterprise plan

    Confirm in writing that the license covering each instance includes environments with Git. According to n8n's pricing page, environments with Git are included only in the Business and Enterprise plans. The Business plan is currently self-hosted only and is listed at 667 euros per month billed annually, so ask your finance team to confirm the current price and billing terms before you commit. Done when the plan is named in your order and the source control settings appear in an instance you control.

  2. Host the Git remote with access controls

    Choose where the repository will live, such as a self-managed Git server your team already operates, and set its access model before any n8n instance connects. Grant write access only to the named users or service accounts that push and pull each branch, and block direct pushes to the production branch. Set a backup schedule for the repository and test a restore, because the change history of every workflow depends on it. Done when all three planned n8n hosts can reach the repository and a test restore has completed.

  3. Create one n8n instance per environment

    Provision three separate self-hosted n8n instances for development, staging and production. Each should have its own database, its own encryption key and its own admin account, so a fault or credential exposure in one environment stays contained. Keep the n8n versions aligned across environments so that a promoted workflow behaves the same way in each. Check n8n's documentation on whether credentials travel with promoted workflows, and plan staging data accordingly. Done when each instance starts, loads its own login page and shows its environment label.

  4. Connect each instance to its branch

    In each instance, open the source control settings, point it at the Git remote and select the branch that matches its role: development to a development branch, staging to a staging branch and production to the main branch. Use a separate deploy credential per instance so that access can be revoked for one environment without affecting the others. Done when each instance shows its connected branch and a pull from the remote completes without errors. If a pull fails, check the credential scope and the branch name first.

  5. Make a test change in development

    Create a small test workflow in the development instance, for example a schedule trigger that sets one field, and give it a clearly recognizable name. Commit it from the source control panel and push it to the development branch with a descriptive message. Done when the commit and the workflow file appear in the development branch of the remote, and the development instance reports the workflow as pushed. Staging and production should show no change at this stage.

  6. Run a test promotion to staging

    Promote the test workflow by merging the development branch into the staging branch through your Git hosting workflow, then pull the change into the staging instance. Confirm that the workflow appears in staging only after the pull or merge completes, and that production still does not show it. Run the workflow in staging and confirm whether it needs credentials configured there first. Done when the workflow appears in staging after the defined pull and the production instance is unchanged.

  7. Document the promotion and rollback path

    Write a short runbook that names who may push to each branch, who approves a merge into the production branch, and how a bad promotion is reversed. Reversal can mean reverting the merge in Git and pulling the result into the instance, so write down the exact steps. Test the reversal once on the staging path using the same steps planned for production. Done when the people who will operate the environments have walked through the runbook and the staging rollback restores the expected prior state.

Who can push and pull workflows between environments

The decision in this section is which people may move workflow changes in each direction: committing from development, pulling into staging, and approving promotion to production. Treat these as three separate permissions. In a self-hosted n8n setup with environments enabled, the person who edits a workflow in development may be a builder who should not also decide when that change reaches customer-facing automations. Write the mapping down before anyone configures Git. For each role, list who may commit, who may pull into staging, who may approve production changes, and who may only read. A useful test is whether every push and pull can be traced to one named person.

Role design matters for audit trails because a production change review depends on answering three questions: who committed the change, who approved it, and whether that approver had the authority to do so. If several people share one admin account, or one role can both commit and approve, the history shows that something happened but not that a control operated. Separation of duties also limits what a single careless or compromised account can do. Ask n8n how the environment history records the acting user for each commit and each pull, and confirm how long those records are retained in your deployment so they match your own evidence requirements.

Role design also prevents accidental overwrites. An environment pull replaces a workflow definition on the target instance, so a pull into staging or production can silently discard a version that someone is still editing there. Decide whether hotfixes made directly in staging or production are allowed at all. If they are, define who must bring those changes back into Git and how quickly. Restrict production pulls to a small group, and require that the source branch is the reviewed one. Also decide how credentials and environment-specific settings are handled during a pull, and confirm the current behavior in n8n's documentation before any production workflow depends on it.

Before the design is final, confirm the exact role names and permission model in the current n8n user management documentation. Then run a walkthrough in a Business trial or with n8n under the contract, using a test Git repository and two non-production instances. Check which actions each role can perform in the environments feature, whether approval is enforced by the product or only by process, and whether your Git host's branch protection rules must be part of the control. The Business plan is the lowest plan listed with environments and Git, so confirm that the roles you need exist at that level. Include the cost of this walkthrough and the recurring review of role assignments when staff change in your quote.

Security risks when promoting workflows between environments

Moving workflows from development to staging to production through Git puts credentials, approvals, configuration and history on a new path. The cards below describe five risks that tend to appear in that path and one practical control for each, because n8n's environment feature does not prevent these risks by default.

Credentials committed to Git

Workflow exports can carry credential references, parameter values or pinned data that include tokens or passwords typed directly into nodes. Once such a value reaches the repository, it stays in history even after a later commit removes it. Before enabling pushes, check exported files for secrets, keep real credentials in the n8n credential store or an external secrets provider, and run a secret scanner in the repository pre-commit or CI step.

Production changed without review

If developers can push to the branch that production pulls from, a workflow change can reach a live instance without anyone else reading it. A change that looks small in the canvas can alter triggers, outbound destinations or data handling. Protect the production branch so changes require a merge request with at least one approver, and confirm who can merge to it in your Git platform settings.

Drift between instances

Staging and production can diverge when someone edits a workflow directly on one instance, changes a setting in the interface, or pulls a version that was never promoted. Over time, testing on staging stops describing what runs in production. Schedule a comparison of workflow lists, versions and key settings between environments, and treat any unexplained difference as an incident to investigate before the next promotion.

Git access grants workflow control

Anyone with push rights to the repository can change what an n8n instance does once it pulls, and the instance pulls with its own permissions. A compromised Git account can therefore alter automations that hold access to business systems. Limit write access to named maintainers, require multi-factor authentication for Git accounts, and use a deploy credential on each instance that can read only the branch it tracks.

Lost history after a rollback

When a bad workflow reaches production, the fastest fix is often a revert, but a revert on the production branch does not restore instance settings, credentials or execution data that changed in the same window. Records of who changed what may also be scattered across the canvas, the instance and the repository. Write a rollback procedure that names the commit to restore, keeps a backup of the production database before a promotion, and records each promotion in a commit or release tag.

Keeping credentials and encryption keys separate per environment

Each n8n instance keeps its own credentials. Those credentials are stored in the database that instance uses, and they are encrypted with the instance's encryption key. When you run separate development, staging and production instances, the first design question is whether those instances should share an encryption key at all. Sharing a key makes it simpler for credentials to be read across instances, but it also means that a leak of the key in one environment exposes the credentials of every environment that uses it. Decide this before the first workflow is promoted, not after. Queue mode changes the picture for production. The n8n queue mode documentation requires the main instance's encryption key to be shared with every worker and webhook processor, because those processes must decrypt credentials stored in the database to run workflows. That means the production key is not confined to the main instance. It is also present on each worker and webhook host, in their configuration and environment. Your threat model and your host access controls should treat every processor as a holder of the production key, and your secret handling should reflect that.

Copying a production encryption key into development is the risk to weigh most carefully. A developer workstation, a shared test server or a development database restored from production backups may then hold the key that protects live credentials to payment, HR or customer systems. Development environments are usually less tightly controlled, and their logs, exports and backups are often copied more freely. If the key leaks, an attacker who obtains the production database dump could decrypt those credentials. A safer pattern is a distinct key per environment, with development and staging using their own credentials pointing at sandbox systems. Illustrative example: a team restores a production database into staging for testing. Unless the key is also changed or the restored credentials are removed, the staging host now protects production secrets with a staging-grade control set. Before you rely on any promotion process, confirm with n8n exactly how credentials move between environments, or whether they move at all. Ask whether credential records are exported with the workflow definition, whether they are exported encrypted, and whether the encryption key is required to import them into another instance. Ask whether a credential reference inside a workflow survives promotion, or whether the target environment must recreate the credential and rebind it. Also confirm how the Git-backed environment feature handles credential data, because a workflow file in a repository should not carry secret values. Turn these answers into a written rule for your team: which key each environment uses, who may read it, where it is stored, how it is rotated, and what must be recreated rather than copied during promotion. Test the rule with a restore drill into a non-production instance before any real credential is involved. Confirm all of this against the current n8n documentation and against your own environment, since the controls available depend on your plan and deployment.

Limits to confirm before you buy the Business plan

Business is the plan that includes environments with Git, but it comes with limits that affect how you deploy and license your instances. Each card names a point to confirm with n8n in writing or to test in a sandbox instance before you buy.

Self-hosted availability of Business

The n8n pricing page lists the Business plan as currently self-hosted only, while the Starter and Pro plans are offered as cloud plans. Ask n8n in writing whether Business applies to your deployment model, including any cloud-hosted instance you run in your own cloud account, and whether that position is expected to hold. Record the answer with its date, because the word currently signals that the offer may change.

Business and Enterprise feature split

The pricing page places SSO and LDAP, environments with Git and log streaming in the Business and Enterprise plans, and adds dedicated support with an SLA for Enterprise. Request the current feature matrix in writing and list the environment capabilities you need, such as which roles can push and pull and how changes move between environments. Confirm each item in a sandbox instance before you commit to a plan.

Multi-main high availability requirement

The multi-main setup, which runs several main instances for high availability, is restricted to Enterprise self-hosted deployments. Business does not cover it according to the queue mode documentation. Decide whether your recovery targets need several main instances, or whether queue mode with one main instance and tested restore procedures is acceptable. If multi-main is required, request an Enterprise quote before you buy Business.

Internal use under the Sustainable Use License

The Sustainable Use License permits use or modification of n8n for your own internal business purposes. Have counsel confirm that your planned use fits those terms, including whether outside consultants or affiliates will operate the instance and whether workflows will be shared beyond your company. Also check whether your Git-backed setup or custom code touches files with .ee in their name, because those files require a valid n8n Enterprise License.

Version-specific behavior in the current line

n8n uses semantic versioning and ships minor releases roughly weekly, and version 2.43 was released on 6 October 2026. Environment and source control behavior can change between minor releases, so ask n8n which release introduced or changed the features you need. Run push, pull and promotion tests on the exact version you plan to deploy, and repeat those tests before every upgrade.

What does n8n source control cost and how long does setup take?

How much does the n8n Business plan cost for environments with Git?

The Business plan is listed on n8n's pricing page at 667 euros per month billed annually, and n8n lists environments with Git as included only in the Business and Enterprise plans. The Business plan is currently self-hosted only, which matches this setup. That figure covers the n8n license only. Confirm the current rate directly with n8n before you budget, because pricing pages change and the listed figure excludes any VAT, reseller margin or contract terms that apply to your purchase. Because the plan is billed annually, plan for one yearly invoice and ask your procurement team how that invoice will be recorded.

Does the n8n license cost include the Git server and the three instances?

No. The n8n license covers software use only. The development, staging and production instances, along with the Git remote, run in your own infrastructure, so you pay for compute, storage, networking, backups and the staff who operate them. For the Git remote, GitLab's pricing page lists GitLab Free at 0 dollars and Premium at 29 US dollars per user per month billed annually, and all tiers are available for self-managed installations. Confirm that the tier you choose supports the branch protection and approval rules your review process needs. No hosting figure for the three instances is supplied here, so have your infrastructure team cost them from your own rates.

Which n8n source control costs are one-time and which recur?

One-time costs usually include designing the branch model, building the three environments, mapping credentials and environment-specific values, setting up the review workflow, testing promotion from development to production, and writing the runbook. Recurring costs include the n8n Business subscription, any paid Git seats, hosting for all four systems, backups and monitoring, and the time needed for n8n and Git upgrades. Support or a retainer is recurring if you choose one. Ask the quote to separate these two groups, so you can see which amounts you will pay once and which will continue for as long as the setup runs.

What makes n8n source control setup effort go up or down?

Effort rises with the complexity of the branch model, such as long-lived feature branches, several release lines or per-team environments. The number of workflows matters because each one needs to be exported, reviewed and tested through each environment. Credential count and handling add work, especially where credentials differ by environment or must stay out of the repository. The review process also drives effort: a single approver with clear rules is simpler than multi-stage approval with audit requirements. Other factors include the number of people who push and pull, any community nodes, and whether queue mode is in use. Each factor should appear as a line item in the written scope.

How long does n8n source control setup take to complete?

No duration can be stated from the supplied facts, so the timeline depends on the written scope. The main variables are the factors listed above, along with access provisioning, the availability of a test instance and the speed of your review cycles. Ask the proposal for phases with dependencies, the people who must act at each step and the point at which your team takes ownership. Illustrative example: a team with one branch model, a small workflow set and a single approver will usually move through the phases faster than a team with many workflows, several branch models and a multi-stage approval process. Treat any single figure without a written scope as unverified.

Can our own team set up n8n source control without outside help?

Yes, a team with n8n administration experience and Git administration experience can build this internally. The work needs someone who understands n8n export and import, another person who manages the Git remote and access controls, and time to test promotion between environments before production use. Plan for the team to validate that credentials are not committed to the repository, that environment-specific values are handled correctly and that a rollback works. Outside help is most useful when the team lacks one of those skills, when the timeline is fixed or when an independent review of the design is required. Either path should end with a documented, tested process.

What does our organization need to provide for the setup work?

Ask for these inputs in writing before the work starts:

  • A named owner on your side who makes decisions about branch model, approvals and release timing.
  • A Git administrator who can create repositories, groups, protected branches and access roles on the remote.
  • Access to a test instance that matches your production configuration closely enough to test promotion.
  • Reviewers who can approve changes within the timeline you agree.
  • Licensing in place for the n8n Business plan, and hosting capacity for all four systems.

If any of these are missing, the schedule and scope should reflect that gap.

What should we request in a written quote for this work?

Request a quote that states the scope in writing, including the number of instances, the Git hosting assumptions, the workflows and credentials in scope, and the branch and review model. List the deliverables, such as the configured environments, the documented process and the handover session. Include acceptance criteria that describe how your team will confirm each deliverable works. Ask for explicit exclusions, including n8n license fees, hosting costs and any work on other n8n features. Also ask for the assumptions behind the effort estimate, the phases and dependencies, the change process if scope moves, and the support terms after handover. DeployOpen prepares quotes from the written scope, so a clear scope produces a clearer quote.

How DeployOpen scopes and supports n8n environments

DeployOpen plans, builds and hands over n8n source control and environments on infrastructure you control, from the Git branch model through to the promotion steps your team runs. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts. Ongoing support is available as a retainer.

How we scope

  • Confirm the n8n edition and plan, including whether Business or Enterprise is needed for Git environments.
  • Map which instances become development, staging and production, and who may push and pull each one.
  • Record the written scope with license checks, hosting boundaries, Git provider and the environment promotion model.

How we build

  • Set up separate n8n instances, each with its own database, encryption key and storage, on infrastructure you control.
  • Connect each environment to its Git branch and configure the pull and push flow your team agreed in scoping.
  • Test promotion from development through staging to production, and record the results in the handover documentation.

How we hand over

  • Document the environment map, branch model, access roles and the steps for pushing and pulling workflows.
  • Deliver runbooks for backups, restores and adding or removing a user from each environment.
  • Walk your team through promotion, rollback and the review steps before the engagement closes.

How we support

  • Plan upgrades per environment, starting with staging, so workflow changes are checked before production.
  • Keep access reviews and Git branch rules under periodic review as your team and workflows change.
  • Offer ongoing support and upgrades as a retainer, with scope and response expectations agreed in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.