> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeper-connection-manager/jp/supported-protocols/connecting-to-host-instance.md).

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

DockerコンテナからKCMホストインスタンスへの接続

Dockerインストール環境では、`host.docker.internal` という特殊なホスト名を使用して、Keeperコネクションマネージャーホストインスタンスへの接続を確立できます。

設定するには、以下のように、`/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コネクションマネージャー内から、`host.docker.internal` というホスト名を参照する新しい接続を作成できます。

<figure><img src="https://4041518992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7s6LQJaKa1G17O787JG%2Fuploads%2Fasj8RRpYYM0472i2Z291%2Fimage.png?alt=media&amp;token=9af51b7c-e936-49db-9311-743dd4b8151e" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
