change SSH port failed #12679

Closed
opened 2025-11-02 10:17:58 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @hw-foxms on GitHub (Mar 19, 2024).

Description

version:

1.21.8 built with GNU Make 4.4.1, go1.21.8 : bindata, timetzdata, sqlite, sqlite_unlock_notify

deploy

podman root with host network (export port 3022 for inner ssh server)

podman run -d --replace --network host --expose 3000 --expose 3022 --tz Asia/Shanghai --restart always --name gitea ...

conf

image

issue

the ssh port never changed from 22 to 3022, i have restart & recreate container. the container log show:
image

Gitea Version

1.21.8 built with GNU Make 4.4.1, go1.21.8 : bindata, timetzdata, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

see the attached image in description.

Screenshots

see the attached image in description

Git Version

No response

Operating System

open media vault 7.0.3 (debian 12)

How are you running Gitea?

podman run -d --replace --network host --expose 3000 --expose 3022 --tz Asia/Shanghai --restart always --name gitea ...

Database

PostgreSQL

Originally created by @hw-foxms on GitHub (Mar 19, 2024). ### Description ### version: 1.21.8 built with GNU Make 4.4.1, go1.21.8 : bindata, timetzdata, sqlite, sqlite_unlock_notify ### deploy podman root with host network (export port 3022 for inner ssh server) ```shell podman run -d --replace --network host --expose 3000 --expose 3022 --tz Asia/Shanghai --restart always --name gitea ... ``` ### conf ![image](https://github.com/go-gitea/gitea/assets/14591023/85212fc4-b130-4d2c-86f0-c0abf380c89b) ### issue the ssh port never changed from 22 to 3022, i have restart & recreate container. the container log show: ![image](https://github.com/go-gitea/gitea/assets/14591023/37256a33-d29a-4dc5-89d5-4387d9e5a050) ### Gitea Version 1.21.8 built with GNU Make 4.4.1, go1.21.8 : bindata, timetzdata, sqlite, sqlite_unlock_notify ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist see the attached image in description. ### Screenshots see the attached image in description ### Git Version _No response_ ### Operating System open media vault 7.0.3 (debian 12) ### How are you running Gitea? ```shell podman run -d --replace --network host --expose 3000 --expose 3022 --tz Asia/Shanghai --restart always --name gitea ... ``` ### Database PostgreSQL
GiteaMirror added the type/question label 2025-11-02 10:17:58 -06:00
Author
Owner

@hw-foxms commented on GitHub (Mar 19, 2024):

config

image

@hw-foxms commented on GitHub (Mar 19, 2024): ### config ![image](https://github.com/go-gitea/gitea/assets/14591023/197e8b16-c2e5-43a3-8d19-02b3818ecf85)
Author
Owner

@techknowlogick commented on GitHub (Mar 20, 2024):

In the rootful image (any image that doesn't have -rootless at the end), it has opensshd bundled with it, and that can't be configured with app.ini. If you'd like to avoid port conflicts with network_mode: host, then the rootless image will be able to fulfill your needs.

@techknowlogick commented on GitHub (Mar 20, 2024): In the rootful image (any image that doesn't have `-rootless` at the end), it has opensshd bundled with it, and that can't be configured with app.ini. If you'd like to avoid port conflicts with `network_mode: host`, then the rootless image will be able to fulfill your needs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12679