# Connect to the Podman Socket

{% hint style="warning" %}
Connecting to the Podman Socket is a legacy option that does not support edge features or policy management. For most use cases, [the Edge Agent is recommended](https://docs.portainer.io/faqs/getting-started/why-do-we-recommend-using-the-edge-agent-instead-of-the-traditional-agent).
{% endhint %}

Connecting to the Podman socket directly can only be done from the local environment. Before you begin, ensure the user running the Portainer Server container has permissions to access the Podman socket.

From the menu expand **Environment-related**, click **Environments**, then click **Add environment**.

<figure><img src="https://content.gitbook.com/content/xdTQRpMuktD2l0URtOJO/blobs/bWERa8LPxJXdwb33Awvh/Add-env-new.gif" alt=""><figcaption></figcaption></figure>

Next, select **Podman** as the environment type then click **Start Wizard**. Under **More options**, select the **Socket** option and your platform. You will be shown the command required to ensure you have started the Podman socket.

Fill out the fields based on the table below.

<figure><img src="https://2837857291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxdTQRpMuktD2l0URtOJO%2Fuploads%2F15AswfosWAGc2PiPcNar%2F2.39-Podman-Socket.png?alt=media&#x26;token=f0c12e47-2151-4620-9ece-737038b5f171" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2837857291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxdTQRpMuktD2l0URtOJO%2Fuploads%2FSbr81do2AD6YoDzP7f4S%2F2.39-Podman-Socket-1.png?alt=media&#x26;token=3a9f0c63-a7c7-4071-be43-cf0080d85c97" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="280">Field/Option</th><th>Overview</th></tr></thead><tbody><tr><td>Name</td><td>Give the environment a descriptive name.</td></tr><tr><td>Override default socket path</td><td>Toggle this option on to override the default socket path.</td></tr><tr><td>Socket Path</td><td>If <strong>Override default socket path</strong> is enabled, enter the path to the Podman socket.</td></tr></tbody></table>

<figure><img src="https://content.gitbook.com/content/xdTQRpMuktD2l0URtOJO/blobs/6Fr4QlwzwXALS22Ebsut/2.22.0-environments-add-podman-socket-2.png" alt=""><figcaption></figcaption></figure>

As an optional step you can expand the **More settings** section to categorize the environment by adding it to a [group](https://docs.portainer.io/admin/environments/groups) or [tagging](https://docs.portainer.io/admin/environments/tags) it for better searchability.

<figure><img src="https://content.gitbook.com/content/xdTQRpMuktD2l0URtOJO/blobs/GJXA5epnBPo0wicDh3tU/2.18-environments-add-docker-moresettings.png" alt=""><figcaption></figcaption></figure>

When you're ready, click **Connect**. If you have other environments to configure click **Continue** to proceed, otherwise click **Close** to return to the list of environments.


---

# 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.portainer.io/admin/environments/add/podman/socket.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.
