|
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 -L https://coder.com/install.sh | sh -s -- --dry-run |
| 14 | +``` |
| 15 | + |
| 16 | +To install, run: |
| 17 | + |
| 18 | +```bash |
| 19 | +curl -L 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 -L 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
|
@@ -40,62 +92,34 @@ Coder](https://github.com/coder/coder/releases) installed.
|
40 | 92 | ghcr.io/coder/coder:v0.5.10
|
41 | 93 | ```
|
42 | 94 |
|
43 |
| -1. Open a new terminal window, and run `coder login <yourAccessURL>` to create |
44 |
| - your first user (once you've done so, you can navigate to `yourAccessURL` and |
45 |
| - log in with these credentials). |
| 95 | +1. Follow the on-screen instructions to create your first template and workspace |
46 | 96 |
|
47 |
| -1. Next, copy a sample template into a new directory so that you can create a custom template in a |
48 |
| - subsequent step (be sure that you're working in the directory where you want |
49 |
| - your templates stored): |
| 97 | +## Manual |
50 | 98 |
|
51 |
| - ```console |
52 |
| - coder templates init |
53 |
| - ``` |
| 99 | +We publish self-contained .zip and .tar.gz archives in [GitHub releases](https://github.com/coder/coder/releases). The archives bundle `coder` binary. |
54 | 100 |
|
55 |
| - Choose the "Develop in Docker" example to generate a sample template in the |
56 |
| - `docker` subdirectory. |
| 101 | +1. Download the [release archive](https://github.com/coder/coder/releases) appropriate for your operating system |
57 | 102 |
|
58 |
| -1. Navigate into the new directory and create a new template: |
| 103 | +1. Unzip the folder you just downloaded, and move the `coder` executable to a location that's on your `PATH` |
59 | 104 |
|
60 |
| - ```console |
61 |
| - cd docker |
62 |
| - coder templates create |
| 105 | + ```sh |
| 106 | + # ex. MacOS and Linux |
| 107 | + mv coder /usr/local/bin |
63 | 108 | ```
|
64 | 109 |
|
65 |
| - Follow the prompts displayed to proceed. When done, you'll see the following |
66 |
| - message: |
| 110 | + > 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`. |
67 | 111 |
|
68 |
| - ```console |
69 |
| - The docker template has been created! Developers can |
70 |
| - provision a workspace with this template using: |
| 112 | +1. Start a Coder server |
71 | 113 |
|
72 |
| - coder create --template="docker" [workspace name] |
73 |
| - ``` |
74 |
| - |
75 |
| -1. At this point, you're ready to provision your first workspace: |
| 114 | + To run a **temporary deployment**, start with dev mode (all data is in-memory and destroyed on exit): |
76 | 115 |
|
77 |
| - ```console |
78 |
| - coder create --template="docker" [workspace name] |
| 116 | + ```bash |
| 117 | + coder server --dev |
79 | 118 | ```
|
80 | 119 |
|
81 |
| - Follow the on-screen prompts to set the parameters for your workspace. If |
82 |
| - the process is successful, you'll get information regarding your workspace: |
| 120 | + To run a **production deployment** with PostgreSQL: |
83 | 121 |
|
84 |
| - ```console |
85 |
| - ┌─────────────────────────────────────────────────────────────────┐ |
86 |
| - │ RESOURCE STATUS ACCESS │ |
87 |
| - ├─────────────────────────────────────────────────────────────────┤ |
88 |
| - │ docker_container.workspace ephemeral │ |
89 |
| - │ └─ dev (linux, amd64) ⦾ connecting [0s] coder ssh main │ |
90 |
| - ├─────────────────────────────────────────────────────────────────┤ |
91 |
| - │ docker_volume.coder_volume ephemeral │ |
92 |
| - └─────────────────────────────────────────────────────────────────┘ |
93 |
| - The main workspace has been created! |
| 122 | + ```bash |
| 123 | + CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \ |
| 124 | + coder server |
94 | 125 | ```
|
95 |
| - |
96 |
| -You can now access your workspace via your web browser by navigating to your |
97 |
| -access URL, or you can connect to it via SSH by running: |
98 |
| - |
99 |
| -```console |
100 |
| -coder ssh [workspace name] |
101 |
| -``` |
|
0 commit comments