By default code-server only listens on localhost (127.0.0.1), which means you can only reach it from the same machine. If you are on that machine, open the URL below directly. If you are connecting remotely over SSH, use SSH port-forwarding in a second terminal on your local computer to tunnel port 8080 safely to your laptop.
$ ssh -L 8080:127.0.0.1:8080 YOUR_SERVER_USER@YOUR_SERVER_IP -N
What you should see
The terminal hangs silently — that is correct. It is holding the tunnel open. Now open http://localhost:8080 in your local browser.
This might happen
Browser shows 'connection refused' or the page never loads
Make sure the SSH tunnel command is still running in its terminal. Also confirm code-server is active: sudo systemctl status code-server@$USER