At first I got “gitea.service: Failed to reset devices.list: Operation not permitted” but the noticed that it was related to the ports so after changing it to 9000 it was fine.
The problem is that I cant access it by browser. Based on the ip of ifconfig and port from netstat command. It should’ve being fine on
ip:9000 but browser cant find the page, yet from the ssh connection I could use curl localhost:9000 and it shows the page related stuff.
Any clue why this kind of behaviour occurs? I’ve always thought that from host browser I can easily go to the lxc containers web pages.
This message is unrelated to changing the listening port. I think it is an error that you can safely ignore.
gitea has several configuration parameters. Can you show us what was changed in the Server section?
See https://docs.gitea.io/en-us/administration/config-cheat-sheet/
Your description suggests that by default, gitea listens (binds) on the loopback network interface.
Which means that either
; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'.
PROTOCOL = http
DOMAIN = localhost
ROOT_URL = http://localhost:9000
; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.
HTTP_ADDR = 127.0.0.1
HTTP_PORT = 9000
; Disable SSH feature when not available
DISABLE_SSH = false
; Whether to use the builtin SSH server or not.
START_SSH_SERVER = True
; Domain name to be exposed in clone URL
SSH_DOMAIN = localhost
; The network interface the builtin SSH server should listen on
SSH_LISTEN_HOST = 0.0.0.0
; Port number to be exposed in clone URL
SSH_PORT = 2222
; The port number the builtin SSH server should listen on
SSH_LISTEN_PORT = %(SSH_PORT)s
; Disable CDN even in "prod" mode
OFFLINE_MODE = True
; Default path for App data
APP_DATA_PATH = /var/lib/gitea/data
Since you are connected only from the host, you do not need the proxy protocol.
You just need to setup a proxy device, according to the link I gave earlier.
But I still couldnt connect to the gitea by my host. Maybe I am understanding this wrongly. I’ve heard about proxies a lot but never really gotten grasp of it.
So the macvlan thing doesnt relate to this problem I guess.
The macvlan reference has to do with one of the most common issues with the communication between the host and the container; they cannot communicate over the network due to the way macvlan works.
You do not mention macvlan, so I assume there is no such configuration. Also, you somewhat mention that you can ssh from the host to the container, therefore most likely there is no macvlan. If you are using macvlan on this container, please say so.
We haven’t seen the output of netstat from the container. If the gitea configuration is valid, it should say that gitea is listening on port 9000, interface lo (127.0.0.1). Therefore, the first proxy device line is obviously the valid one. You may also change the name, from myport80 to something like mygitea9000.