How to set Custom Path #317

Closed
opened 2025-11-02 03:18:18 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @laoshaw on GitHub (Feb 3, 2017).

  • Gitea version (or commit ref):6aacf4d
  • Git version:2.7.4
  • Operating system:ubuntu 16.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

cd /tmp
gitea web
Custom path: /path/where/gitea/is/installed/custom
Even though I run gitea from /tmp, it still reports its "Custom path" is the same as where "gitea" is installed, is it possible to set the "Custom path" to where I run gitea instead of where it is installed, i.e. /tmp/custom in this case.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41619185-how-to-set-custom-path?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github).
Originally created by @laoshaw on GitHub (Feb 3, 2017). - Gitea version (or commit ref):6aacf4d - Git version:2.7.4 - Operating system:ubuntu 16.04 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description cd /tmp gitea web Custom path: /path/where/gitea/is/installed/custom Even though I run gitea from /tmp, it still reports its "Custom path" is the same as where "gitea" is installed, is it possible to set the "Custom path" to where I run gitea instead of where it is installed, i.e. /tmp/custom in this case. <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41619185-how-to-set-custom-path?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github). </bountysource-plugin>
GiteaMirror added the type/question label 2025-11-02 03:18:18 -06:00
Author
Owner

@lunny commented on GitHub (Feb 3, 2017):

./gitea help web
NAME:
   gitea web - Start Gitea web server

USAGE:
   gitea web [command options] [arguments...]

DESCRIPTION:
   Gitea web server is the only thing you need to run,
and it takes care of all the other things for you

OPTIONS:
   --port value, -p value    Temporary port number to prevent conflict (default: "3000")
   --config value, -c value  Custom configuration file path (default: "custom/conf/app.ini")
   --pid value, -P value     Custom pid file path (default: "/var/run/gitea.pid")
@lunny commented on GitHub (Feb 3, 2017): ``` ./gitea help web NAME: gitea web - Start Gitea web server USAGE: gitea web [command options] [arguments...] DESCRIPTION: Gitea web server is the only thing you need to run, and it takes care of all the other things for you OPTIONS: --port value, -p value Temporary port number to prevent conflict (default: "3000") --config value, -c value Custom configuration file path (default: "custom/conf/app.ini") --pid value, -P value Custom pid file path (default: "/var/run/gitea.pid") ```
Author
Owner

@laoshaw commented on GitHub (Feb 3, 2017):

Thanks. I read that and tried that already, "mkdir -p /tmp/xyz; cd /tmp/xyz; gitea web --config /tmp/xyz/custom/conf/app.in" it still points to /gitea/install/path/custom/conf/app.in, no way to change that.

@laoshaw commented on GitHub (Feb 3, 2017): Thanks. I read that and tried that already, "mkdir -p /tmp/xyz; cd /tmp/xyz; gitea web --config /tmp/xyz/custom/conf/app.in" it still points to /gitea/install/path/custom/conf/app.in, no way to change that.
Author
Owner

@tboerger commented on GitHub (Feb 10, 2017):

The custom path can be configured with the environment variable GITEA_CUSTOM, so this is not a bug, it's more a documentation issue.

@tboerger commented on GitHub (Feb 10, 2017): The custom path can be configured with the environment variable `GITEA_CUSTOM`, so this is not a bug, it's more a documentation issue.
Author
Owner

@laoshaw commented on GitHub (Feb 10, 2017):

Looked into the code it seems a better env is GITEA_WORK_DIR:

GITEA_WORK_DIR=`pwd` gitea web
@laoshaw commented on GitHub (Feb 10, 2017): Looked into the code it seems a better env is GITEA_WORK_DIR: ``` GITEA_WORK_DIR=`pwd` gitea web ```
Author
Owner

@lunny commented on GitHub (Feb 25, 2017):

maybe we should send a PR to add a document.

@lunny commented on GitHub (Feb 25, 2017): maybe we should send a PR to add a document.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#317