Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing local computer's COSMOS instance to the web? #1765

Open
jwestra-carrastro opened this issue Jul 28, 2022 · 4 comments
Open

Exposing local computer's COSMOS instance to the web? #1765

jwestra-carrastro opened this issue Jul 28, 2022 · 4 comments

Comments

@jwestra-carrastro
Copy link

I am having trouble making my COSMOS instance accessible via external networks. I would like to be able to type MY_LOCAL_IP:2900 or MY_PUBLIC_IP:2900 into my browser on my local computer, or MY_PUBLIC_IP:2900 on another computer, and have COSMOS come up just as it does when I type in localhost:2900 on my local computer.

In compose.yaml I have modified the traefik ports from the default 127.0.0.1:2900:80 and 127.0.0.1:2943:443 to just 2900:80 and 2943:443, so that ip's other than localhost can see COSMOS. I am also having my router port forward 2900 to 2900 and 2943 to 2943. In theory, this should mean that I can type MY_LOCAL_IP:2900 or MY_PUBLIC_IP:2900 and COSMOS should come up. However, in both cases, COSMOS becomes the title of the tab and the COSMOS icon shows up as the tab's icon, but the page itself remains blank, and my browser informs me that my connection to the site isn't secure.

What is the proper way to make my local COSMOS instance accessible to the web?

@mteckes
Copy link

mteckes commented Jul 29, 2022

We have solved this on my team by removing in the index.ejs and the index-allow-http.ejs by removing the content security policy line of code. About like 29 on the index.ejs. You have to remove from both files.

@xjwillan
Copy link

I have made the changes suggested by @mteckes but I still cannot get the deployment to be exposed on my VM on my windows laptop. I am using vmware workstation and trying to get the IP for the VM exposed as described above. Any other suggestions?

@ryanmelt
Copy link
Contributor

See the opening to the network instructions here:
https://github.com/OpenC3/cosmos-project

@xjwillan
Copy link

xjwillan commented Dec 23, 2022

@ryanmelt thanks for the link. i tried all the options but i am still not able to access the UI unless i am on the guest VM. on the VM, no problem but when i try to access it from the host computers web browser (:2900) it's just a blank screen. I think it has to do something with my VM setup.

I had to use the cosmos repo, the openc3 won't build for me. I get an error that it can't reach the repository to pull images.

Edited: there was something wrong with my VM, i created a new one and now it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants