How can I setup an SSL?

hey there, im running the server on ubuntu 20.04, how can I install an SSL on it? Also, how can I work on a dynamic website using the code server? Like have the codeserver on port 80 and the website on port 30
92 Replies
Phorcys
Phorcys2y ago
are you talking about code-server or coder ?
viking
viking2y ago
code-server
Phorcys
Phorcys2y ago
alright you can use the --cert CLI argument code-server --cert <path to certificate file>
viking
viking2y ago
alr... and how do i get a certification file?
Phorcys
Phorcys2y ago
using certbot -> https://certbot.eff.org/
viking
viking2y ago
aight tx is the cert file a .key file or a .crt file
Phorcys
Phorcys2y ago
actually code-server --cert cert.crt --cert-key cert.key i forgot the cert key
viking
viking2y ago
No description
viking
viking2y ago
kk @Phorcys also how can I make it so the code-server only has rights to edit in the /var/www/html folder?
Phorcys
Phorcys2y ago
make it run as a user that only has permissions on this folder
viking
viking2y ago
alr, thanks [2022-10-04T12:15:48.746Z] error listen EADDRINUSE: address already in use 127.0.0.1:80 when i try to run it on port 80 when i run it on any other port it times out
Phorcys
Phorcys2y ago
are you running anything on port 80 ? yes of course you are apache alright
viking
viking2y ago
i think i got an nginx server nginx nginx
Phorcys
Phorcys2y ago
sure it's whatever
viking
viking2y ago
altho i did do sudo systemctl stop nginx
Want results from more Discord servers?
Add your server