Coder.com

C

Coder.com

Community server for Coder.com, an open-source platform for cloud development environments.

Join

Coder in VSCode sometimes stuck on embedded relay and not switching to peer-to-peer

This is a follow up from https://discord.com/channels/747933592273027093/971231372373033030/1236740492172071127 To sum it up again: Some days my VSCode almost immediately switches to peer-to-peer, others it's stuck on the coder embedded relay all day long. My network doesn't change, my firewall settings don't change, my coder server doesn't change. As for vscode extension version I'm not aware if there's a connection as that updates automatically in the background, but since it's been an on-off thing and not a one time "oh it broke" situation I'd assume it has nothing to do with the extension either. Not unlikely that some external factors like my ISP having a bad day are the cause of this, but I have no idea how I would approach debugging this....

github authentication

I'm trying to use devcontainers (on GCP VM). It appears the devcontainer setup only supports cloning using https. However, for private repos I can't get github authentication to work. In the coder web dashboard I can see I've connected github to my coder account....
Solution:
export CODER_EXTERNAL_AUTH_0_ID="something-github" export CODER_EXTERNAL_AUTH_0_TYPE="github" export CODER_EXTERNAL_AUTH_0_CLIENT_ID=some_id export CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=some_secret...

Allow everyone from OIDC

Hi. I am trying to allow everyone from my OpenID Connect. Since we self host our openid, we would like to allow everyone who login from there. How can we achieve that? Thanks!

invalid character '<' looking for beginning of value

Running coder command line tool on macos I keep getting the above error for most commands (e.g. coder templates push) coder --version Coder v2.10.2+a11b169 Mon Apr 22 20:27:37 UTC 2024 https://github.com/coder/coder/commit/a11b1690298cb067b26b06de530d4b3f886efad1...

Websocket issues with code-server

Hello there, I'm running a Coder deployment on tailscale. I am starting to experience some websocket issues when I launch code-server. I've attached the console logs that I see, and also the error that appears in code-server. Any clues as to what could be causing the problem? Are there any logs I can provide to locate the issue?
No description

coder_2.10.2_windows_amd64_installer.exe vs. WSL installation method for code-server? (VS-CODE)

Hey all! I tried using coder_2.10.2_windows_amd64_installer.exe installation and get the Error: Invalid Coder SSH authority. Agent not found! error message. On the web interface, I get a status code 500 error on the Deployment > General page. Just to start things off, I would ideally like to have a simple localhost environment that I can pair my PC and laptop together to test out VS-code environment sharing, then move on from there. Is there something I may have glazed over in the guides? Is there a video tutorial that might help me specifically?...

Migrating Coder-OSS data to a new server

Is it possible to transfer data from an old Coder-OSS server containing live workspaces to a new one without having to manually dump the database from the old server, copy the /var/lib/docker and sync them through rsync? This process is usually very slow and inconvenient, and it is further complicated by the fact that my old server is running on Hyper-V while the new server is running TrueNAS, which are incompatible with each other.
Solution:
If your workspaces are ephemeral , just stop all workspaces and moving the postgres databse should be enough

How to use experimental port sharing

I am currently running latest coder-preview image and have this set as environment variable for Coder instance:
environment:
CODER_EXPERIMENTAL: "true"
environment:
CODER_EXPERIMENTAL: "true"
...
Solution:
It's CODER_EXPERIMENTS: "shared-ports"
No description

Recovering from disaster

There has been a disaster with our hypervisor that runs our Coder-OSS server. We installed Coder on Ubuntu and used it with its default settings, including the built-in PostgreSQL database. The disaster has caused issues with the Coder server. Although we can still run coder server, attempting to access the dashboard yields the following error: ```...
Solution:
I was able to successfully restore the SQL dump to the Coder database that is built-in. The process was completed using: PGPASSWORD=$(cat /home/coder/.config/coderv2/postgres/password) psql -h localhost -p $(cat /home/coder/.config/coderv2/postgres/port) -U coder -d coder -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;" -f coder.sql...
No description

how do i get coder to run all the time?

I understand what the below error literally means. just not in the context of coder. listen tcp 127.0.0.1:3000: bind: address already in use i ran the coder v2 install script and then set coder service to enable and run on reboot. but get the above error. so then i kill the process on port 3000. and run $coder server and everything works. but the coder server doesn’t run 24/7. because i killed the process...
Solution:
What if you change it like this ```env #CODER_ACCESS_URL= CODER_HTTP_ADDRESS=127.0.0.1:3000 #CODER_PG_CONNECTION_URL=...

Access URL is not being used while port-forwarding.

echo $CODER_ACCESS_URL
https://code.ay0ks.wtf
echo $CODER_ACCESS_URL
https://code.ay0ks.wtf
```sh...

Session token expiration date

Hello, I have a problem with coder session token (the one generated here: https://<MY_CODER_SERVER>/cli-auth). I can't find how to limit this token life duration, is it like api token (100y default) ? I don't think so because I can't see it while running "coder token ls". ...
Solution:
CLI API keys last for 7 days

home directory of user changed owner to ubuntu user

Hello, after the last update I made a small change in the template, just added one line into the apt-get install command to include the ZIP utility. Now the whole folder of the user is owned by user ubuntu from group ubuntu and not the user that runs the workspace. ...
Solution:
Thank you. We should probably pin Ubuntu version in the example templates
No description

Standard Kube install fails for docker template

I followed the standard guide to install Coder on our Kubernetes offer (I work at OVHcloud) Coder starts well but when I try to create a Docker template, I have an error about Docker daemon. I do not see any explanation on specific modification to do on deployement so I'm all ears to any advice. Error =>...
Solution:
yeah the general expectation with k8s is that the backend could be anything, it doesn't have to be docker

Coder AWS EC2 (Linux) template not working for me :/

So I just started using coder, and wanted to make a persistence workspace, cause I tried the docker version, and it was non-persistent. So I used the template, and created a workspace. Everything works fine, the EC2 instance was made, but when the instance finished its 2 status checks, the coder workspace keeps having an error that "Workspace is u healthy" I restarted the workspace and the error persists. I have used the docker template workspace and it works fine for me. ...

Are the coder credits we assign daily?

If we assign some credits to a group, are those daily refilled?

Unable To Use DERP On Cloudflare Tunnel

Recently I have setup my home server to use a cloudflare tunnel allowing me to access coder via a zero trust verification process on the public internet or immediately when connecting to the respective cloudflare private network. This is highly convenient for me, however I noticed in the health tab that my performance may be degraded since the "Upgrade: DERP" header may be blocked on the load balancer, this is clearly due to the cloudflare tunnel however I couldn't see a solution when in the cloudflare dashboard. I wondered if anybody knew how to allow specific headers on the cloudflare network. Thank You...
Solution:
Indeed, I am primarily using public hostnames, the private network is only used in one special case. So it sounds as if the UDP protocol isn’t supported when using public hostnames on cloudflare tunnels, hence Coder cannot use DERP and defaults to using web sockets. Is that essentially what you are saying?

Sharing Jupyter Notebooks?

I've long used Colab notebooks with Google, and they're amazing. I'm now having to use Jupyter Notebooks in VS Code, and am really frustrated that there isn't, as far as I can tell, a lightweight way of sharing them with my team, without basically checking them into Github, which feels like too much of a heavyweight process, for what should be easily shareable things. Does anyone know a way to share a Jupyter notebook from my Coder instance? IE So I could them something like https://coder.office.adept-id.com/@Winton/Winton-Instance/MyNotebook.ipynb? Cheers,...
Solution:
You need to pass share = "public" to be able to share the link with others (be cautious as it will make it accessible to everyone on the network)

Implementing IP-Based Access Control for workspaces

Is there a way to limit access to workspace based on the source IP address? I am developing an application that utilizes the Coder's REST API. A workspace may have a distinct set of allowed or prohibited IP addresses. Is there a good solution available for this?

Workspaces have been stopping while I am using them

I currently have all of my workspaces set with an auto stop of 24 hours. Ideally, what I'm after is to have my time left extend to that 24 hours each time I use the computer, but I have recently had several times where I am using a workspace, then it drops off. When I dig into it, it shuts off because the auto stop timer hit 0. What's weird is that the "Last used" says "Now" correctly when I am using it, but it does anyway. I'm opening this thread to ask two questions: 1. Under what conditions is that auto stop timer extended and how can I check that it should be being extended?...