Open rajivraghu opened 1 month ago
Same error for docker compose on linux
I suspect this is because you might be using a custom domain. Could you follow the instructions here and let me know if the issue persists?
I'm running in docker compose, i have an /etc/puter/config.json. I ensured the domain is set:
docker exec -it browzerdc-puter-1 grep domain /etc/puter/config.json
"domain": "puter.clint.demo.openziti.org",
I bounced the container via compose down / compose up yet still the header seems not to be respected. Is it possible to mount in the config to be sure it's the proper one being read/used?
I tried running interactively to see if there was any log on startup indicating the domain being used but there's no log. I also found and edited the 'protocol' but still no luck.
"protocol": "https",
It's an interesting demo, I like using it if I can get by this
I was trying to install Puter locally, kept getting this same error: Hardware: CPU: Intel i7 RAM: 16gb SSD: 128gb
NodeJs tried: 18, 21, 22, 23 (none worked) npm: 10.9
OS: Ubuntu Server 23, Zorin OS 17.2
I tried all options above, tried reinstalling multiple times, tried openning both with IP:4100 and with http://puter.localhost:4100
I get nothing at all with puter.localhost, and IP:4100 returns "Invalid Host header."
What am I missing here?
I have also encountered the same issue and have tried it in different environments.
We're missing a piece of information to resolve this issue; I don't know how to reproduce this without configuring the domain incorrectly. If anybody can provide clear reproduction steps, that will help us resolve this issue. I expect this happens on environments that are difficult to support or is a common configuration mistake that we need to document more clearly.
Here's why this issue specifically impacts Puter, while you might not run into this issue with other projects:
(tangent: If browsers supported multiple "virtual" origins on a single origin, all of this would be a lot easier, and projects like Puter could be hosted securely without needing domain configuration at all. It seems crazy to me that this isn't a thing yet.)
i've tried this on ubuntu 22.04 with NO domain, just plain vanilla deployment
administrator@UBNT001:~$ hostname -f UBNT001
@KernelDeimos I am not the OP. But I would like to provide detailed instructions on how to reproduce the issue. I am not using an external domain. Everything is internal to my network. Here is the docker-compose file I am using -
puter/data
and puter/config
directories:mkdir -p /opt/puter/data /opt/puter/config
mkdir -p /opt/puter/config
chown -R 1000:1000 /opt/puter
I am using Dockage to maintain my containers, but I don't think that should matter. Here is the docker-compose I am using:
services:
puter:
container_name: puter
image: ghcr.io/heyputer/puter:latest
pull_policy: always
restart: unless-stopped
ports:
- 4100:4100
environment:
TZ: America/Chicago
# CONFIG_PATH: /etc/puter
PUID: 1000
PGID: 1000
volumes:
- /opt/puter/config:/etc/puter
- /opt/puter/data:/var/puter
healthcheck:
test: wget --no-verbose --tries=1 --spider http://puter.localhost:4100/test ||
exit 1
interval: 30s
timeout: 3s
retries: 3
start_period: 30s
networks: {}
At this stage, just hit deploy
in Dockage, which is equivalent to docker compose up -d
Note that 192.168.1.228 is my local IP. At this point, I am presented with Invalid Host header.
as the only text on the webpage.
I have the same problem, just copied the docker compose file, docker compose up -d, I open the IP with the correct port and it presents the message "Invalid host header". It's the simplest setup so I'm lost.
Please correct me if I'm wrong, but I believe the last three replies all have this in common:
For security reasons, because of how CORS works, Puter requires multiple origins. This also rules out connecting directly with an IP address. It sucks, and there's very little we can do about it because we're at the mercy of how web browsers work.
Thanks for explaining this. I am not going to pretend I understood everything. However, if I spin up a new container in Proxmox, and then follow the exact directions for docker compose, this should work?
Thanks for explaining this. I am not going to pretend I understood everything. However, if I spin up a new container in Proxmox, and then follow the exact directions for docker compose, this should work?
localhost:4100
will not work. you'll need to have it behind a reverse proxy. change the domain in config.json from puter.localhost
to puter.yourdomain.com
Same error for docker compose on linux
I had the same problem and take a lot of tries fixing it. All works fine just after I change volatile/config/config.json
with my domain, same as I make in /etc/hosts
on my other machine.
I discovered a service called nip.io
. For anyone wishing for this to work without setting up a domain, you can use this service because it allows for the api.
subdomain to be prepended to the "ip address" (the nip.io
domain that represents the IP address).
For anyone wishing to get an existing domain working, I believe what @andrew-Go1 said is the solution for most cases. I'm open to suggestions on how we can make this simpler to configure or easier to understand, since this seems to be a very common blocker for people.
Hello Dev, I opened the project in github codespace.. did npm install npm start
then i port forwaded
When i open the url that github codespace provides ... Ex:https://improved-disco-jgrv49xw4p3qjgj-4100.app.github.dev/ It says invalid host header