Written especially for my school's ENT,
https://mon.lyceeconnecte.fr
.
npm install --global yarn@latest
yarn global add node@latest
Now that we have the latest version of Node installed, we can use override the existing Node binary in our PATH.
echo -e "\nexport PATH=\"/home/$(whoami)/.config/yarn/global/node_modules/.bin:\$PATH\"" >> ~/.bashrc
Now, restart a new terminal session.
Check if the Node version is good with node -v
. You can now update NPM using yarn global add npm@latest
and also install pnpm using yarn global add pnpm@latest
.
You have everything setup for Node!
Grab the latest .tar.gz release, don't use any .deb
or .rpm
since we aren't a sudoer.
Extract it using tar -xvf ./code-server-*
and navigate to it with cd
.
Run the code-server binary with ./bin/code-server
.
Start a new terminal session and grab the password for code-server using cat ~/.config/code-server/config.yaml
.
Since the server runs on port 127.0.0.1:8080, we can't have access to it - even if it was 0.0.0.0, we wouldn't have
access to it because the server runs inside a Docker container.
Sign-up or sign-in to Ngrok and grab the ngrok
binary depending to your distribution.
Don't forget to put your auth key and finally run ngrok http 8080
to expose publicly the code-server port.
Access to the given URL and magic, you now have code-server!
Credits from this dude, thanks to his explanations, we can expose 4 ports at the same time without paying anything!
You'll need to make some changes to your ngrok configuration - in ~/.config/ngrok/ngrok.yml
- if you have free plan.
Add this to the configuration...
tunnels:
code-server:
addr: 8080
proto: http
anything-else:
addr: 3000
proto: http
... so you can expose another tunnel, here anything-else
on port 3000
, and keep the code-server
tunnel.
To start ngrok with this configuration, simply run ngrok start --all
Find a .deb
corresponding to the machine. For me, it's an Ubuntu (Focal) so click here to see where is the .deb
I used.
Download the .deb
on the machine - still using wget
- and then use dpkg -x git*.deb git
to extract the .deb
into a git
folder.
Now, add the $HOME/git/usr/bin
to your PATH and you're done!
echo -e "\nexport PATH=\"/home/$(whoami)/git/usr/bin:\$PATH\"" >> ~/.bashrc