Skip to content

Can't set APP_DATA_PATH/WORK_PATH from environment variables #28884

@Evidlo

Description

@Evidlo

Description

I'm starting with a fresh install of Gitea. I'm trying to install Gitea to /storage/gitea, but it tries to write to /usr/bin/data which it doesn't have permission to do and fails.

out2

I tried a few environment variables, but I couldn't figure out how to get it to stop trying to write to /usr/bin/data

gitea@tikhonov:~$ GITEA_CUSTOM=/storage/gitea APP_DATA_PATH=/storage/gitea/ gitea web -c /etc/gitea/app.ini
2024/01/21 13:55:14 .../setting/security.go:168:loadSecurityFrom() [W] Enabling Query API Auth tokens is not recommended. DISABLE_QUERY_AUTH_TOKEN will default to true in gitea 1.23 and will be removed in gitea 1.24.
2024/01/21 13:55:14 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 2791210
2024/01/21 13:55:14 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.21.4 built with GNU Make 4.3, go1.21.5 : bindata, sqlite, sqlite_unlock_notify
2024/01/21 13:55:14 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod
2024/01/21 13:55:14 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/bin/gitea
2024/01/21 13:55:14 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /usr/bin
2024/01/21 13:55:14 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /storage/gitea
2024/01/21 13:55:14 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /etc/gitea/app.ini

Gitea Version

1.21.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.25.1

Operating System

Ubuntu 20.04

How are you running Gitea?

From commandline and installed as per https://gitlab.com/packaging/gitea

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detail

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions