---
title: code-server
description: Quick overview of code-server and setup
date: 2025-02-04
lastmod: 2025-02-04
author: wompmacho
showHero: false # needed to hide "hero banner"
---

## Whats is code-server?

`code-server` is a self-hosted instance of Visual Studio Code that runs on a remote server and is accessible directly through your web browser. It effectively turns any machine with a CPU and RAM into a fully functional cloud-based development environment.

## Docker Compose Example

``` yaml
# code-server -- https://hub.docker.com/r/linuxserver/code-server
---
services:
  code-server:
    image: lscr.io/linuxserver/code-server:latest
    container_name: code-server
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      - PASSWORD=password #optional
      - HASHED_PASSWORD= #optional
      - SUDO_PASSWORD=password #optional
      - SUDO_PASSWORD_HASH= #optional
      - PROXY_DOMAIN=code-server.domain.com #optional
      - DEFAULT_WORKSPACE=/apps #optional
    volumes:
      - code-server-nfs:/config
      - apps:/apps
    ports:
      - 8443:8443
    restart: unless-stopped

volumes:
  code-server-nfs:
    name: code-server-nfs
    driver_opts:
      type: nfs
      o: addr=truenas,nolock,soft,rw
      device: :/mnt/store/vault/app/code-server
  apps:
    name: apps
    driver_opts:
      type: nfs
      o: addr=truenas,nolock,soft,rw
      device: :/mnt/store/vault/app/
```
