Docker: Your ROOT_URL in app.ini is http://XXX.XXX.X:3000/ but you are visiting http://XXX.XXX.XXX.X:3002/ You should set ROOT_URL correctly, otherwise the web may not work correctly. #10177

Closed
opened 2025-11-02 09:00:19 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @Raptor05 on GitHub (Jan 29, 2023).

Description

Hello,
I've updated my github container from 1.16 to latest (1.18.3). Now I see the following error at the website:
Your ROOT_URL in app.ini is http://XXX.XXX.X:3000/ but you are visiting http://XXX.XXX.X:3002/ You should set ROOT_URL correctly, otherwise the web may not work correctly.

But since the docker container is forwarding the container port to the external port, it's not possible to set the port in the app.ini correctly.

Gitea Version

1.18.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

1.18.3

Operating System

Synology NAS with Docker

How are you running Gitea?

Docker container

Database

SQLite

Originally created by @Raptor05 on GitHub (Jan 29, 2023). ### Description Hello, I've updated my github container from 1.16 to latest (1.18.3). Now I see the following error at the website: `Your ROOT_URL in app.ini is http://XXX.XXX.X:3000/ but you are visiting http://XXX.XXX.X:3002/ You should set ROOT_URL correctly, otherwise the web may not work correctly.` But since the docker container is forwarding the container port to the external port, it's not possible to set the port in the app.ini correctly. ### Gitea Version 1.18.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 1.18.3 ### Operating System Synology NAS with Docker ### How are you running Gitea? Docker container ### Database SQLite
GiteaMirror added the type/question label 2025-11-02 09:00:19 -06:00
Author
Owner

@jolheiser commented on GitHub (Jan 29, 2023):

It's not asking you to change the port, but the ROOT_URL setting in https://docs.gitea.io/en-us/config-cheat-sheet/#server-server

@jolheiser commented on GitHub (Jan 29, 2023): It's not asking you to change the port, but the `ROOT_URL` setting in https://docs.gitea.io/en-us/config-cheat-sheet/#server-server
Author
Owner

@Raptor05 commented on GitHub (Jan 30, 2023):

It's not asking you to change the port, but the ROOT_URL setting in https://docs.gitea.io/en-us/config-cheat-sheet/#server-server

Yes I know. But if I'm changing the ROOT_URL setting in the app ini, I will not be able to open the gitea website anymore. Because inside the docker container, the 3000 is correct, but from outside I'm calling the gitea website with the port 3002.
And gitea is not fine with it, when my URL in the browser is different from the app.ini settings.

@Raptor05 commented on GitHub (Jan 30, 2023): > It's not asking you to change the port, but the `ROOT_URL` setting in https://docs.gitea.io/en-us/config-cheat-sheet/#server-server Yes I know. But if I'm changing the `ROOT_URL` setting in the app ini, I will not be able to open the gitea website anymore. Because inside the docker container, the 3000 is correct, but from outside I'm calling the gitea website with the port 3002. And gitea is not fine with it, when my URL in the browser is different from the app.ini settings.
Author
Owner

@jolheiser commented on GitHub (Jan 30, 2023):

ROOT_URL AND HTTP_PORT are separate settings.
The former is used for links/clone urls etc.

@jolheiser commented on GitHub (Jan 30, 2023): `ROOT_URL` AND `HTTP_PORT` are separate settings. The former is used for links/clone urls etc.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10177