VOOZH about

URL: https://www.digitalocean.com/community/tutorials/how-to-set-up-the-code-server-cloud-ide-platform-on-ubuntu-20-04?comment=95768

⇱ How To Set Up the code-server Cloud IDE Platform on Ubuntu 20.04 | DigitalOcean


How To Set Up the code-server Cloud IDE Platform on Ubuntu 20.04

Published on May 20, 2020
Not using Ubuntu 20.04?
Choose a different version or distribution.
Ubuntu 20.04
👁 How To Set Up the code-server Cloud IDE Platform on Ubuntu 20.04

The author selected the Free and Open Source Fund to receive a donation as part of the Write for DOnations program.

Introduction

With developer tools moving to the cloud, creation and adoption of cloud IDE (Integrated Development Environment) platforms is growing. Cloud IDEs allow for real-time collaboration between developer teams to work in a unified development environment that minimizes incompatibilities and enhances productivity. Accessible through web browsers, cloud IDEs are available from every type of modern device.

code-server is Microsoft Visual Studio Code running on a remote server and accessible directly from your browser. Visual Studio Code is a modern code editor with integrated Git support, a code debugger, smart autocompletion, and customizable and extensible features. This means that you can use various devices running different operating systems, and always have a consistent development environment on hand.

In this tutorial, you will set up the code-server cloud IDE platform on your Ubuntu 20.04 machine and expose it at your domain, secured with free Let’s Encrypt TLS certificates. In the end, you’ll have Microsoft Visual Studio Code running on your Ubuntu 20.04 server, available at your domain and protected with a password.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the author(s)

Expert in cloud topics including Kafka, Kubernetes, and Ubuntu.

Former Senior Technical Editor at DigitalOcean, with a strong focus on DevOps and System Administration content. Areas of expertise include Terraform, PyTorch, Python, and Django.

Still looking for an answer?

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Hello. All was good until Step 2 — Exposing code-server at Your Domain

It just does not work on my side.

What did I setup on Namecheap.com (my registrar)? I created one “A Record”, for host @ pointing to my DO VPS IP address. So far my “index.html” is displayed as expected.

Then I did the setup suggested in Step #2, for nginx and the code-server.mydomain.com.

Chrome: This site can’t be reached code-server.mydomain.com’s server IP address could not be found. Try running Windows Network Diagnostics. DNS_PROBE_FINISHED_NXDOMAIN

Firefox: *Hmm. We’re having trouble finding that site.

We can’t connect to the server at code-server.palazuelos.xyz.

If that address is correct, here are three other things you can try:

Try again later.
Check your network connection.
If you are connected but behind a firewall, check that Firefox has permission to access the Web*

Any idea or suggestion? thanks,

Fantastic documentation! Every step went exactly as you said it would and everything worked flawlessly. Thanks for the terrific work!

I got this all up and running, thanks for the instructions! However, whenever I run the terminal within code-server, I get ‘Command not found’ errors. It doesn’t seem to be able to find anything like nvm, npm, or yarn that all work when using the terminal directly on the box.

Any idea where I went wrong there or how to fix?

Thank you for the documentation. I have followed the steps and getting the error "WebSocket close with status code 1006" when I open the code server in the browser. Do you know what can be the issue?

Kind regards, Aykut

Hi,

What you are doing:

sudo systemctl enable code-server

is wrong because it will start code-server as root which is dangerous! You can see this if you open the integrated terminal where it says “root@”.

Instead you should enable the service on start-up like this:

sudo systemctl enable --now code-server@$USER

then:

sudo service code-server start

The code server works fine for me if I use it through SSH tunnel. However, once I configure nginx, it gets stuck on the login page itself. If I enter the password, it just refreshes on the same page.

Can anyone help me resolve this issue? I am using code-server 3.10.0

Any tricks on how to avoid that it keeps directing to root? Everything else works.

Thanks

Hi,

Thank you for the clear detailed documentation. Its excellent. I followed all the steps properly and its working.!

I need an help in one thing, I have few teams working on different projects, Can I restrict the developers/users to open only the assigned projects to them in code-server? If yes, can I know how?

I also need to restrict the developers/users only to their project specific files and project specific command lines.

It would help me a lot! If I get a solution.

Thanks in advance.

👁 Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

© 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.