mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
docs: clarify access URL in install flow (#5626)
* fix: TLS disabled copy * clarify default access URL * add docs for coder address
This commit is contained in:
@ -112,7 +112,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")
|
||||
}
|
||||
|
||||
// Disable rate limits if the `--dangerous-disable-rate-limits` flag
|
||||
|
@ -742,7 +742,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) {
|
||||
|
@ -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
|
||||
|
||||
# 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)
|
||||
@ -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
|
||||
|
||||
# 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
|
||||
|
@ -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)
|
||||
|
@ -128,7 +128,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
|
||||
@ -137,7 +137,10 @@ Run Coder:
|
||||
# Or just run the server directly
|
||||
$ coder server
|
||||
|
||||
Use Coder:
|
||||
Default URL: http://127.0.0.1:3000
|
||||
Configuring Coder: https://coder.com/docs/coder-oss/admin/configure
|
||||
|
||||
To connect to a Coder deployment:
|
||||
|
||||
$ coder login <deployment url>
|
||||
|
||||
|
Reference in New Issue
Block a user