NextcloudPi with other self-hosted services

I am running NextxloudPi on a Raspberry Pi 4, and I installed using the preinstalled image of NextcloudPi provided by ownyourbits. I would really like to add some other services to my Raspberry Pi alongside Nextcloud, but I am struggling with getting access to these services outside the local net.

I started with installing Gitea using docker, and got a server running on port 3000, which I can access on the local network through “nextcloud.local:3000” (I access Nextcloud throught “nextcloud.local” when I am on the local network). I have configured NextcloudPi to be externally accessible by using No-IP, through a domain (“mydomain.ddns.net”). I discovered that I could access the Gitea server if I set up port forwarding to port 3000 on the router, by going to “[PUBLIC IP]:3000”, but I am not sure whether that is a secure way of doing it, and I would much rather like to access the Gitea server by going to “git.mydomain.ddns.net”, or “mydomain.ddns.net/git” or something like that.

I tried looking into the Apache configuration on the Pi, but I am afraid of messing things up for the NextcloudPi installation, which is working perfectly at the moment. I have tried following these instructions to set up Gitea using nginx, but that does not work, and it seems to collide with the NextcloudPi that already uses ports 443 and 80.

Does anyone have any tips on how I could get a Gitea server (does not have to be in docker) alongside NextcloudPi? I guess I could start from scratch, install both Nextcloud and Gitea in docker, and then take it from there, but I’m hoping that it is possible to make it work with my current setup.

Any help or tips would be appreciated!