21.2. Enabling the Podman API using systemd in rootless mode


You can use systemd to activate the Podman API socket and podman API service.

Prerequisites

  • The podman-remote package is installed.

    # dnf install podman-remote

Procedure

  1. Enable and start the service immediately:

    $ systemctl --user enable --now podman.socket
  2. Optional: To enable programs by using Docker to interact with the rootless Podman socket:

    $ export DOCKER_HOST=unix:///run/user/<uid>/podman//podman.sock

Verification

  1. Check the status of the socket:

    $ systemctl --user status podman.socket
    ● podman.socket - Podman API Socket
     Loaded: loaded (/usr/lib/systemd/user/podman.socket; enabled; vendor preset: enabled)
    Active: active (listening) since Mon 2021-08-23 10:37:25 CEST; 9min ago
    Docs: man:podman-system-service(1)
    Listen: /run/user/1000/podman/podman.sock (Stream)
    CGroup: /user.slice/user-1000.slice/user@1000.service/podman.socket

    The podman.socket is active and is listening at /run/user/<uid>/podman.podman.sock, where <uid> is the user’s ID.

  2. Display system information of Podman:

    $ podman-remote info
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部