HeyPuter / puter

🌐 The Internet OS! Free, Open-Source, and Self-Hostable.
https://puter.com
GNU Affero General Public License v3.0
25.74k stars 1.69k forks source link

Maybe add instructions to setup puter behind a reverse proxy #716

Open dmuiX opened 2 months ago

dmuiX commented 2 months ago

I am using swag as a reverse proxy for my docker installation. I did not find much information about how to configure puter to make it available behind my proxy. Actually very easy:

  1. Add a custom config to swag
  2. Add CNAME entry to the DNS server in my case pihole
  3. add the domain name in the puter/config/config.json file
  4. DNS resolves for the domain, and the api. subdomain on that domain http_port is set to the port Puter is listening on (auto will use 4100 unless that port is in use) pub_port is set to the external port (ex: 443 if you're using a reverse proxy that serves over https)

step 3 is not written anywhere!

KernelDeimos commented 2 months ago

Hello,

We have setup instructions here but not linked in README.md.

As for reverse proxy configuration, I see a potential issue with that. If you didn't specify swag, I would have written configuration instructions for nginx. Someone else might be using Apache. I'm sure there are two dozen or so reverse proxies written in Golang because that would be very easy to do. For this reason such documentation seems out of scope, but I like the idea of having community-contributed documentation under doc/community. Feel free to submit a PR for swag documentation in this directory.

dmuiX commented 2 months ago

👍. Yeah of course I had the same thought about a dozen reverse proxies and different configurations. But the configuration inside puter is the same each time. So it Would be very nice to have that additional documentations linked in README.md somehow! Like a section "here are some additional configuration options eg. Reverse proxies!". I was really feeling lost while I was setting it up yesterday as I couldn't find any instructions on that topic at all. In the end I was searching for issues and did find some informations there.