From cb486ae289b0bd6b5de78bed92c954b9867eb89d Mon Sep 17 00:00:00 2001 From: ducoterra Date: Wed, 25 Feb 2026 12:17:39 -0500 Subject: [PATCH] move gitea port to 22 --- active/container_gitea/gitea-compose.yaml | 4 ++-- active/container_gitea/gitea.md | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/active/container_gitea/gitea-compose.yaml b/active/container_gitea/gitea-compose.yaml index 1297c60..2b788a6 100644 --- a/active/container_gitea/gitea-compose.yaml +++ b/active/container_gitea/gitea-compose.yaml @@ -24,7 +24,7 @@ services: - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - - "2222:22" + - "22:22" depends_on: - db @@ -38,4 +38,4 @@ services: networks: - gitea volumes: - - /srv/gitea-db/postgres:/var/lib/postgresql/data \ No newline at end of file + - /srv/gitea-db/postgres:/var/lib/postgresql/data diff --git a/active/container_gitea/gitea.md b/active/container_gitea/gitea.md index ff4a2bd..f35f452 100644 --- a/active/container_gitea/gitea.md +++ b/active/container_gitea/gitea.md @@ -21,8 +21,11 @@ Prereqs -1. Mount data dirs at `/srv/gitea-data` and `/srv/gitea-db` -2. Create a gitea user and update gitea-compose.yaml with the correct UID +1. Change the default SSH port for your server to 2022 (or something similar). +2. Allow SSH to bind to that port: `semanage port -a -t ssh_port_t -p tcp 2022` +3. Allow 2022 on the firewall: `firewall-cmd --add-port=2022/tcp --permanent && firewall-cmd --reload` +4. Mount data dirs at `/srv/gitea-data` and `/srv/gitea-db` +5. Create a gitea user and update gitea-compose.yaml with the correct UID ```bash scp active/container_gitea/gitea-compose.yaml gitea: