We use cookies to make your experience better.
Set up a Coder deployment locally for testing.
Coder is typically deployed to a remote data center, but you can use Docker to create a lightweight preview deployment of Coder.
Coder currently supports local preview only on workstations running macOS or Linux.
Coder automatically uploads a single-seat license upon installation.
Before proceeding, please make sure that you have the following installed:
We do not recommend using local previews for production deployments of Coder.
Your experience with the local Coder preview is dependent on your system specs, but please note that you can expect slightly degraded performance due to the deployment running entirely inside a Docker container.
The kind deployment supports CVMs if you meet the following requirements (if you choose not to try out CVMs, these requirements do not apply):
Your Linux hosts must be running Linux Kernel 5 and above.
You must have the linux-headers
package corresponding to your Kernel
version installed. You should see the following folders all corresponding to
your Kernel version:
$ uname -r
5.11.4-arch1-1
$ ls /usr/lib/modules
5.11.4-arch1-1
$ ls /usr/src/
linux linux-headers-5.11.4-arch1-1
Docker Desktop for Mac must use version 2.5.0.1. This specific version is required because of a recent downgrade to Linux Kernel 4.9 due to a bug.
Currently, the local preview doesn't support dev URLs. Instead, you can use tools like ngrok to preview webpages from inside an workspace.
We are working on bringing Dev URL support to local previews in later releases.
When using kind for your local preview, SSH is not configured to run by default.
When using Docker Desktop for your local preview, SSH works as long as your
machine does not have an existing SSH server running on port 22
.
The local preview option does not work in an air-gapped deployment.
To install Coder, run:
curl -fsSL https://coder.com/try.sh | PORT="8080" sh -s --
Note: you can edit the value of
PORT
to control where the Coder dashboard will be available.
When the installation process completes, you'll see the URL and login credentials you need to access Coder:
You can now access Coder at
http://localhost:8080
You can tear down the deployment with
curl -fsSL https://coder.com/try.sh | sh -s -- down
Platform credentials
User: admin
Password: yfu...yu2
Visit the URL, and log in using the provided credentials. The platform is automatically configured for you, so there's no first-time setup to do.
Docker Desktop includes a standalone Kubernetes server and client that you can use to run Coder.
Enable the Kubernetes cluster inside Docker.
Ensure that Docker has enough resources allocated to meet Coder's requirements (you can do so by going to Docker preferences).
Install metrics-server so that Coder gets valid metrics from your cluster:
helm repo add bitnami https://charts.bitnami.com/bitnami
Install Coder on to your cluster.
If you run into OutOfmemory
errors when installing, try increasing your
resource allocation in Docker. If increasing the resource allocation doesn't fix
the error, reinstall Coder using the following Helm values:
helm upgrade --install coder \
--set ingress.useDefault=false \
--set cemanager.resources.requests.cpu="0m" \
--set cemanager.resources.requests.memory="0Mi" \
--set envproxy.resources.requests.cpu="0m" \
--set envproxy.resources.requests.memory="0Mi" \
--set timescale.resources.requests.cpu="0m" \
--set timescale.resources.requests.memory="0Mi" \
coder/coder
To remove the local Coder deployment, run:
curl -fsSL https://coder.com/try.sh | sh -s -- down
Because Coder runs inside Docker, you should have nothing left on your machine after tear down.
See an opportunity to improve our docs? Make an edit.