Skip to content

docs: update N1 config sync steps for v3 #825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ When you plan Config Sync Groups, consider the following factors:

- **Single Config Sync Group membership**: You can add an instance to only one Config Sync Group.

- **NGINX Agent configuration file location**: When you run the NGINX Agent installation script to register an instance with NGINX One, the script creates the `agent-dynamic.conf` file, which contains settings for the NGINX Agent, including the specified Config Sync Group. This file is typically located in `/var/lib/nginx-agent/` on most systems; however, on FreeBSD, it's located at `/var/db/nginx-agent/`.
- **NGINX Agent configuration file location**: When you run the NGINX Agent installation script to register an instance with NGINX One, the script creates the `nginx-agent.conf` (or `agent-dynamic.conf` if you are using NGINX Agent 2.x) file, which contains settings for the NGINX Agent, including the specified Config Sync Group. This file is typically located in `/etc/nginx-agent/` on most systems.

- **Mixing NGINX Open Source and NGINX Plus instances**: You can add both NGINX Open Source and NGINX Plus instances to the same Config Sync Group, but there are limitations. If your configuration includes features exclusive to NGINX Plus, synchronization will fail on NGINX Open Source instances because they don't support these features. NGINX One allows you to mix NGINX instance types for flexibility, but it’s important to ensure that the configurations you're applying are compatible with all instances in the group.

Expand All @@ -104,6 +104,28 @@ Any instance that joins the group afterwards inherits that configuration.

You can add existing NGINX instances that are already registered with NGINX One to a Config Sync Group.

{{< tabs name="Add existing instance to Config Sync Group" >}}

{{%tab name="NGINX Agent 3.x"%}}

1. Open a command-line terminal on the NGINX instance.
2. Open the `/etc/nginx-agent/nginx-agent.conf` file in a text editor.
3. Find or create the `labels` section and change the `config_sync_group` label to the name of the new Config Sync Group.

``` text
labels:
config_sync_group: <config_sync_group>
```

4. Restart NGINX Agent:

``` shell
sudo systemctl restart nginx-agent
```

{{%/tab%}}
{{%tab name="NGINX Agent 2.x"%}}

1. Open a command-line terminal on the NGINX instance.
2. Open the `/var/lib/nginx-agent/agent-dynamic.conf` file in a text editor.
3. At the end of the file, add a new line beginning with `instance_group:`, followed by the Config Sync Group name.
Expand All @@ -118,6 +140,9 @@ You can add existing NGINX instances that are already registered with NGINX One
sudo systemctl restart nginx-agent
```

{{%/tab%}}
{{< /tabs >}}

### Add a new instance to a Config Sync Group {#add-a-new-instance-to-a-config-sync-group}

When adding a new NGINX instance that is not yet registered with NGINX One, you need a data plane key to securely connect the instance. You can generate a new data plane key during the process or use an existing one if you already have it.
Expand Down Expand Up @@ -185,6 +210,29 @@ For more details on creating and managing data plane keys, see [Create and manag

If you need to move an NGINX instance to a different Config Sync Group, follow these steps:

{{< tabs name="Move instance to Config Sync Group" >}}

{{%tab name="NGINX Agent 3.x"%}}

1. Open a command-line terminal on the NGINX instance.
2. Open the `/etc/nginx-agent/nginx-agent.conf` file in a text editor.
3. Find the `labels` section and change the `config_sync_group` label to the name of the new Config Sync Group.

``` text
labels:
config-sync-group: <new_config_sync_group>
```

4. Restart NGINX Agent by running the following command:

```shell
sudo systemctl restart nginx-agent
```

{{%/tab%}}
{{%tab name="NGINX Agent 2.x"%}}


1. Open a command-line terminal on the NGINX instance.
2. Open the `/var/lib/nginx-agent/agent-dynamic.conf` file in a text editor.
3. Locate the line that begins with `instance_group:` and change it to the name of the new Config Sync Group.
Expand All @@ -199,12 +247,39 @@ If you need to move an NGINX instance to a different Config Sync Group, follow t
sudo systemctl restart nginx-agent
```

{{%/tab%}}
{{< /tabs >}}


If you move an instance with certificates from one Config Sync Group to another, NGINX One adds or removes those certificates from the data plane, to synchronize with the deployed certificates of the group.

### Remove an instance from a Config Sync Group

If you need to remove an NGINX instance from a Config Sync Group without adding it to another group, follow these steps:


{{< tabs name="Remove instance from Config Sync Group" >}}

{{%tab name="NGINX Agent 3.x"%}}

1. Open a command-line terminal on the NGINX instance.
2. Open the `/etc/nginx-agent/nginx-agent.conf` file in a text editor.
3. Locate the line that begins with `labels:` section and either remove the `config-sync-group` line or comment it out by adding a `#` at the beginning of the line.

```text
labels:
# config-sync-group: <new_config_sync_group>
```

4. Restart NGINX Agent:

```shell
sudo systemctl restart nginx-agent
```

{{%/tab%}}
{{%tab name="NGINX Agent 2.x"%}}

1. Open a command-line terminal on the NGINX instance.
2. Open the `/var/lib/nginx-agent/agent-dynamic.conf` file in a text editor.
3. Locate the line that begins with `instance_group:` and either remove it or comment it out by adding a `#` at the beginning of the line.
Expand All @@ -219,6 +294,10 @@ If you need to remove an NGINX instance from a Config Sync Group without adding
sudo systemctl restart nginx-agent
```

{{%/tab%}}
{{< /tabs >}}


By removing or commenting out this line, the instance will no longer be associated with any Config Sync Group.

## Publish the Config Sync Group configuration {#publish-the-config-sync-group-configuration}
Expand Down