Table of Contents

Hosting Visual Studio Code Server

Share on facebook
Share on twitter
Share on telegram
Share on linkedin
Share on whatsapp
Share on reddit
Share on email

Host a Visual Studio Code Server for when you’re on the go

Do you sometimes need to program on the fly without having access to your workstation? Maybe on your phone or a friend’s computer.

Take a look at Visual Studio Code Server.

Read more information on GitHubDockerHub and VSCode.

 

1. Setting it up

You need Traefik set up!

Create a new subdomain and point at your server.

 

Create a new directory and cd into it.

mkdir vscode && cd vscode

Then create the docker-compose.yml

nano docker-compose.yml

1.1 Installation

Paste this for your public Server, make sure to change your domain:

version: '3'

services:
  vscode:
    image: linuxserver/code-server:latest
    container_name: vscodeserver
    restart: always
    volumes:
      - ./config:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - PASSWORD=password
      - SUDO_PASSWORD=sudo_password
    networks:
      - web
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.vs-web.rule=Host(`vs.your-domain.com`)"
      - "traefik.http.routers.vs-web.entrypoints=web"
      - "traefik.http.routers.vs-web.middlewares=redirect@file"
      - "traefik.http.routers.vs-secured.rule=Host(`vs.your-domain.com`)"
      - "traefik.http.routers.vs-secured.entrypoints=web-secured"
      - "traefik.http.routers.vs-secured.tls.certresolver=mytlschallenge"

networks:
  web:
    external: true

And now spin up the Stack:

docker-compose up -d

2. How to Use

Visit vs.your-domain.com or your chosen IP.

You’ll be greeted with this home screen:

Visual Studio Code Server Login

Log in with the Password you provided.

Visual Studio Code Server Development Editor

Congratulations! You have a self-hosted Visual Studio Code Server.

Related Post
minecraft

How to host a Forge Server

Playing Minecraft with Mods on a Docker hosted Minecraft Server.
Ads

Comments

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x