marhkb / pods

Keep track of your podman containers
GNU General Public License v3.0
734 stars 14 forks source link

How to access to an user instance remotely? #784

Closed Froggy232 closed 8 months ago

Froggy232 commented 8 months ago

Hi, First, thanks you so much for your soft! I would like to know how (and if) is it possible to access to an user instance through network. So far, I have succeeded accessing to the root instance with the documentation, but it doesn't told how to access to the user instance. Thanks you!

marhkb commented 8 months ago

For example create a file /etc/systemd/user/podman-tcp@.service

[Unit]
Description=Podman user TCP socket on port %i
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
ExecStart=/usr/bin/podman system service --time=0 tcp://0.0.0.0:%i

[Install]
WantedBy=default.target

Activate on port 7676 (you can choose your own port).

systemctl --user enable --now podman-tcp@7676.service

If you still have questions, please use the Github Discussions next time.