Skip to content

Commit bec5584

Browse files
committed
update install docs
1 parent fa59da0 commit bec5584

File tree

3 files changed

+100
-35
lines changed

3 files changed

+100
-35
lines changed

README.md

+17-34
Original file line numberDiff line numberDiff line change
@@ -56,47 +56,30 @@ You can use any Web IDE ([code-server](https://github.com/coder/code-server), [p
5656

5757
## Installing Coder
5858

59-
We recommend installing [the latest
60-
release](https://github.com/coder/coder/releases) on a system with at least 1
61-
CPU core and 2 GB RAM:
59+
There are a few ways to install Coder:
6260

63-
1. Download the [release asset](https://github.com/coder/coder/releases) appropriate for your operating system
64-
1. Unzip the folder you just downloaded, and move the `coder` executable to a location that's on your `PATH`
61+
- [install script](./docs/install.md#installsh) (MacOS & Linux). The script uses the system package manager if possible.
62+
- with [system packages](./docs/install.md#system-packages) (Debian, Fedora, Alpine)
63+
- with [Docker or docker-compose](./docs/install.md#docker-compose) (MacOS, Windows, Linux)
64+
- [manually](./docs/install.md#manual) (MacOS, Windows, Linux)
6565

66-
```sh
67-
# ex. MacOS and Linux
68-
mv coder /usr/local/bin
69-
```
66+
If you use the install script, you can preview what occurs during the install process:
7067

71-
Windows: see [this guide](https://answers.microsoft.com/en-us/windows/forum/all/adding-path-variable/97300613-20cb-4d85-8d0e-cc9d3549ba23) on adding a folder to `PATH`
72-
73-
There are a few ways to run Coder:
74-
75-
- To run a **temporary deployment**, start with dev mode (all data is in-memory and destroyed on exit):
76-
77-
```bash
78-
coder server --dev
79-
```
80-
81-
- To run a **production deployment** with PostgreSQL:
82-
83-
```bash
84-
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \
85-
coder server
86-
```
68+
```sh
69+
curl -fsSL https://coder.com/install.sh | sh -s -- --dry-run
70+
```
8771

88-
- To run as a **system service**, install with `.deb` (Debian, Ubuntu) or `.rpm` (Fedora, CentOS, RHEL, SUSE):
72+
To install, run:
8973

90-
```bash
91-
# Edit the configuration!
92-
sudo vim /etc/coder.d/coder.env
93-
sudo service coder restart
94-
```
74+
```sh
75+
curl -fsSL https://coder.com/install.sh | sh
76+
```
9577

96-
> macOS and Windows users: You'll need to write your own
97-
> configuration to run Coder as a system service.
78+
Once installed, you can run a temporary deployment in dev mode (all data is in-memory and destroyed on exit):
9879

99-
- See the [installation guide](./docs/install.md) for additional ways to run Coder (e.g., docker-compose)
80+
```sh
81+
coder server --dev
82+
```
10083

10184
Use `coder --help` to get a complete list of flags and environment variables.
10285

docs/install.md

+82
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,58 @@
22

33
This article walks you through the various ways of installing and deploying Coder.
44

5+
## install.sh
6+
7+
The easiest way to install Coder is to use our [install script](https://github.com/coder/coder/main/install.sh) for Linux and macOS. The install script
8+
attempts to use the system package manager detection-reference if possible.
9+
10+
You can preview what occurs during the install process:
11+
12+
```bash
13+
curl -fsSL https://coder.com/install.sh | sh -s -- --dry-run
14+
```
15+
16+
To install, run:
17+
18+
```bash
19+
curl -fsSL https://coder.com/install.sh | sh
20+
```
21+
22+
> If you're concerned about the install script's use of `curl | sh` and the
23+
> security implications, please see [this blog
24+
> post](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install)
25+
> by [sandstorm.io](https://sandstorm.io).
26+
27+
You can modify the installation process by including flags. Run the help command for reference:
28+
29+
```bash
30+
curl -fsSL https://coder.com/install.sh | sh -s -- --help
31+
```
32+
33+
## System packages
34+
35+
Coder publishes the following system packages [in GitHub releases](https://github.com/coder/coder/releases):
36+
37+
- .deb (Debian, Ubuntu)
38+
- .rpm (Fedora, CentOS, RHEL, SUSE)
39+
- .apk (Alpine)
40+
41+
Once installed, you can run Coder as a system service:
42+
43+
```sh
44+
# Specify a PostgreSQL database
45+
# in the configuration first:
46+
sudo vim /etc/coder.d/coder.env
47+
sudo service coder restart
48+
```
49+
50+
Or run a **temporary deployment** with dev mode (all data is in-memory and destroyed on exit):
51+
52+
53+
```sh
54+
coder server --dev
55+
```
56+
557
## docker-compose
658

759
Before proceeding, please ensure that you have both Docker and the [latest version of
@@ -99,3 +151,33 @@ access URL, or you can connect to it via SSH by running:
99151
```console
100152
coder ssh [workspace name]
101153
```
154+
155+
## Manual
156+
157+
We publish self-contained .zip and .tar.gz archives in [GitHub releases](https://github.com/coder/coder/releases). The archives bundle `coder` binary.
158+
159+
1. Download the [release archive](https://github.com/coder/coder/releases) appropriate for your operating system
160+
161+
1. Unzip the folder you just downloaded, and move the `coder` executable to a location that's on your `PATH`
162+
163+
```sh
164+
# ex. MacOS and Linux
165+
mv coder /usr/local/bin
166+
```
167+
168+
> Windows users: see [this guide](https://answers.microsoft.com/en-us/windows/forum/all/adding-path-variable/97300613-20cb-4d85-8d0e-cc9d3549ba23) for adding folders to `PATH`.
169+
170+
1. Start a Coder server
171+
172+
To run a **temporary deployment**, start with dev mode (all data is in-memory and destroyed on exit):
173+
174+
```bash
175+
coder server --dev
176+
```
177+
178+
To run a **production deployment** with PostgreSQL:
179+
180+
```bash
181+
CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \
182+
coder server
183+
```

install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -eu
33

44
# Coder's automatic install script.
5+
# See https://github.com/coder/coder#installing-coder
56

67
usage() {
78
arg0="$0"
@@ -378,7 +379,6 @@ install_standalone() {
378379
}
379380

380381
# Determine if we have standalone releases on GitHub for the system's arch.
381-
# TODO: fix for Coder v2
382382
has_standalone() {
383383
case $ARCH in
384384
amd64) return 0 ;;

0 commit comments

Comments
 (0)