Skip to content

Commit 5b54368

Browse files
committed
updated with suggested changes
1 parent 30163f4 commit 5b54368

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

docs/admin/configure.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ of the options, run `coder server --help` on the host.
44
## Access URL
55

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

1010
> Access URL should be a external IP address or domain with DNS records pointing to Coder.
@@ -53,16 +53,16 @@ The Coder server can directly use TLS certificates with `CODER_TLS_ENABLE` and a
5353

5454
Coder uses a PostgreSQL database to store users, workspace metadata, and other deployment information.
5555
Use `CODER_PG_CONNECTION_URL` to set the database that Coder connects to. If unset, PostgreSQL binaries will be
56-
downloaded from Maven (https://repo1.maven.org/maven2) and store all data in the config root.
56+
downloaded from Maven (<https://repo1.maven.org/maven2>) and store all data in the config root.
5757

5858
> Postgres 13 is the minimum supported version.
5959
6060
If you are using the built-in PostgreSQL deployment and need to use `psql` (aka
6161
the PostgreSQL interactive terminal), output the connection URL with the following command:
6262

6363
```console
64-
$ coder server postgres-builtin-url
65-
$ psql "postgres://coder@localhost:49627/coder?sslmode=disable&password=feU...yI1"
64+
coder server postgres-builtin-url
65+
psql "postgres://coder@localhost:49627/coder?sslmode=disable&password=feU...yI1"
6666
```
6767

6868
## System packages

examples/web-server/nginx/README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Requirements
44

5-
1. Start a Coder deployment with a wildcard subdomain. See [this guide](https://coder.com/docs/v2/latest/admin/configure#wildcard-access-url) for more information.
5+
1. Start a Coder deployment and be sure to set the following [configuration values](https://coder.com/docs/v2/latest/admin/configure):.
66

7-
2. Configure your DNS provider to point your YOUR_SUBDOMAIN and \*.YOUR_SUBDOMAIN to your server's public IP address.
7+
2. Configure your DNS provider to point your CODER_SUBDOMAIN and \*.CODER_SUBDOMAIN to your server's public IP address.
88

99
> For example, to use `coder.example.com` as your subdomain, configure `coder.example.com` and `*.coder.example.com` to point to your server's public ip. This can be done by adding A records in your DNS provider's dashboard.
1010
@@ -22,18 +22,18 @@
2222

2323
## Adding Coder deployment subdomain
2424

25-
> This example assumes Coder is running locally on `127.0.0.1:3000` for the subdomain `YOUR_SUBDOMAIN` e.g. `coder.example.com`.
25+
> This example assumes Coder is running locally on `127.0.0.1:3000` for the subdomain `CODER_SUBDOMAIN` e.g. `coder.example.com`.
2626
2727
1. Create NGINX configuration for this app:
2828

2929
```console
30-
sudo touch /etc/nginx/sites-available/YOUR_SUBDOMAIN
30+
sudo touch /etc/nginx/sites-available/CODER_SUBDOMAIN
3131
```
3232

3333
2. Activate this file:
3434

3535
```console
36-
sudo ln -s /etc/nginx/sites-available/YOUR_SUBDOMAIN /etc/nginx/sites-enabled/YOUR_SUBDOMAIN
36+
sudo ln -s /etc/nginx/sites-available/CODER_SUBDOMAIN /etc/nginx/sites-enabled/CODER_SUBDOMAIN
3737
```
3838

3939
## Install and configure LetsEncrypt Certbot
@@ -52,6 +52,12 @@
5252
dns_cloudflare_api_token = YOUR_API_TOKEN
5353
```
5454

55+
```console
56+
mkdir -p ~/.secrets/certbot
57+
touch ~/.secrets/certbot/cloudflare.ini
58+
vi ~/.secrets/certbot/cloudflare.ini
59+
```
60+
5561
3. Set the correct permissions:
5662

5763
```console
@@ -71,14 +77,14 @@
7177
1. Edit the file with:
7278

7379
```console
74-
sudo nano /etc/nginx/sites-available/YOUR_SUBDOMAIN
80+
sudo nano /etc/nginx/sites-available/CODER_SUBDOMAIN
7581
```
7682

7783
2. Add the following content:
7884

7985
```nginx
8086
server {
81-
server_name YOUR_SUBDOMAIN *.YOUR_SUBDOMAIN;
87+
server_name CODER_SUBDOMAIN *.CODER_SUBDOMAIN;
8288
8389
# HTTP configuration
8490
listen 80;
@@ -92,8 +98,8 @@
9298
# HTTPS configuration
9399
listen [::]:443 ssl ipv6only=on;
94100
listen 443 ssl;
95-
ssl_certificate /etc/letsencrypt/live/YOUR_SUBDOMAIN/fullchain.pem;
96-
ssl_certificate_key /etc/letsencrypt/live/YOUR_SUBDOMAIN/privkey.pem;
101+
ssl_certificate /etc/letsencrypt/live/CODER_SUBDOMAIN/fullchain.pem;
102+
ssl_certificate_key /etc/letsencrypt/live/CODER_SUBDOMAIN/privkey.pem;
97103
98104
location / {
99105
proxy_pass http://127.0.0.1:3000; # Change this to your coder deployment port default is 3000
@@ -110,7 +116,7 @@
110116
```
111117

112118
> Don't forget to change:
113-
> `YOUR_SUBDOMAIN` by your (sub)domain e.g. `coder.example.com`
119+
> `CODER_SUBDOMAIN` by your (sub)domain e.g. `coder.example.com`
114120
115121
3. Test the configuration:
116122

@@ -145,4 +151,4 @@
145151
sudo systemctl restart nginx
146152
```
147153

148-
And that's it, you should now be able to access Coder at `https://YOUR_SUBDOMAIN`!
154+
And that's it, you should now be able to access Coder at `https://CODER_SUBDOMAIN` e.g. `https://coder.example.com`.

0 commit comments

Comments
 (0)