# ホストインスタンスへの接続

Dockerインストール環境では、**host.docker.internal**という特殊なホスト名を使用して、Keeper Connection Managerホストインスタンスへの接続を確立できます。

設定するには、以下のように、`/etc/kcm-setup/docker-compose.yml`ファイルの**guacd**セクションを更新して、「`extra_hosts`」パラメータを追加します。

```
    guacd:
        image: keeper/guacd:2
        restart: unless-stopped
        environment:
            ACCEPT_EULA:"Y"
        volumes:
            - "common-storage:/var/lib/guacamole:rw"
        extra_hosts:
            - "host.docker.internal:host-gateway"

```

Docker環境を更新して、変更を反映させます。

```
sudo ./kcm-setup.run stop
sudo ./kcm-setup.run upgrade
```

すると、Keeper Connection Manager内から、`host.docker.internal`というホスト名を参照する新しい接続を作成できます。

<figure><img src="/files/O4XHNha00Ei2RzceVmM3" alt=""><figcaption><p>KCMホストインスタンスへの接続</p></figcaption></figure>

詳細については、以下の記事をご参照ください。

{% embed url="<https://medium.com/@TimvanBaarsen/how-to-connect-to-the-docker-host-from-inside-a-docker-container-112b4c71bc66>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/keeper-connection-manager/jp/supported-protocols/connecting-to-host-instance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
