Using subdomain on LAN

Hello,

I’ve recently installed Gitea on a server on my LAN. I’d set Gitea to use a subdomain of the server; however, it’s not being recognized. I’m not currently using a proxy. I want it to be accessed at gitea.192.168.1.206. However, it is currently only accessible through 192.168.1.206:3000.

Here’s a copy of my app.ini config file if that helps any.

APP_NAME = Gitea: Git with a cup of tea
RUN_USER = git
RUN_MODE = prod

[database]
DB_TYPE  = mysql
HOST     = 127.0.0.1:3306
NAME     = gitea
USER     = gitea
PASSWD   = my_pw
SCHEMA   =
SSL_MODE = disable
CHARSET  = utf8
PATH     = /var/lib/gitea/data/gitea.db
LOG_SQL  = false

[repository]
ROOT = /var/lib/gitea/data/gitea-repositories

[server]
SSH_DOMAIN       = gitea.192.168.1.206
DOMAIN           = gitea.192.168.1.206
HTTP_PORT        = 3000
ROOT_URL         = http://gitea.192.168.1.206/
DISABLE_SSH      = false
SSH_PORT         = 61000
LFS_START_SERVER = true
LFS_CONTENT_PATH = /var/lib/gitea/data/lfs
LFS_JWT_SECRET   = my_secret
OFFLINE_MODE     = false

[mailer]
ENABLED = false

[service]
REGISTER_EMAIL_CONFIRM            = false
ENABLE_NOTIFY_MAIL                = false
DISABLE_REGISTRATION              = true
ALLOW_ONLY_EXTERNAL_REGISTRATION  = false
ENABLE_CAPTCHA                    = false
REQUIRE_SIGNIN_VIEW               = false
DEFAULT_KEEP_EMAIL_PRIVATE        = true
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING       = true
NO_REPLY_ADDRESS                  = noreply.localhost
[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = true

[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = false

[session]
PROVIDER = file

[log]
MODE      = console
LEVEL     = info
ROOT_PATH = /var/lib/gitea/log
ROUTER    = console

[security]
INSTALL_LOCK       = true
INTERNAL_TOKEN     = long_complex_token
PASSWORD_HASH_ALGO = argon2

Any suggestions or recommendations are appreciated.

Thanks.

Edit: I did read through the docs as well and have attempted several changes based on [server] but did not have any luck with the changes. Not to mention extensive web searching. Yes, I did restart Gitea after each change.

You seem to have some confusion as to what a domain and subdomain are. An IP addresses is not a domain name.

Take a look at Cloudflare’s What is DNS? and see if that makes things more apparent.

1 Like

Yeah, thanks. It was a long day and I’ve been sick. I do know the difference between the IP address and domains. It appears the forum is set to prevent edits to posts after X amount of time (X being unknown to me), so I couldn’t go back in and correct it (I know this because I run a Discourse instance and have it set differently than here - no big deal just different preferences).

I’d set a domain name on my local host and due to other things installed on the server, I ended up deleting that and just changing the port that my Gitea is listening on - which got everything where I want it to be. But thanks for your reply.