# Self-host code-server

> Run VS Code in the browser, on your own hardware, from any device with a tab open.

- Page: https://levelrail.com/templates/code-server/
- JSON: https://levelrail.com/templates/code-server.json
- Category: Developer Tools
- Licence: MIT (Permissive license)
- Source: https://github.com/coder/code-server
- Upstream docs: https://coder.com/docs/code-server

## Requirements
- Memory: about 512 MiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 4.93.1

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| code-server | codercom/code-server | 4.93.1 | 8080 | code_server_data -> /home/coder/project |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| code-server | PASSWORD | generated |

## Deploy

### CLI

```bash
levelrail-cli templates deploy code-server --name my-code-server
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/code-server/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy code-server on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id code-server for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image codercom/code-server:4.93.1 is what you deploy there.

Self-host code-server, code-server docker compose file, deploy code-server on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
