[solved] Disable SSH problem

Hello,

I installed the gitea via docker (in OpenMediaVault) and I have problem with SSH:

  • even I have set DISABLE_SSH to ‘true’, the gitea still tries to bind ssh
  • the port reconfiguration does not work - if I change to port to e.g. 3022, it still tries to bind to port 22, but the port 22 I have already assigned by system

The Docker’s log of container is full of following:
Feb 1 14:17:33 sshd[100]: error: Bind to port 22 on :: failed: Address in use.
Feb 1 14:17:33 sshd[100]: error: Bind to port 22 on 0.0.0.0 failed: Address in use.
Feb 1 14:17:33 sshd[100]: fatal: Cannot bind any address.
Feb 1 14:17:34 sshd[105]: error: Bind to port 22 on :: failed: Address in use.
Feb 1 14:17:34 sshd[105]: error: Bind to port 22 on 0.0.0.0 failed: Address in use.
Feb 1 14:17:34 sshd[105]: fatal: Cannot bind any address.
Feb 1 14:17:35 sshd[110]: error: Bind to port 22 on :: failed: Address in use.
Feb 1 14:17:35 sshd[110]: error: Bind to port 22 on 0.0.0.0 failed: Address in use.
Feb 1 14:17:35 sshd[110]: fatal: Cannot bind any address.
Feb 1 14:17:36 sshd[115]: error: Bind to port 22 on :: failed: Address in use.
Feb 1 14:17:36 sshd[115]: error: Bind to port 22 on 0.0.0.0 failed: Address in use.
Feb 1 14:17:36 sshd[115]: fatal: Cannot bind any address.

Please, how it is possible to really disable the SSH, which gitea tries to start?

Thank you

Did you add a -p on docker command line?

What is the function of -p argument?
If the argument, passed to docker is simply passed to hosted application, I can see here https://docs.gitea.io/en-us/command-line/, that the -p (–port) changes the default port 3000, but this is the port of http.

Hello, I found it - the problem was setup the network mode to ‘host’. When I reconfigured it to ‘bridge’ with properly port forward (using -p arg), the Gitea works fine using both 3000 and 22 ports.