mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-21 04:02:17 -05:00
Migrated GITEA to new domain - HTTPS and SSH point to old one #7320
Closed
opened 2025-11-02 07:22:52 -06:00 by GiteaMirror
·
7 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1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3.3
v1.4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#7320
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @kdamianakis on GitHub (May 10, 2021).
Gitea has been installed via docker compose and runs behind an NGINX proxy. I have migrated the GITEA from one domain to another by copying/restoring the database and the binded volume containing the data. The database and the data and all of the settings appear ok on the new domain. NGINX proxy, etc all seem to work.
On the site settings I can see the old domain name even with the docker-compose ROOT_URL and DOMAIN pointing to new values. I assume that somewhere in the database and the old-copied data from the previous domain via the volume there is a setting that would need to be changed as the new values from docker-compose do not seem to hold for current or new projects in the GITEA.
Any advice appreciated.
[x]):@zeripath commented on GitHub (May 10, 2021):
What do you mean "site settings"?
Are you sure that you have definitely restarted Gitea since the settings have been set and that the underlying app.ini file has been changed?
How did you change/set these values in the docker compose? Are you using the
GITEA__server__ROOT_URLenvironment variable or some other way?@kdamianakis commented on GitHub (May 10, 2021):
I mean the site settings of the Gitea - after the restoration to the VM that is running on a New Domain Name (Domain B) it is running happily that Domain A but all of the HTTPS and SSH DOMAINs restored repositories and organizations point to the old domain (Domain A). I am trying to see how to change that. I have restarted many times the docker-compose and changed the ENV variables to match the new ROOT_URL and DOMAIN settings for Domain B but it does not seem to pick them up. I am in the process of manually setting the app.ini settings within the docker container for the Gitea - so far its now working but hopefully there is something that I have missed that can be found. Site Settings are the settings that are under Site Administration -> Configuration -> Server Configuration. I was hoping that it picks them up from the ENV on docker-compose or the app.ini but they may be in the database..?
@techknowlogick commented on GitHub (May 10, 2021):
Which specific env vars are you using? If they don't start with
GITEA__then those have been deprecated in lieu of using the env-to-ini tool, and the deprecated env vars have only ever been used to initialize config, so if app.ini already existed then it wouldn't be updated (hence move to use env-to-ini tool which handles that).@kdamianakis commented on GitHub (May 10, 2021):
Thank you for this - I was using the non GITEA_ ones and have now changed the docker_compose with
environment:
- GITEA_VIRTUAL_PORT=3000
- GITEA_VIRTUAL_HOST=project.com
- GITEA_DISABLE_REGISTRATION=true
- GITEA_ROOT_URL=https://project.com/gitea/
- GITEA_DOMAIN=project.com
but its still not working. I have now manually changed the api.ini and restart. This seems to have worked. I shall test it some more.
@zeripath commented on GitHub (May 10, 2021):
You've done these conversions incorrectly, see https://docs.gitea.io/en-us/install-with-docker/#managing-deployments-with-environment-variables
(I'm not sure where this comes from ... it wasn't in release/v1.13 or 1.14 or main) The closest equivalent is:
GITEA__server__HTTP_PORT=3000but you may want to put it back to
VIRTUAL_PORT=3000and add the above too.This one I'm really not sure about, nearest is
DOMAIN:GITEA__server__DOMAIN=project.comYou may want to put that back to
VIRTUAL_HOST(again not in 1.13+) and check what your compose was doing with that environment variable.GITEA__service__DISABLE_REGISTRATION=trueGITEA__server__ROOT_URL=https://project.com/gitea/GITEA__server__DOMAIN=project.comIn general, any setting in the app.ini can be changed using environment variables of the form:
GITEA__SECTION__KEY=valueThat is
GITEAtwo underscoressection_nametwo underscoreskey. Because certain things are not allowed in environment variables you can escape them using_0xfollowed by the code point - this is useful for keys and section headers with a period in them, soGITEA__UI_0x2E_META__AUTHOR=zeripathmaps to the[ui.meta]AUTHOR=zeripath@kdamianakis commented on GitHub (May 10, 2021):
Thank you for this! I shall check this to see if that would work on the official docker image as ENV variables.
@techknowlogick commented on GitHub (May 11, 2021):
Closing, please join chat or forum if you require any assistance with the env vars.