Use caddy as the main server #711

Closed
opened 2025-11-02 03:33:51 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @pgaskin on GitHub (May 13, 2017).

I think Caddy could be used for the main part of the server. Gitea would listen on a different port on localhost, and Caddy would listen on the main port chosen by the user. This would allow us to do more complex things easier such as:

  1. Automatic HTTPS with Let's Encrypt
  2. Redirect HTTP to HTTPS
  3. Gitea pages on a separate domain
  4. Separate domain for raw files
  5. Redirect old URLs
  6. Set timeouts
  7. Listen on multiple domains and IPs

Many of the issues listed above could be fixed very easily if we integrate Caddy into Gitea.

Originally created by @pgaskin on GitHub (May 13, 2017). I think Caddy could be used for the main part of the server. Gitea would listen on a different port on localhost, and Caddy would listen on the main port chosen by the user. This would allow us to do more complex things easier such as: 1. [Automatic HTTPS with Let's Encrypt](https://github.com/go-gitea/gitea/issues/1167) 2. [Redirect HTTP to HTTPS](https://github.com/go-gitea/gitea/issues/1720) 3. [Gitea pages on a separate domain](https://github.com/go-gitea/gitea/issues/302) 4. [Separate domain for raw files](https://github.com/go-gitea/gitea/pull/685) 5. Redirect old URLs 6. Set timeouts 7. Listen on multiple domains and IPs Many of the issues listed above could be fixed very easily if we integrate Caddy into Gitea.
GiteaMirror added the type/proposal label 2025-11-02 03:33:51 -06:00
Author
Owner

@appleboy commented on GitHub (May 13, 2017):

I will integrate Let's Encrypt with multiple domains and redirect HTTP to HTTPS.

@appleboy commented on GitHub (May 13, 2017): I will integrate Let's Encrypt with multiple domains and redirect HTTP to HTTPS.
Author
Owner

@sondr3 commented on GitHub (May 14, 2017):

As long as it's optional, I use nginx for everything on my server and would like to keep it how it is right now with Gitea behind nginx. Besides, I don't really understand the need for all of this in Gitea.

@sondr3 commented on GitHub (May 14, 2017): As long as it's optional, I use nginx for everything on my server and would like to keep it how it is right now with Gitea behind nginx. Besides, I don't really understand the need for all of this in Gitea.
Author
Owner

@sapk commented on GitHub (May 14, 2017):

I think that it is not the role of gitea to handle all of specific frontend config. For exemple in gitea-infrastructure we use traefik and we should let that choice to user for setting inside is own env. gitea should only offer a simple http interface maybe some additional sugary but we should keep it simple.

@sapk commented on GitHub (May 14, 2017): I think that it is not the role of gitea to handle all of specific frontend config. For exemple in gitea-infrastructure we use traefik and we should let that choice to user for setting inside is own env. gitea should only offer a simple http interface maybe some additional sugary but we should keep it simple.
Author
Owner

@kolaente commented on GitHub (May 28, 2017):

What about http/2? (For which you would need a secure connection over https)

@kolaente commented on GitHub (May 28, 2017): What about http/2? (For which you would need a secure connection over https)
Author
Owner

@bkcsoft commented on GitHub (Jun 11, 2017):

Just make gitea a caddy-plugin :trollface:

@bkcsoft commented on GitHub (Jun 11, 2017): Just make gitea a caddy-plugin :trollface:
Author
Owner

@ShalokShalom commented on GitHub (Jul 27, 2017):

+1

@ShalokShalom commented on GitHub (Jul 27, 2017): +1
Author
Owner

@ShalokShalom commented on GitHub (Jul 27, 2017):

@sapk I see this more as an optional choice. Add it to the documentation, support it.
Especially Gitea Pages is very important to me and a fundamental benefit to Github.
They offer only support for Jekkyl, one of some hundred of static site generators.
Open source is all about easy access, otherwise is it just hypocrisy.
Caddy offers https for everyone, in a very simple way. This means a secure internet connection and easy webpages for everyone. I think this is a great idea.

@ShalokShalom commented on GitHub (Jul 27, 2017): @sapk I see this more as an optional choice. Add it to the documentation, support it. Especially Gitea Pages is very important to me and a fundamental benefit to Github. They offer only support for Jekkyl, one of some hundred of static site generators. Open source is all about easy access, otherwise is it just hypocrisy. Caddy offers https for everyone, in a very simple way. This means a secure internet connection and easy webpages for everyone. I think this is a great idea.
Author
Owner

@sapk commented on GitHub (Jul 27, 2017):

We could describe how to use caddy and gitea side by side to work like github pages that not that difficult and everything needed is allready here. Just use the git plugin of caddy to pull changes and execute a command (hugo, jekyll or otherq) if needed.

@sapk commented on GitHub (Jul 27, 2017): We could describe how to use caddy and gitea side by side to work like github pages that not that difficult and everything needed is allready here. Just use the git plugin of caddy to pull changes and execute a command (hugo, jekyll or otherq) if needed.
Author
Owner

@ShalokShalom commented on GitHub (Jul 27, 2017):

Github pages work only with Jekkyl. Gitlab pages offer support for more. I am for IPFS anyway:

It is a distributed peer-to-peer network, which offers the hosting of static sites:

https://ipfs.io/
https://ipfs.io/ipfs/QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS/2015/09/15/hosting-a-website-on-ipfs/

@ShalokShalom commented on GitHub (Jul 27, 2017): Github pages work only with Jekkyl. Gitlab pages offer support for more. I am for IPFS anyway: It is a distributed peer-to-peer network, which offers the hosting of static sites: https://ipfs.io/ https://ipfs.io/ipfs/QmdPtC3T7Kcu9iJg6hYzLBWR5XCDcYMY7HV685E3kH3EcS/2015/09/15/hosting-a-website-on-ipfs/
Author
Owner

@aoyawale commented on GitHub (Aug 30, 2017):

I agree on using nginx/http for the web server and configs

@aoyawale commented on GitHub (Aug 30, 2017): I agree on using nginx/http for the web server and configs
Author
Owner

@mvdkleijn commented on GitHub (Sep 3, 2020):

I'm very interested in this discussion... not so much because of caddy... but on what this discussion implies.

Is Gitea going to try to do it all... or is Gitea going to do one thing and rely on integration options for the non-core stuff...

Seems to me that a product like Gitea should focus on the core: git repo management, issues and wiki and rely on proper documentation and integration options for the other stuff. That would be my hope anyway.

Open source is about choice. Stuffing everything into Gitea, creating a big monolithic application in the process, would be horrible.

@mvdkleijn commented on GitHub (Sep 3, 2020): I'm very interested in this discussion... not so much because of caddy... but on what this discussion implies. Is Gitea going to try to do it all... or is Gitea going to do one thing and rely on integration options for the non-core stuff... Seems to me that a product like Gitea should focus on the core: git repo management, issues and wiki and rely on proper documentation and integration options for the other stuff. That would be my hope anyway. Open source is about choice. Stuffing everything into Gitea, creating a big monolithic application in the process, would be horrible.
Author
Owner

@techknowlogick commented on GitHub (Sep 3, 2020):

Closing as caddy in front of Gitea currently works.

@techknowlogick commented on GitHub (Sep 3, 2020): Closing as caddy in front of Gitea currently works.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#711