docker DISABLE_SSH and DISABLE_REGISTRATION environment variables not working #7405

Closed
opened 2025-11-02 07:25:00 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @tamis-laan on GitHub (May 29, 2021).

Using the latest docker version of gitea docker with docker compose:

  gitea:
    image: gitea/gitea
    environment:
      - GITEA__server__DISABLE_SSH=true
      - GITEA__service__DISABLE_REGISTRATION=true
      - GITEA__repository__DEFAULT_PRIVATE=private
    volumes:
      - ./data/gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 3000:3000

The settings GITEA__server__DISABLE_SSH=true and GITEA__service__DISABLE_REGISTRATION=true are not working while GITEA__repository__DEFAULT_PRIVATE=private does work.

Looks like boolean values are not mapped properly?

Originally created by @tamis-laan on GitHub (May 29, 2021). Using the latest docker version of gitea [docker](https://hub.docker.com/r/gitea/gitea) with docker compose: ``` yml gitea: image: gitea/gitea environment: - GITEA__server__DISABLE_SSH=true - GITEA__service__DISABLE_REGISTRATION=true - GITEA__repository__DEFAULT_PRIVATE=private volumes: - ./data/gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - 3000:3000 ``` The settings `GITEA__server__DISABLE_SSH=true` and `GITEA__service__DISABLE_REGISTRATION=true` are not working while `GITEA__repository__DEFAULT_PRIVATE=private` does work. Looks like boolean values are not mapped properly?
GiteaMirror added the topic/distributionissue/needs-feedbackissue/duplicate labels 2025-11-02 07:25:00 -06:00
Author
Owner

@techknowlogick commented on GitHub (May 29, 2021):

What does the generated app.ini look like?

@techknowlogick commented on GitHub (May 29, 2021): What does the generated app.ini look like?
Author
Owner

@tamis-laan commented on GitHub (May 29, 2021):

Both parameters are set to false in the app.ini, I changed them to true manually and that works, but I would like to keep the configuration in the docker-compose.yml.

[repository]
ROOT            = /data/git/repositories
DEFAULT_PRIVATE = private <----- This was auto configured properly

[server]
APP_DATA_PATH    = /data/gitea
DOMAIN           = ***********************
SSH_DOMAIN       = *************
HTTP_PORT        = 3000
ROOT_URL         =  ***************
DISABLE_SSH      = false <-- manually changed to true
SSH_PORT         = 22
SSH_LISTEN_PORT  = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = /data/git/lfs
PROTOCOL         = http
LFS_JWT_SECRET   = *************************
OFFLINE_MODE     = false

[service]
DISABLE_REGISTRATION              = false <-- Manually changed to true
REQUIRE_SIGNIN_VIEW               = false
REGISTER_EMAIL_CONFIRM            = false
ENABLE_NOTIFY_MAIL                = false
ALLOW_ONLY_EXTERNAL_REGISTRATION  = false
ENABLE_CAPTCHA                    = false
DEFAULT_KEEP_EMAIL_PRIVATE        = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = false
DEFAULT_ENABLE_TIMETRACKING       = false
NO_REPLY_ADDRESS                  =

@tamis-laan commented on GitHub (May 29, 2021): Both parameters are set to false in the app.ini, I changed them to true manually and that works, but I would like to keep the configuration in the docker-compose.yml. ``` ini [repository] ROOT = /data/git/repositories DEFAULT_PRIVATE = private <----- This was auto configured properly [server] APP_DATA_PATH = /data/gitea DOMAIN = *********************** SSH_DOMAIN = ************* HTTP_PORT = 3000 ROOT_URL = *************** DISABLE_SSH = false <-- manually changed to true SSH_PORT = 22 SSH_LISTEN_PORT = 22 LFS_START_SERVER = true LFS_CONTENT_PATH = /data/git/lfs PROTOCOL = http LFS_JWT_SECRET = ************************* OFFLINE_MODE = false [service] DISABLE_REGISTRATION = false <-- Manually changed to true REQUIRE_SIGNIN_VIEW = false REGISTER_EMAIL_CONFIRM = false ENABLE_NOTIFY_MAIL = false ALLOW_ONLY_EXTERNAL_REGISTRATION = false ENABLE_CAPTCHA = false DEFAULT_KEEP_EMAIL_PRIVATE = false DEFAULT_ALLOW_CREATE_ORGANIZATION = false DEFAULT_ENABLE_TIMETRACKING = false NO_REPLY_ADDRESS = ```
Author
Owner

@zeripath commented on GitHub (Jun 23, 2021):

Did you have to run through the install page?

That's the way that these settings would be overridden and I think I've recently fixed this with another pr.

@zeripath commented on GitHub (Jun 23, 2021): Did you have to run through the install page? That's the way that these settings would be overridden and I think I've recently fixed this with another pr.
Author
Owner

@tamis-laan commented on GitHub (Jun 24, 2021):

Did you have to run through the install page?

That's the way that these settings would be overridden and I think I've recently fixed this with another pr.

I have adjusted the parameters by hand, and have all systems up and running. I have the environment variable set just in case the problem is fixed and I have to re-deploy for some reason. However atm things are running smoothly so I'm not planning to touch my setup for testing.

@tamis-laan commented on GitHub (Jun 24, 2021): > Did you have to run through the install page? > > That's the way that these settings would be overridden and I think I've recently fixed this with another pr. I have adjusted the parameters by hand, and have all systems up and running. I have the environment variable set just in case the problem is fixed and I have to re-deploy for some reason. However atm things are running smoothly so I'm not planning to touch my setup for testing.
Author
Owner

@markormesher commented on GitHub (Aug 11, 2021):

FWIW I just tried a new install on 1.15.0-rc3 and can confirm that this is working again. I believe #15943 is the PR with the fix.

@markormesher commented on GitHub (Aug 11, 2021): FWIW I just tried a new install on 1.15.0-rc3 and can confirm that this is working again. I believe #15943 is the PR with the fix.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7405