From 3c46b0de47cdf6d434b01f4bffda181d1a48c092 Mon Sep 17 00:00:00 2001 From: Aykhan Shahsuvarov Date: Mon, 13 Jul 2026 04:46:01 +0400 Subject: [PATCH] gitea: expose SSH on port 2222 --- README.md | 2 ++ gitea/.env.example | 2 ++ gitea/docker-compose.yaml | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 30af6be..405a1f3 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ - 9009-9013/tcp (relay) - **SFTPGo** - 2022/tcp (SFTP) + - **Gitea** + - 2222/tcp (SSH) - **WireGuard Easy** - 51820/udp (WireGuard) diff --git a/gitea/.env.example b/gitea/.env.example index 249dbb3..0fd67c9 100644 --- a/gitea/.env.example +++ b/gitea/.env.example @@ -1,5 +1,7 @@ # URL of the Gitea instance GITEA_INSTANCE_URL=http://gitea:3000 +# Domain advertised in SSH clone URLs (e.g. gitea.aykhans.me) +GITEA_SSH_DOMAIN= # How to get the token: https://docs.gitea.com/usage/actions/act-runner#obtain-a-registration-token GITEA_RUNNER_REGISTRATION_TOKEN= # UID and GID of the user that should run the runner (e.g. USER_UID=1000, USER_GID=1000) diff --git a/gitea/docker-compose.yaml b/gitea/docker-compose.yaml index 76af1bb..5d0aa1d 100644 --- a/gitea/docker-compose.yaml +++ b/gitea/docker-compose.yaml @@ -15,10 +15,16 @@ services: environment: - USER_UID=${USER_UID} - USER_GID=${USER_GID} + - GITEA__server__SSH_DOMAIN=${GITEA_SSH_DOMAIN} + - GITEA__server__SSH_PORT=2222 + - GITEA__server__SSH_LISTEN_PORT=2222 + - GITEA__server__START_SSH_SERVER=false restart: unless-stopped networks: - gitea - caddy + ports: + - "2222:2222" volumes: - ./data:/data - /etc/timezone:/etc/timezone:ro