# Upgrade

This article describes how to upgrade your Coder deployment.

<Callout type="error" title="Caution">
  Prior to upgrading a production Coder deployment, take a database snapshot since Coder does not support rollbacks.
</Callout>

For upgrade recommendations and troubleshooting, see [Upgrading Best Practices](/docs/@main/install/operate/upgrade/best-practices/).

## Reinstall Coder to upgrade

To upgrade your Coder deployment, reinstall Coder using your original method of [install](/docs/@main/install/).

### Coder install script

1. If you installed Coder using the `install.sh` script, re-run the below command on the host:

   ```sh
   curl -fsSL https://coder.com/install.sh | sh
   ```

2. If you're running Coder as a system service, you can restart it with `systemctl`:

   ```sh
   systemctl daemon-reload
   systemctl restart coder
   ```

<Callout type="info" title="Note">
  In Coder v2.34.0 and later, an option set to an empty value in `/etc/coder.d/coder.env` no longer keeps its default.
  The deb, RPM, and apk packages for Coder v2.39 and earlier shipped a `CODER_HTTP_ADDRESS=` line with no value, and an upgrade keeps your existing file.
  If the service fails to start with `TLS is disabled. Enable with --tls-enable or specify a HTTP address`, add a `#` at the start of that line, and then restart the service.
</Callout>

### Other upgrade methods

<Tabs items="[&#x22;docker-compose&#x22;, &#x22;Kubernetes&#x22;, &#x22;Coder AMI on AWS&#x22;, &#x22;Windows&#x22;]" groupId="coder-docs-tab:coder-ami-on-aws-docker-compose-kubernetes-windows" persist="true">
  <Tab value="docker-compose" id="docker-compose">
    If you installed using `docker-compose`, run the below command to upgrade the Coder container:

    ```sh
    docker-compose pull coder && docker-compose up -d coder
    ```
  </Tab>

  <Tab value="Kubernetes" id="kubernetes">
    See [Upgrade Coder via Helm](/docs/@main/install/server/kubernetes/#upgrade-coder-via-helm).
  </Tab>

  <Tab value="Coder AMI on AWS" id="coder-ami-on-aws">
    1. Run the Coder installation script on the host:

       ```sh
       curl -fsSL https://coder.com/install.sh | sh
       ```

       The script will unpack the new `coder` binary version over the one currently installed.

    2. Restart the Coder system process with `systemctl`:

       ```sh
       systemctl daemon-reload
       systemctl restart coder
       ```
  </Tab>

  <Tab value="Windows" id="windows">
    Download the latest Windows installer or binary from the [Coder downloads page](https://coder.com/downloads), or upgrade from Winget.

    ```ps1
    winget install Coder.Coder
    ```
  </Tab>
</Tabs>
