Kaetram-Open icon indicating copy to clipboard operation
Kaetram-Open copied to clipboard

please make clear how to run at port 443 with ssl and how to run the server forever via ssh

Open YukiTrace opened this issue 1 year ago • 2 comments

I am facing 2 problem right now. 1. typing in port :9000 at the end of the url is not elegant. And I'm not smart enough to make port 443 work. There is some answer here https://github.com/Kaetram/Kaetram-Open/issues/217 but as a non-dev in was very difficult to parse.

I am now running the server in production via the command. npm run dev -- --port 80 I could not get it working with port 443 with this approach. Though. note I'm not using yarn start because it always starts on port 9000 and you have to type that in to the url. I wish I could just change the port in the config file.

Problem 2 I am sshed into the server running npm run dev -- --port 80 to start the server. If I close my ssh window the server to my knowledge stop.

This server was not hard for an somewhat beginner like me. Except for these two pain points. Also the node version is tricky too but that isn't on you.

YukiTrace avatar Sep 09 '23 20:09 YukiTrace

For SSH window use tmux or screen libraries. Tmux is by far the easiest, you can run an instance in a tmux screen and just CTRL-B + D to detach and have it run constantly.

Running via SSL is not recommended since you're running in a development environment. To run a proper instance you'll have to run yarn build and use the dist files in the client to host on your own webserver (such as nginx). You can then reverse proxy websocket connections into the server (which is now running via yarn start and the built files), and then use CloudFlare to properly achieve SSL.

Veradictus avatar Sep 10 '23 00:09 Veradictus

although recommended would be to run the server behind a reverse-proxy like caddy or nginx proxy manager. that will give you the SSL certs in a much easier way, and you don't have to change ports.

octoshrimpy avatar Sep 10 '23 18:09 octoshrimpy