<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Alfonso Sanchez</title>
    <description>The latest articles on Forem by Alfonso Sanchez (@alfonsosanchez12).</description>
    <link>https://forem.com/alfonsosanchez12</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3659601%2Fca4ab749-a11f-4db5-be42-217d9deabbd0.png</url>
      <title>Forem: Alfonso Sanchez</title>
      <link>https://forem.com/alfonsosanchez12</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/alfonsosanchez12"/>
    <language>en</language>
    <item>
      <title>Managing Local and Remote Podman instances over LazyDocker</title>
      <dc:creator>Alfonso Sanchez</dc:creator>
      <pubDate>Sun, 14 Dec 2025 22:07:32 +0000</pubDate>
      <link>https://forem.com/alfonsosanchez12/managing-local-and-remote-podman-instances-over-lazydocker-31e6</link>
      <guid>https://forem.com/alfonsosanchez12/managing-local-and-remote-podman-instances-over-lazydocker-31e6</guid>
      <description>&lt;p&gt;If you're like me, you love the power of Podman for rootless containers and the efficiency of Lazydocker's TUI. But getting them to play nicely, especially across a local machine and remote servers could be difficult, especially when handling SSH commands and socket forwarding for configuring Lazydocker to manage multiple Podman instances.&lt;/p&gt;

&lt;p&gt;This guide will help you with that process by introducing &lt;code&gt;ezpodman&lt;/code&gt;, a wrapper script designed to automate and simplify this entire workflow.&lt;/p&gt;

&lt;p&gt;The Official guthub repo for ezpodman can be found: &lt;a href="https://github.com/alfonsosanchez12/ezpodman" rel="noopener noreferrer"&gt;alfonsosanchez12/ezpodman&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you are also interested in knowing how to manage this process manually, you can read it here -&amp;gt; &lt;a href="https://github.com/alfonsosanchez12/tech-docu/blob/main/podman/podman_on_lazydocker_The-Hard-Way.md" rel="noopener noreferrer"&gt;alfonsosanchez12/podman_on_lazydocker_The-Hard-Way&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Setting the Stage: Essential Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we get our hands dirty with configs, let's do a quick tool check. The table below outlines the required tooling.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tooling requirements
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Required Tooling:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docker&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Optional: for other tooling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;podman&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Local container engine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;podman-remote&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Connect to remote Podman (Included with Podman 4+)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;lazydocker&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Docker/Podman TUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;jq&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Parses &lt;code&gt;podman-remote&lt;/code&gt; JSON  (needed for ezpodman)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Optional (but strongly recommended):&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;fzf&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fuzzy remote picker&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Environment requirements
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Remote podman instance management
&lt;/h4&gt;

&lt;p&gt;If your goal is to manage a &lt;strong&gt;remote&lt;/strong&gt; Podman instance with Lazydocker, make sure you have (aside a &lt;code&gt;podman&lt;/code&gt; instance) enabled lingering and a &lt;code&gt;podman-socket&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;loginctl enable-linger &lt;span class="nv"&gt;$USER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl &lt;span class="nt"&gt;--user&lt;/span&gt; &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; podman.socket
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To verify that the socket is active and listening, you can run a curl command directly against the Unix socket:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--unix-socket&lt;/span&gt; &lt;span class="nv"&gt;$XDG_RUNTIME_DIR&lt;/span&gt;/podman/podman.sock http://d/v3.0.0/libpod/_ping
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;A successful response (typically &lt;strong&gt;OK&lt;/strong&gt;) confirms the remote side is ready.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  local Podman instance management
&lt;/h4&gt;

&lt;p&gt;If your goal is to manage a &lt;strong&gt;local&lt;/strong&gt; Podman instance with Lazydocker, verify you have:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For a local linux-machine&lt;/strong&gt; a &lt;code&gt;podman-socket&lt;/code&gt; enabled&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;systemctl &lt;span class="nt"&gt;--user&lt;/span&gt; list-sockets podman.socket
LISTEN                            UNIT          ACTIVATES
/run/user/1000/podman/podman.sock podman.socket podman.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For a local linux-machine&lt;/strong&gt; a &lt;code&gt;podman-machine&lt;/code&gt; initiated&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;podman system connection list
Name                         URI                                                           Identity                                                     Default     ReadWrite
podman-machine-default       ssh://core@127.0.0.1:50637/run/user/501/podman/podman.sock    /Users/&amp;lt;USER&amp;gt;/.local/share/containers/podman/machine/machine  &lt;span class="nb"&gt;true        true
&lt;/span&gt;podman-machine-default-root  ssh://root@127.0.0.1:50637/run/podman/podman.sock             /Users/&amp;lt;USER&amp;gt;/.local/share/containers/podman/machine/machine  &lt;span class="nb"&gt;false       true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Use ezpodman for Simplified Management
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;ezpodman&lt;/code&gt; is a &lt;strong&gt;Bash wrapper&lt;/strong&gt; specifically designed to eliminate the difficulty of managing &lt;code&gt;lazydocker&lt;/code&gt; connections for both local and remote Podman instances. It automates the work of tunnel creation and environment configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;ezpodman&lt;/code&gt; feature set:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interactive menu for easily selecting and managing your local and remote connections.&lt;/li&gt;
&lt;li&gt;Built-in setup wizard to automates the remote setup process, including SSH key generation, copying keys to the remote host, and podman-remote configuration.&lt;/li&gt;
&lt;li&gt;Automatic and persistent SSH tunnel management.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Getting &lt;code&gt;ezpodman&lt;/code&gt; Up and Running
&lt;/h3&gt;

&lt;p&gt;Installation is a straightforward process. Because the tool is a self-contained script, setup is quick, easy, and requires no complex dependencies or daemons.&lt;/p&gt;

&lt;h4&gt;
  
  
  Installation
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Recommended Installation&lt;/strong&gt; This installs the script to your user's local binary directory and doesn't require sudo privileges.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/.local/bin
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/alfonsosanchez12/ezpodman/main/ezpodman &lt;span class="nt"&gt;-o&lt;/span&gt; ~/.local/bin/ezpodman
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x ~/.local/bin/ezpodman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now test it with a local podman instance by executing it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ezpodman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the complete set of options you can run &lt;code&gt;ezpodman -h&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For in-depth information you can check the github repo notes&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  The Automated Setup Wizard
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;ezpodman&lt;/code&gt; setup wizard helps you handling the podman socket management steps for you, from key generation to final connection configuration. This wizard is mainly useful for handling remote connections.&lt;/p&gt;

&lt;p&gt;To launch the wizard, simply run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ezpodman &lt;span class="nt"&gt;--setup&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The script will guide you through the following steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Naming the connection for easy future reference (e.g., prod-server).&lt;/li&gt;
&lt;li&gt;Specifying the remote destination in the format &lt;a href="mailto:user@host"&gt;user@host&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Generating a new ed25519 SSH key if you choose to, saving it for the connection.&lt;/li&gt;
&lt;li&gt;Copying the new public key to the remote host using the standard ssh-copy-id utility.&lt;/li&gt;
&lt;li&gt;Adding the fully configured connection to podman-remote for immediate use.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. A Practical Guide to Using ezpodman
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Managing the Local Podman Instances
&lt;/h4&gt;

&lt;p&gt;The simplest use case is managing your local podman containers. Running ezpodman with no arguments defaults to local mode.&lt;br&gt;
On Linux, it connects directly to the local rootless Podman socket.&lt;br&gt;
On macOS, it automatically detects and creates a tunnel to the default &lt;code&gt;podman-machine&lt;/code&gt;, treating it as the local instance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ezpodman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Connecting to Remote Instances
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Use the interactive picker to select from your list of configured remotes. Having &lt;code&gt;fzf&lt;/code&gt; installed makes this option more enjoyable.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ezpodman &lt;span class="nt"&gt;-r&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Connect directly to a specific, named remote instance:
If you know the name on the podman connection, you can specify directly the name as follows
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ezpodman &lt;span class="nt"&gt;-r&lt;/span&gt; &amp;lt;connection-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Advanced Tunnel Control
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;ezpodman&lt;/code&gt; can also manage SSH tunnels independently. This makes it useful for any other Docker-compatible tools you might use, such as custom scripts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ezpodman &lt;span class="nt"&gt;-m&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Open a tunnel only and print the DOCKER_HOST variable for use in your current shell&lt;/li&gt;
&lt;li&gt;List all active tunnels managed by &lt;code&gt;ezpodman&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Stop a specific tunnel by its connection name&lt;/li&gt;
&lt;li&gt;Restart a specific tunnel&lt;/li&gt;
&lt;li&gt;Kill all &lt;code&gt;ezpodman&lt;/code&gt; tunnels at once&lt;/li&gt;
&lt;li&gt;Remove a connection configuration entirely&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;I hope you found useful this information, as well as the ezpodman tool for your day-to-day podman container management.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Cover image of Lazydocker running over a Podman socket. Podman logo by &lt;a href="https://raw.githubusercontent.com/containers/common/main/logos/podman-logo-full-vert.png" rel="noopener noreferrer"&gt;podman&lt;/a&gt;&lt;/p&gt;

</description>
      <category>podman</category>
      <category>containers</category>
      <category>docker</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
