Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: clarify access URL in install flow #5626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func Server(vip *viper.Viper, newAPI func(context.Context, *coderd.Options) (*co
return xerrors.Errorf("TLS address must be set if TLS is enabled")
}
if !cfg.TLS.Enable.Value && cfg.HTTPAddress.Value == "" {
return xerrors.Errorf("either HTTP or TLS must be enabled")
return xerrors.Errorf("TLS is disabled. Enable with --tls-enable or specify a HTTP address")
}

printLogo(cmd)
Expand Down
2 changes: 1 addition & 1 deletion cli/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ func TestServer(t *testing.T) {
)
err := root.ExecuteContext(ctx)
require.Error(t, err)
require.ErrorContains(t, err, "either HTTP or TLS must be enabled")
require.ErrorContains(t, err, "TLS is disabled. Enable with --tls-enable or specify a HTTP address")
})

t.Run("NoTLSAddress", func(t *testing.T) {
Expand Down
21 changes: 20 additions & 1 deletion docs/admin/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ should not be localhost.
If an access URL is not specified, Coder will create
a publicly accessible URL to reverse proxy your deployment for simple setup.

## Address

You can change which port(s) Coder listens on.

```sh
# Listen on port 80
export CODER_HTTP_ADDRESS=0.0.0.0:80
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you are using 0.0.0.0:80 but in L77 you are using 127.0.0.1:3000

This is a confusion.


# Enable TLS and listen on port 443)
export CODER_TLS_ENABLE=true
export CODER_TLS_ADDRESS=0.0.0.0:443

## Redirect from HTTP to HTTPS
export CODER_TLS_REDIRECT_HTTP=true

# Start the Coder server
coder server
```

## Wildcard access URL

`CODER_WILDCARD_ACCESS_URL` is necessary for [port forwarding](../networking/port-forwarding.md#dashboard)
Expand Down Expand Up @@ -55,7 +74,7 @@ configure the server by setting the following variables in `/etc/coder.d/coder.e
CODER_ACCESS_URL=https://coder.example.com

# String. Address to serve the API and dashboard.
CODER_ADDRESS=127.0.0.1:3000
CODER_HTTP_ADDRESS=127.0.0.1:3000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CODER_HTTP_ADDRESS=127.0.0.1:3000
CODER_HTTP_ADDRESS=0.0.0.0:3000

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure the default is the loopback address, according to the help text.


# String. The URL of a PostgreSQL database to connect to. If empty, PostgreSQL binaries
# will be downloaded from Maven (https://repo1.maven.org/maven2) and store all
Expand Down
5 changes: 3 additions & 2 deletions docs/install/install.sh.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ You can modify the installation process by including flags. Run the help command
curl -fsSL https://coder.com/install.sh | sh -s -- --help
```

After installing, use the instructions in your terminal to start the Coder server and create your first account.
After installing, use the in-terminal instructions to start the Coder server manually via `coder server` or as a system package.

By default, the Coder server runs on `http://127.0.0.1:3000` and uses a [public tunnel](../admin/configure.md#tunnel) for workspace connections.

## Next steps

- [Quickstart](../quickstart.md)
- [Configuring Coder](../admin/configure.md)
- [Templates](../templates.md)
7 changes: 5 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ echo_systemd_postinstall() {
cath <<EOF
$1 package has been installed.

Run Coder:
To run a Coder server:

# Start Coder now and on reboot
$ sudo systemctl enable --now coder
Expand All @@ -128,7 +128,10 @@ Run Coder:
# Or just run the server directly
$ coder server

Use Coder:
Default URL: http://127.0.0.1:3000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Default URL is :8080

Copy link
Member Author

@bpmct bpmct Jan 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is for ./scripts/develop.sh, but not when you install the binary/package

Configuring Coder: https://coder.com/docs/coder-oss/admin/configure

To connect to a Coder deployment:

$ coder login <deployment url>

Expand Down