Coder
Generated on 23 Mar 2022 from the Coder catalog page
Coder handles the orchestration of new consistent developer workspaces using source-controlled Dockerfiles and workspace templates. Empower developers and data scientists to self-serve workspaces that just work.
Software Included
Package | Version | License |
---|---|---|
Coder | v1.28.2 | Paid (free trial) |
Caddy | v2.4.6 | Apache 2.0 |
Docker Engine | 20.10.12 | Apache 2.0 |
docker-compose | v1.29.2 | Apache 2.0 |
Creating an App using the Control Panel
Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.
Creating an App using the API
In addition to creating a Droplet from the Coder 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB Coder Droplet in the SFO2 region, you can use the following curl
command. You need to either save your API access token) to an environment variable or substitute it in the command below.
curl -X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer '$TOKEN'' -d \
'{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "coder"}' \
"https://api.digitalocean.com/v2/droplets"
Getting Started After Deploying Coder
By default, Coder will run on your Droplet’s public IPv4 address with a self-signed certificate: https://your_droplet_public_ipv4/login
Log in with these credentials, then set a new password:
admin
coder12345
Add a domain (optional)
- Point your DNS records (
coder.yourdomain.com
*.coder.yourdomain.com
) to the Droplet’s public IPv4 address. - Navigate to the domain, Caddy should automatically provision a TLS certificate. (We recommend using an incognito window to avoid initial caching
Enable dev URLs (optional)
- SSH into your Droplet:
ssh root@your_droplet_public_ipv4
- Follow instructions to modify
coder/docker-compose.yaml
and set
- DEVURL_HOST=*.coder.yourdomain.com
- Modify
coder/Caddyfile
to specify your email address for LetsEncrypt. - Restart Coder and Caddy:
cd $HOME/coder && docker-compose restart
Harden your configuration (recommended)
- SSH into your Droplet:
ssh root@your_droplet_public_ipv4
- Follow instructions to modify
coder/Caddyfile
to disable “internal” (self-signed) certificates and add your email for LetsEncrypt. - Replace
https:// {
withcoder.yourdomain.com, *.coder.yourdomain.com {
to limit the proxy to your domain(s). - Restart Coder and Caddy:
cd $HOME/coder && docker-compose restart
Use a wildcard certificate
By default, Caddy’s On-Demand TLS will be used to generate certificates for dev URLs. This zero-configuration options works well, but introduces ~10 second delays or rate limiting when a developer visits a newly-created dev URL.
For best results, consider configuring ZeroSSL with Caddy or build a Caddy image with the module for your DNS provider.
Stay tuned for a future release with improved steps for wildcard/custom certificates.
Use a managed Postgres database (optional)
- SSH into your Droplet:
ssh root@your_droplet_public_ipv4
- Modify
coder/docker-compose.yaml
and follow our docs to configure your managed database with Coder for Docker. - Restart Coder and Caddy:
cd $HOME/coder && docker-compose restart
Stay tuned for a future release with built-in support for DigitalOcean managed DBs.