> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Updating your domain

If you want to change your domain—for instance, if you accepted the default domain temporarily until you knew the correct domain—then **you need to make the change in Anaconda Team Edition and Keycloak for the change to truly take effect**.

This topic provides guidance on the following actions:

* [Updating the domain in Team Edition](#updating-the-domain-in-team-edition)
* [Updating the domain in Keycloak](#updating-the-domain-in-keycloak)
* [Configuring SSL](#configuring-ssl)

## Updating the domain in Team Edition

To update the domain in Team Edition, you need to update the domain environment variable:

1. Make a copy of the old `.env` file for reference and/or recovery purposes:

   ```sh theme={null}
   cp .env .env.old
   ```

2. Open the `.env` file, located in the same directory as the `docker-compose.yml` file.

3. Update the `<DOMAIN>` variable to your new domain.

<Note>
  If you have existing clients (tools) configured to use the Team Edition instance using the old DNS name, you will need to update those clients as well.
</Note>

## Updating the domain in Keycloak

1. From Team Edition, click on the **My account** button in the top right.

2. In the dropdown, under **Admin**, select **User Management**.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/IBO7780zo4xe9zAp/images/admin_console.png?fit=max&auto=format&n=IBO7780zo4xe9zAp&q=85&s=cc0fa184a6a93bb45f8cba7dd3377016" alt="" width="1022" height="1455" data-path="images/admin_console.png" />
   </Frame>

3. On the **User Management** screen, click the **Manage Users** button. You will be directed to the Keycloak login screen.

4. Log in to Keycloak using the keycloak master realm admin account, and then go to the **Clients** page under **Configure**.

5. On the **Clients** page, select **repo-service**. This is the default client ID.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/FWjHZXWDjYmx0_bG/images/keycloakclients.png?fit=max&auto=format&n=FWjHZXWDjYmx0_bG&q=85&s=0cace65d8004b0328b756263185f829f" alt="" width="1657" height="480" data-path="images/keycloakclients.png" />
   </Frame>

6. On the **Repo-service** page, scroll down to the **Root URL** and **Valid Redirect URIs** settings.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/FWjHZXWDjYmx0_bG/images/keycloakreposervice.png?fit=max&auto=format&n=FWjHZXWDjYmx0_bG&q=85&s=e1287d270584792483bc9496e4a9e5ba" alt="" width="1658" height="842" data-path="images/keycloakreposervice.png" />
   </Frame>

7. Update the **Root URL** to your new domain:

   ```sh theme={null}
   https://<DOMAIN>
   ```

8. Update the **Valid Redirect URIs** to your new domain’s Keycloak redirect path:

   ```sh theme={null}
   https://<DOMAIN>/api/auth/callback/kc
   ```

9. Click **Save**.

10. If you have SSL, make sure to update your certificates in the [Configuring SSL](#configuring-ssl) section to refer to your new domain.

11. Run docker-compose restart:

    ```sh theme={null}
    docker-compose restart
    ```

## Configuring SSL

The following steps will allow you to configure the SSL:

1. Add or remove the following lines relating to the SSL in `<BASE_INSTALL_DIR>/config/nginx/conf.d/repo.conf`, where `<BASE_INSTALL_DIR>` is the installation directory:

   ```
   listen              8080 ssl;

   ssl_certificate     /etc/nginx/certs/tls.crt;
   ssl_certificate_key /etc/nginx/certs/tls.key;
   ssl_protocols       TLSv1.2 TLSv1.3;
   ssl_ciphers         HIGH:!aNULL:!MD5;
   ```

2. Add or remove certificates from the following directory:

   ```sh theme={null}
   # Replace <BASE_INSTALL_DIR> with your base install directory.
   <BASE_INSTALL_DIR>/config/nginx/certs
   ```

3. Run the following command:

   ```sh theme={null}
   docker-compose up -d nginx_proxy
   ```

Refer to nginx's documentation for the standard [SSL configuration](https://nginx.org/en/docs/http/configuring_https_servers.html) procedure.
