[discussion] Gitea pages server (GitHub pages, web hosting, serving git repository contents as a site) #10444

Closed
opened 2025-11-02 09:07:34 -06:00 by GiteaMirror · 14 comments
Owner

Originally created by @wxiaoguang on GitHub (Mar 16, 2023).

Like GitHub pages, there are many feature requests for Gitea builtin pages service.

The initial issue is #302 , at that time (2016~2019) , the conclusion was that it's not on the roadmap.

Today, more and more people are asking about "Pages" feature, so I'd like to summary them, and maybe it's time to discuss a new conclusion.

Relate issues:

If Gitea wants to put this feature on its roadmap, it's a big feature, and it needs to be designed first, especially for security.

If this feautre is not on Gitea's roadmap, then I think it's better to provide a clear document about how to setup a pages service with production-level servers, eg: Codeberg pages-server , it's already mentioned in many issues, and it works well for Gitea.

Originally created by @wxiaoguang on GitHub (Mar 16, 2023). Like GitHub pages, there are many feature requests for Gitea builtin pages service. The initial issue is #302 , at that time (2016~2019) , the conclusion was that it's not on the roadmap. Today, more and more people are asking about "Pages" feature, so I'd like to summary them, and maybe it's time to discuss a new conclusion. Relate issues: * #302 * #2208 * #3834 * #6163 * #9811 * #19129 * #23516 If Gitea wants to put this feature on its roadmap, it's a big feature, and it needs to be designed first, especially for security. If this feautre is not on Gitea's roadmap, then I think it's better to provide a clear document about how to setup a pages service with production-level servers, eg: [Codeberg pages-server](https://codeberg.org/Codeberg/pages-server) , it's already mentioned in many issues, and it works well for Gitea.
GiteaMirror added the type/proposaltype/summary labels 2025-11-02 09:07:35 -06:00
Author
Owner

@lunny commented on GitHub (Mar 16, 2023):

There is also an interesting closed PR #9811 .

@lunny commented on GitHub (Mar 16, 2023): There is also an interesting closed PR #9811 .
Author
Owner

@JakobDev commented on GitHub (Mar 16, 2023):

I don't think, Gitea needs to offer a own server. A existing server like e.g. can be used. And on Gitea side we can add a config like this:

[pages]
ENABLED = true
DIRECTORY = /path/to/directory

So Gitea just needs to copy the files to the specific directory (could also be some mounted directory from another server) and let the chosen Server Software (e.g. ngnix) do the rest.

@JakobDev commented on GitHub (Mar 16, 2023): I don't think, Gitea needs to offer a own server. A existing server like e.g. can be used. And on Gitea side we can add a config like this: ```ini [pages] ENABLED = true DIRECTORY = /path/to/directory ``` So Gitea just needs to copy the files to the specific directory (could also be some mounted directory from another server) and let the chosen Server Software (e.g. ngnix) do the rest.
Author
Owner

@lunny commented on GitHub (Mar 16, 2023):

OK. Maybe we can have an HTML Package concept like npm package. And if a special domain could be bind, it will serve as a static server. Looks like an interesting thing.

@lunny commented on GitHub (Mar 16, 2023): OK. Maybe we can have an `HTML` Package concept like npm package. And if a special domain could be bind, it will serve as a static server. Looks like an interesting thing.
Author
Owner

@wxiaoguang commented on GitHub (Mar 16, 2023):

let the chosen Server Software (e.g. ngnix) do the rest.

That's also a good idea (especially for personal or small team usage), if the reverse-proxy servers could proxy the requests to Gitea's exported / raw / package handlers to fetch contents. (I haven't tried but I guess it might be feasible)

@wxiaoguang commented on GitHub (Mar 16, 2023): > let the chosen Server Software (e.g. ngnix) do the rest. That's also a good idea (especially for personal or small team usage), if the reverse-proxy servers could proxy the requests to Gitea's exported / `raw` / `package` handlers to fetch contents. (I haven't tried but I guess it might be feasible)
Author
Owner

@KN4CK3R commented on GitHub (Mar 16, 2023):

I talked with @lunny and the generic package type could store and save pre-compiled HTML output. It may be necessary to create a new package type for that job to tweak the current ui or hide it from users. An action could then create the files and store them as a package which a proxy could serve with a different domain.

@KN4CK3R commented on GitHub (Mar 16, 2023): I talked with @lunny and the generic package type could store and save pre-compiled HTML output. It may be necessary to create a new package type for that job to tweak the current ui or hide it from users. An action could then create the files and store them as a package which a proxy could serve with a different domain.
Author
Owner

@lunny commented on GitHub (Mar 16, 2023):

A dynamic rule could be configured from action to implement dynamic sub domain. We can write a PageAction to make the process easier.

@lunny commented on GitHub (Mar 16, 2023): A dynamic rule could be configured from action to implement dynamic sub domain. We can write a PageAction to make the process easier.
Author
Owner

@6543 commented on GitHub (Mar 16, 2023):

I am against add a build in pages server ... as I generalize the Pages-Server,

so anybody should be capable to setup it. It's also a single binary with good default settings,

and the only thing that is not generic are the error pages, that show the codeberg logo at the moment. witch https://codeberg.org/Codeberg/pages-server/issues/199 should solve.

Just blow up gitea for no good reason is bad

@6543 commented on GitHub (Mar 16, 2023): **I** am **against** add a build in pages server ... as I generalize the [Pages-Server](https://codeberg.org/Codeberg/pages-server), so anybody should be capable to setup it. It's also a single binary with good default settings, and the only thing that is not generic are the error pages, that show the codeberg logo at the moment. witch https://codeberg.org/Codeberg/pages-server/issues/199 should solve. Just blow up gitea for no good reason is **bad**
Author
Owner

@6543 commented on GitHub (Mar 16, 2023):

as it's requested a lot I would just add this project directly in the feature-comparsion-sheet and document it well.
-> make it easy to discover

If you are afraid/don't like that it's tied to much to CB I'm also happy to maintain a fork that just switches the default settings to gitea and its logo ...

PS: added a dedicated issue to track selfhosting: https://codeberg.org/Codeberg/pages-server/issues/207

@6543 commented on GitHub (Mar 16, 2023): as it's requested a lot I would just add this project directly in the [feature-comparsion-sheet](https://docs.gitea.io/en-us/comparison/#general-features) and document it well. -> **make it easy to discover** If you are afraid/don't like that it's tied to much to CB I'm also happy to maintain a fork that just switches the default settings to gitea and its logo ... PS: added a dedicated issue to track selfhosting: https://codeberg.org/Codeberg/pages-server/issues/207
Author
Owner

@6543 commented on GitHub (Mar 16, 2023):

PS: that should not hinder to build actions to build the pages branch ... it does integrate with that well too ...

@6543 commented on GitHub (Mar 16, 2023): PS: that should not hinder to build actions to build the pages branch ... it does integrate with that well too ...
Author
Owner

@jolheiser commented on GitHub (Mar 16, 2023):

I do think giving pages-server more visibility would help, and I also agree this doesn't need to be solved in Gitea main.

@jolheiser commented on GitHub (Mar 16, 2023): I do think giving `pages-server` more visibility would help, and I also agree this doesn't need to be solved in Gitea main.
Author
Owner

@silverwind commented on GitHub (Mar 16, 2023):

Would call the feature "Web hosting", Wikipedia also calls it that.

@silverwind commented on GitHub (Mar 16, 2023): Would call the feature "Web hosting", [Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_source-code-hosting_facilities#Features) also calls it that.
Author
Owner

@wxiaoguang commented on GitHub (Mar 16, 2023):

I'm not sure whether the "reverse-proxy"-kind approach works, if it does, then it seems an easy way for personal usage or small team usage. If they don't care about security, they could even use the same domain (that's user's choice 😂)

Actually I also feel it's better to use production-level Pages-Server to provide pages service, instead of blowing up Gitea. I just saw some new issues about this proposal, so I opened this discussion issue (to help users with such requirements). I guess a document with some samples would help future users who need this feature.


Update: I edited the issue title to avoid misleading.

@wxiaoguang commented on GitHub (Mar 16, 2023): I'm not sure whether the "reverse-proxy"-kind approach works, if it does, then it seems an easy way for personal usage or small team usage. If they don't care about security, they could even use the same domain (that's user's choice 😂) Actually I also feel it's better to use production-level Pages-Server to provide pages service, instead of blowing up Gitea. I just saw some new issues about this proposal, so I opened this discussion issue (to help users with such requirements). I guess a document with some samples would help future users who need this feature. ---- Update: I edited the issue title to avoid misleading.
Author
Owner

@lunny commented on GitHub (Mar 17, 2023):

I am against add a build in pages server ... as I generalize the Pages-Server,

so anybody should be capable to setup it. It's also a single binary with good default settings,

and the only thing that is not generic are the error pages, that show the codeberg logo at the moment. witch https://codeberg.org/Codeberg/pages-server/issues/199 should solve.

Just blow up gitea for no good reason is bad

Of course, that's why we closed so many request issues. For now, the possible answers of the requirement I think are two.

  1. Use https://codeberg.org/Codeberg/pages-server
  2. Use a reverse proxy server that redirects to the package URL of Gitea.
@lunny commented on GitHub (Mar 17, 2023): > **I** am **against** add a build in pages server ... as I generalize the [Pages-Server](https://codeberg.org/Codeberg/pages-server), > > so anybody should be capable to setup it. It's also a single binary with good default settings, > > and the only thing that is not generic are the error pages, that show the codeberg logo at the moment. witch https://codeberg.org/Codeberg/pages-server/issues/199 should solve. > > Just blow up gitea for no good reason is **bad** Of course, that's why we closed so many request issues. For now, the possible answers of the requirement I think are two. 1) Use https://codeberg.org/Codeberg/pages-server 2) Use a reverse proxy server that redirects to the package URL of Gitea.
Author
Owner
@6543 commented on GitHub (Mar 17, 2023): I'll create a pull to the docu :) - https://gitea.com/gitea/awesome-gitea/pulls/108 - https://github.com/go-gitea/gitea/pull/23993 - https://gitea.com/gitea/awesome-gitea/pulls/110
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10444