code-server icon indicating copy to clipboard operation
code-server copied to clipboard

Proper way to use code-server with multiple team members

Open Muruloki opened this issue 7 years ago • 18 comments

Say in a simplest case i have a remote server which has several code repos, each one corresponding to a dev web server. Each dev env belongs to different developer. So something like this:

folder1 folder2 ... folder20

What's the best way to use code-server? Run only one instance and then everyone connects to it and opens their own folder or each developer runs their own instance of code-server?

The reason i'm asking is that I tried running one instance of code-server and open 10 folders in different tabs, it was becoming pretty slow on 3rd folder or so. Our codebase is pretty large. I wonder if everyone having its own code-server instance will be faster.

Another scenario is a server where each dev has multiple different code repos. I guess in this case it makes more sense to have code-server instance for each dev?

How was it designed to be used to begin with? :)

Muruloki avatar Mar 27 '19 17:03 Muruloki

Related issues https://github.com/codercom/code-server/issues/33 https://github.com/codercom/code-server/issues/274

MichaelDesantis avatar Mar 27 '19 19:03 MichaelDesantis

@Multishifties i think that one is a bit different and more advanced - looks like in that case they want to edit the same file simultaneously by different users.

My case is much easier - each dev has their own codebase so that scenario above isn't relevant. Sharing code is happening via git pull/push etc.

Muruloki avatar Mar 27 '19 19:03 Muruloki

Ah, ok. That makes sense.

We have a new release out that should speed things up a bit. Hopefully that will be enough to allow for an single instance to be used by multiple users at the same time.

That said, I see no major downside to running multiple instances of code-server if your computer can support it.

MichaelDesantis avatar Mar 27 '19 19:03 MichaelDesantis

Hi, I wanted to achieve the same as @Muruloki from what I understand (at least the second part), so I made this. It essentially downloads the binary release of code-server, makes a new image (cause I wanted to have the ability to add packages like gcc), and spins up containers on demand. I think it is somewhat orthogonal to code-server, but I could try to improve code quality and make a pull request if other people are interested.

rafket avatar Apr 01 '19 20:04 rafket

One use case of this would be using one code-server to provide individual working directories for each student in a class.

deansheather avatar May 13 '19 10:05 deansheather

Also another use case is one imstance to many developers as well.

sr229 avatar Jun 01 '19 00:06 sr229

I want my users to use their own ssh account as the login verification, and after the verification is passed, locate it in their own user directory. Is this possible by starting only one instance, what should I do?

HULANG-BTB avatar Jun 16 '19 12:06 HULANG-BTB

Multiple users using one instance in separate directories is currently not supported (neither is collaboration on a single directory).

deansheather avatar Jun 17 '19 10:06 deansheather

Ah, ok. That makes sense.

We have a new release out that should speed things up a bit. Hopefully that will be enough to allow for an single instance to be used by multiple users at the same time.

That said, I see no major downside to running multiple instances of code-server if your computer can support it.

Hi can I know what feature in the new release would allow this? Is it based on separate user login per each dev?

Awesome stuff as always.

Thank you.

HazwanHassan avatar Jul 04 '19 08:07 HazwanHassan

Will add to the FAQ.

nhooyr avatar Jan 28 '20 01:01 nhooyr

In the FAQ, I see it suggests use "kubevirt" for this. But I still don't get how to do it properly. Is there any detail or examples? thanks.

songkeys avatar Jun 29 '20 08:06 songkeys

Did anyone implement some solution? I'm currently working on a server to provide VSCode to multiple users in different folders

caio-vinicius avatar Sep 29 '20 17:09 caio-vinicius

Hello, dose this feature out? I have same requirement, 1 code server and 10 users, having their username, password and workspace.

makwanji avatar Oct 01 '20 02:10 makwanji

I don't think we have any specific examples on how to use KubeVirt or how to deploy with Kubernetes. There's a Helm chart in the works (https://github.com/cdr/code-server/pull/2048) that might be of use though.

code-asher avatar Oct 01 '20 18:10 code-asher

any update on this?

paulchill avatar Nov 23 '22 21:11 paulchill

@paulchill I might have some coming! What are you hoping for?

jsjoeio avatar Nov 30 '22 17:11 jsjoeio

The last week or so I've been trialing code server and love it so far. I spent most of today testing running multiple instances of code server for individual Ubuntu users via their own subdomain https.

seems ok but ideally a way as an admin we can run this on a large VM and configure the user accounts / settings rather then having access to their config.yaml files and such.

For example, i'm running as root.

sudo -H -u dev code-server --bind-addr x.x.x.x:8081 --disable-workspace-trust --disable-file-downloads --disable-telemetry --disable-getting-started-override --welcome-text "Log into your secure development portal" --app-name "Remote Development Portal" as a way to get it started but i also can't get this to work with systemctl as a service.

paulchill avatar Nov 30 '22 17:11 paulchill

@paulchill super super interesting! cc @bpmct

Have you trialed coder/coder yet? Wondering if that would suit your needs better.

jsjoeio avatar Nov 30 '22 17:11 jsjoeio