- Notifications
You must be signed in to change notification settings - Fork1k
Closed
Description
!!!!!!! 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
- 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
- Next step from docs says I should go to Quick Start
- I decided to go Rambo and do it myself, no manuals, let's find the configs!
systemctl status
shows:- That's gotta be it!
/home/coder/.config/coderv2
- That's gotta be it!
- There I found
/home/coder/.config/coderv2
and the content ishttp://127.0.0.1:3000
(AHA!) - Stopped Coder, updated the file with
https://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 of
CODER_ACCESS_URL
... no value set - Let's set it then...
- Getting info about the variables with
coder 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!
- Couldn't find any reference to
- 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 try
coder login http://127.0.0.1:3000
- And Coder nicely asks...
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.
- Team: @coder/docs
- Content Source:docs/install/install.sh.md
Metadata
Metadata
Assignees
Labels
No labels