-
Notifications
You must be signed in to change notification settings - Fork 6k
Need a complete example for how to use the --proxy-domain feature ... #1838
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
Comments
code-server has a built-in reverse proxy for proxying ports on the same server code-server is running on. For example, if you had some Webpack development server running on port 8000 you could access it through
Hopefully that clears up For multi-tenancy these might be helpful: |
Hi @code-asher Thank you for your reply. I think I understand, but let's use a concrete example. Let's say I have a So a
These instances are ephemeral (e.g. start when a user logs in; terminate when they log out). Using this example, how, if possible, can (Note: These can't run in their own containers, for separate design reasons). Thank you. |
In this case I think you would run code-server with something like:
Then if I'm user |
Although I may have misunderstood what you meant by "avoid opening up all of those ports". If you mean the per-user ports, |
Exactly. I didn't mention |
That's what I suspected but needed a little hand-holding to be certain. =:) Thank you. |
No problem! I'll go ahead and close the issue but please feel free to drop more questions here. If you happen to have any ideas on improving the FAQ entry let me know as well. |
Can code-server's domain and --proxy-domain be different? For example: my code-server is running at xxyy.selfmade.codes Now the code-server running at xxyy.selfmade.codes is showing port.fun.selfmade.fun when forwarded. But when I click, it is asking for password. Any idea how to solve this? |
Yup, that should work just fine but cookies are not cross-domain so unfortunately you will end up needing to log in again. It should set one at There is not currently a mechanism for cross-domain authentication although if someone is interested enough to implement it please feel free to submit a PR. A workaround might be to use external authentication. |
Hello Friends:
I've been searching for, as well as playing with the
--proxy-domain
feature ofcode-server(1)
, but I can't yet understand how to use it. I suspect it may be useful for my use-case, but need a complete example of how to use it. Can friends here provide amulti-user / multi-instance
example illustrating how each connecting user would get routed to it's awaitingcode-server(1)
instance?Thank you in advance. (◠﹏◠)
The text was updated successfully, but these errors were encountered: