coder/docs/install.md

3.5 KiB

Install

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

install.sh

The easiest way to install Coder is to use our install script for Linux and macOS. The install script attempts to use the system package manager detection-reference if possible.

You can preview what occurs during the install process:

curl -L https://coder.com/install.sh | sh -s -- --dry-run

To install, run:

curl -L https://coder.com/install.sh | sh

If you're concerned about the install script's use of curl | sh and the security implications, please see this blog post by sandstorm.io.

You can modify the installation process by including flags. Run the help command for reference:

curl -L https://coder.com/install.sh | sh -s -- --help

System packages

Coder publishes the following system packages in GitHub releases:

  • .deb (Debian, Ubuntu)
  • .rpm (Fedora, CentOS, RHEL, SUSE)
  • .apk (Alpine)

Once installed, you can run Coder as a system service:

# Specify a PostgreSQL database
# in the configuration first:
sudo vim /etc/coder.d/coder.env
sudo service coder restart

Or run a temporary deployment with dev mode (all data is in-memory and destroyed on exit):

coder server --dev

docker-compose

Before proceeding, please ensure that you have both Docker and the latest version of Coder installed.

  1. Clone the coder repository:

    git clone git@github.com:coder/coder.git
    
  2. Navigate into the coder folder. Coder requires a non-localhost access URL for non-Docker-based examples; if you have a public IP or a domain/reverse proxy, you can provide this value before running docker-compose up to start the service:

    cd coder
    CODER_ACCESS_URL=https://coder.mydomain.com
    docker-compose up
    

    Otherwise, you can start the service:

    cd coder
    docker-compose up
    

    Alternatively, if you would like to start a temporary deployment:

    docker run --rm -it \
    -e CODER_DEV_MODE=true \
    -v /var/run/docker.sock:/var/run/docker.sock \
    ghcr.io/coder/coder:v0.5.10
    
  3. Follow the on-screen instructions to create your first template and workspace

Manual

We publish self-contained .zip and .tar.gz archives in GitHub releases. The archives bundle coder binary.

  1. Download the release archive appropriate for your operating system

  2. Unzip the folder you just downloaded, and move the coder executable to a location that's on your PATH

    # ex. MacOS and Linux
    mv coder /usr/local/bin
    

    Windows users: see this guide for adding folders to PATH.

  3. Start a Coder server

    To run a temporary deployment, start with dev mode (all data is in-memory and destroyed on exit):

    coder server --dev
    

    To run a production deployment with PostgreSQL:

    CODER_PG_CONNECTION_URL="postgres://<username>@<host>/<database>?password=<password>" \
      coder server