|
2 | 2 |
|
3 | 3 | This article walks you through the various ways of installing and deploying Coder.
|
4 | 4 |
|
| 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 | + |
5 | 57 | ## docker-compose
|
6 | 58 |
|
7 | 59 | 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:
|
99 | 151 | ```console
|
100 | 152 | coder ssh [workspace name]
|
101 | 153 | ```
|
| 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 | + ``` |
0 commit comments