Set administrator username, email, and password through environment variables when using docker container #13315

Open
opened 2025-11-02 10:38:21 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @UchihaYuki on GitHub (Jul 22, 2024).

Feature Description

Instead of manually filling these variables in the Install page, I hope to set them through environment variables.

Screenshots

image

Originally created by @UchihaYuki on GitHub (Jul 22, 2024). ### Feature Description Instead of manually filling these variables in the Install page, I hope to set them through environment variables. ### Screenshots ![image](https://github.com/user-attachments/assets/08aa4add-c70e-46c7-b892-b4890f08be6c)
GiteaMirror added the type/proposal label 2025-11-02 10:38:21 -06:00
Author
Owner

@yp05327 commented on GitHub (Jul 23, 2024):

  1. it is not safe to do this.
  2. if admin changed password, then should we update the old password after the container restarted?
  3. if you want to install gitea automatically, there's a script you can refer:
    https://gitea.com/gitea/helm-chart/src/branch/main/templates/gitea/init.yaml
    https://github.com/TeaChart/gitea/blob/main/templates/scripts/gitea/configure_gitea.sh
@yp05327 commented on GitHub (Jul 23, 2024): 1. it is not safe to do this. 2. if admin changed password, then should we update the old password after the container restarted? 3. if you want to install gitea automatically, there's a script you can refer: https://gitea.com/gitea/helm-chart/src/branch/main/templates/gitea/init.yaml https://github.com/TeaChart/gitea/blob/main/templates/scripts/gitea/configure_gitea.sh
Author
Owner

@tuananh commented on GitHub (Mar 15, 2025):

it would be useful for using gitea to test in CI.

In my case, i'm using Gitea for testing/CI so i use this script to get Gitea up with sqlite + default username/password

https://github.com/tuananh/gitea-compose

@tuananh commented on GitHub (Mar 15, 2025): it would be useful for using gitea to test in CI. In my case, i'm using Gitea for testing/CI so i use this script to get Gitea up with sqlite + default username/password https://github.com/tuananh/gitea-compose
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13315