code-server allows you to run VS Code on any machine, anywhere (typically hosted on remote servers), and access it through a web browser (client-side).

I will install it on my Beelink SER8 machine (running Omarchy). While I could connect to the Beelink system via SSH using VS Code, I wanted to have a direct browser-based option for writing and running code on any mobile device, including my iPad.

Installation

  1. The easiest way to install code-server is to use theΒ install script.
curl -fsSL https://code-server.dev/install.sh | sh
  1. To have Systemd, start code-server now and restart on boot:
sudo systemctl enable --now code-server@$USER
  1. Visit http://127.0.0.1:8080 (might have to forward this port over SSH if installing on remote server).
  2. Your default password is in ~/.config/code-server/config.yaml.

Configuration

Specific Port

  1. Default port is 8080 but we can change it to something different by editing config file:
nvim ~/.config/code-server/config.yaml
  1. Just update bind-addr to a different port (e.g. 9090):
bind-addr: 127.0.0.1:9090
  1. Since we are using Systemd, restart the service:
sudo systemctl restart code-server@$USER
  1. Now, it can be accessed on http://127.0.0.1:9090.

LAN Access (⚠️ Insecure)

  1. Instead of 127.0.0.1, update the following in the config file nvim ~/.config/code-server/config.yaml:
bind-addr: 0.0.0.0:9090
  1. Restart the service:
sudo systemctl restart code-server@$USER
  1. It can now be accessed on http://<beelink-ip>:9090.
  2. If still not reachable, then the port is blocked by the machine firewall. Open the port on the remote machine:
sudo ufw allow 9090/tcp
sudo ufw status
  1. Try to access it again onhttp://<beelink-ip>:9090.

Update Password (⚠️ Insecure)

  1. Update the password key value in the config file nvim ~/.config/code-server/config.yaml:
password: <your_desired_password>
  1. Restart the service:
sudo systemctl restart code-server@$USER

iPad Usage

https://coder.com/docs/code-server/ipad