April 28, 2025•3 min read••
Tags ▼
No tags
First, ensure your system is up-to-date:
sudo apt update sudo apt upgrade
Go to the Code Server GitHub releases page and get the download link for the latest version. Alternatively, you can download it via the terminal. Here's how:
curl -fsSL https://code-server.dev/install.sh | sh
This script will automatically download and install Code Server on your Ubuntu server.
Once Code Server is installed, you can start it with the following command:
code-server
The output will include an address like http://127.0.0.1:8080/ and a password you can use to log in.
You might want to configure Code Server to run in the background, change the port, or disable the password for easier access.
To configure Code Server:
Open the configuration file:
sudo nano ~/.config/code-server/config.yaml
Modify settings such as bind-addr, auth, or password to suit your needs.
Example:
bind-addr: 0.0.0.0:8080 auth: password password: "your_password_here" cert: false
bind-addr: Sets the IP and port to listen on. Using 0.0.0.0 allows access from any IP address.auth: Can be set to password (default) or none.password: You can specify your own password here.cert: Set to false if you are not using SSL.To run Code Server in the background or on startup, you can create a systemd service:
Create a service file:
sudo nano /lib/systemd/system/code-server.service
Add the following configuration to the file:
[Unit] Description=Code Server After=network.target [Service] Type=simple User=andresz # Change to your user ExecStart=/usr/bin/code-server --bind-addr 0.0.0.0:8080 Restart=always [Install] WantedBy=multi-user.target
sudo systemctl enable code-server sudo systemctl start code-server
http://your-server-ip:8080.config.yaml).If you want to serve Code Server over HTTPS, you can use a reverse proxy like Nginx with an SSL certificate from Let's Encrypt.
Let me know if you need help setting up HTTPS or anything else!
Follow on your preferred channel for new articles, notes, and experiments.