Would it be possible to create users or separate password protected workspaces? #3606
-
We run code-server on a school website used for our computer science courses and were wondering if it would be possible to set up separate private workspaces for each student? For example each student would get their own folder that only the teacher and them can see to save and work on all their code. Each student has their own account on the website that has their own folder but I can't find a way to link their account/account folder and code-server without it being accessible to other students. My teacher had this setup in the past but I can't figure out how to reset it up as we had to reinstall code-server. With it previously setup students had to log into a remote workspace with their account credentials for the website and that would give them access to their student folder where they could create and save files. He also told me the that code-server would automatically grab the account credentials from the website so he didn't have to make another account on VS. If anyone has some insight or advice on how I could reset this up it would be greatly appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
This is a really interesting use case! @bpmct might have a good answer |
Beta Was this translation helpful? Give feedback.
-
I think you can do this with docker-code-server: https://github.com/linuxserver/docker-code-server. You will need to start a container for each student and map his/her folder to /config inside the container. The folder may be secured by user and you may pass in PUID and PGID when you kick off the container, like:
You may want to setup a traefik reverse proxy on the same server, which will allow you to use a wildcard subdomain or path to distinguish users. https://doc.traefik.io/traefik/getting-started/quick-start/ |
Beta Was this translation helpful? Give feedback.
-
@bklogic explains well how to do it with Docker. Pomerium can also be used to put code-server behind an identity-aware proxy. Here is a guide we recently updated: https://www.pomerium.io/guides/code-server.html There are also a few projects, such as Kubesail or pojde which make it pretty trivial to run multiple code-server instances on the same host, for multiple users. -- Coder is our platform for teams or large organizations to develop in the cloud. We support code-server as well as JetBrains, and Remote SSH. Coder is a good fit if security is important or you have many users, organizations, or different workloads for different teams. |
Beta Was this translation helpful? Give feedback.
@bklogic explains well how to do it with Docker. Pomerium can also be used to put code-server behind an identity-aware proxy. Here is a guide we recently updated: https://www.pomerium.io/guides/code-server.html
There are also a few projects, such as Kubesail or pojde which make it pretty trivial to run multiple code-server instances on the same host, for multiple users.
--
Coder is our platform for teams or large organizations to develop in the cloud. We support code-server as well as JetBrains, and Remote SSH. Coder is a good fit if security is important or you have many users, organizations, or different workloads for different teams.