# Change Controller Adresse/Port or migrate to a new controller

**URL:** <https://openziti.discourse.group/t/change-controller-adresse-port-or-migrate-to-a-new-controller/3495>\
**Category:** General Questions\
**Created:** [November 26, 2024, 5:04pm UTC](https://openziti.discourse.group/t/change-controller-adresse-port-or-migrate-to-a-new-controller/3495 "2024-11-26T17:04:53Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![qrkourier](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/qrkourier/32/52_2.png) [@qrkourier](https://openziti.discourse.group/u/qrkourier)\
**Post date:** [December 2, 2024, 5:17pm UTC](https://openziti.discourse.group/t/change-controller-adresse-port-or-migrate-to-a-new-controller/3495/21 "2024-12-02T17:17:18Z")

</div>

> [@tekook](#):
>
> Should the routers upgrade their config.yml automatically? I restarted one of my private routers but the config does not reflect the new change.

The controller and router deployments for Linux and Docker utilize Ziti's built-in one-shot config generator and will not re-generate their config.yml unless you set `ZITI_BOOTSTRAP_CONFIG=force`. By default, these prod-oriented deployments preserve any existing config.yml because there's no way to ensure it was not modified after it was initially generated, and forcing config generation will clobber any modifications you made since it was generated.

You're using the router container. To directly edit the one-shot generated config.yml:

```bash
docker compose exec ziti-router vi /ziti-router/config.yml

```

or, depending on your term emulator settings, this may work better:

```bash
docker compose run --rm --entrypoint= ziti-router vi /ziti-router/config.yml

```

If you experience terminal corruption issues with both of those approaches, you can always copy the config.yml to the host for editing before replacing it.

```bash
docker compose cp ziti-router:/ziti-router/config.yml .

```

then:

```bash
docker compose cp ./config.yml ziti-router:/ziti-router/
docker compose up ziti-router --force-recreate

```

The purpose of the final `up` command is to correct the file owner based on the value of `ZIGGY_UID` in the compose project's environment and restart the router to load the new config.

If you frequently edit the config.yml, you may wish to change the way the router state is persisted from a Docker named volume to a Docker host bind directory by editing the example compose.yml file. That way, you can edit the config.yml directly on the host and restart the router container to load the new config.

[Previous page](https://openziti.discourse.group/t/change-controller-adresse-port-or-migrate-to-a-new-controller/3495.md?page=1)
