Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Missing steps after installing via script #5564

Closed
Assignees
bpmct
@svallory

Description

@svallory
!!!!!!! NOTE: !!!!!!!Please don't take anything I say here too seriously.The only reason I have to report this reeeeealy bad experienceis that I think you guys have an AMAZING product (I've tried v1) and I really want you guys to succeed!

Here is my experience so far...

  • Created a new droplet on Digital Ocean with ubuntu 22.04
  • The docs say I should follow the instructions at the end, so I tried to
  • Started the server without issues but then "coder login " got me confused
  • First question: do I do that from the server or my machine?
    • Looked for a CLI, found it inside administration/automation, plus...
    • The page says "We recommend automating Coder deployments through the CLI."
    • I'm assuming I don't need that to use coder (if I'm a dev)
    • So I should I'll try running login running that command in the server via SSH
  • Second question: but what URL is that?
    • which URL? I didn't pick one!
    • Ok, maybe Coder will pick it up automatically so I won't try the server's IP so I don't have to reconfigure it
  • Configured a new subdomain pointing to the coder server
  • Tried to login using the new domain and got a cryptic message (for one who doesn't know Coder's login flow)
    build info: unexpected status code 521: unexpected non-JSON response ""Error: no response bodyunexpected non-JSON response "".Run 'coder login --help' for usage.
  • Ok, let's try the IP then...
    Failed to check server "https://161.35.116.193" for first user, is the URL correct and is coder accessible from your browser? Error - has initial user: do: Get "https://161.35.116.193/api/v2/users/first": dial tcp 161.35.116.193:443: connect: connection refusedRun 'coder login --help' for usage.
  • I see there is a "connection refused" on port 443
    • I have no firewall setup yet
  • Maybe it isn't running?
    • journalctl -u coder.service -b shows no message (btw, why do you ask users to run this after script completion?)
    • systemctl says it is active
  • Coder must be listening to the wrong port then, where is its configuration?
    • Next step from docs says I should go to Quick Start
      image
    • I decided to check there and it is another installation instruction using docker. There's in the "Installation" section and another (which looks way nicer) in the Quickstart
    • That makes me think: did I follow the right instructions? Maybe the whole "Installation" section is deprecated
  • I decided to go Rambo and do it myself, no manuals, let's find the configs!
  • systemctl status shows:
    image
    • That's gotta be it!/home/coder/.config/coderv2
  • There I found/home/coder/.config/coderv2 and the content ishttp://127.0.0.1:3000 (AHA!)
  • Stopped Coder, updated the file withhttps://sub.domain.com (let's use80 instead of3000), Started coder again
  • Trying to login again using the domain and got the "connection refused" error again
    • Oh... it has to be port 443!
  • Went to updated it again and, to my surprise,http://127.0.0.1:3000 was back!
  • Checked the docs again going straight to configuration section which states:
    Coder server's primary configuration is done via environment variables
    • Ok, my bad. I'm not Rambo after all, should have checked
  • Let's check how to configure the URL

    CODER_ACCESS_URL is required if you are not using the tunnel. Set this to the external URL that users and workspaces use to connect to Coder (e.g.https://coder.example.com/).This should not be localhost.

    • Wait,"This should not be localhost" ? Why is the default 127.0.0.1 then?
    • Maybe because the default is to use a tunnel? But that's the first time I'm hearing about it
    • Let's check the value ofCODER_ACCESS_URL... no value set
    • Let's set it then...
  • Getting info about the variables withcoder server --help shows two *_URL variables:
      --access-url string                            External URL to access your deployment.                                            This must be accessible by all                                            provisioned workspaces.                                            Consumes $CODER_ACCESS_URL  --url string            URL to a deployment.                          Consumes $CODER_URL
    • Couldn't find any reference to$CODER_URL in the docs so let's go with$CODER_ACCESS_URL
    • Aaaand this too:
         --global-config coder   Path to the global coder config directory.                          Consumes $CODER_CONFIG_DIR (default                          "/root/.config/coderv2")
    • Now I'm REALLY confused!
    • But let's go looking because I REEEEALLY wanna test coder out!
  • Found another config file by chance at/etc/coder.d/coder.env which has the variable I want \o/
  • Set it to my domain, making sure I'm using httpS and restarted Coder
  • Still no answer on:443 and content ofurl file is stillhttp://127.0.0.1:3000
  • So, just 'cause I had nothing to loose, I trycoder login http://127.0.0.1:3000
  • And Coder nicely asks...
    image

YES!!!! I stopped to write this issue and I Goshh I really hope I don't have to come back here hahahaha


Do not edit this section. It is required for GitHub issue linking.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp