Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Elegant solution for running a nodejs websocket server on VestaCP system

General questions about VestaCP
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
hedgehog90
Posts: 25
Joined: Wed Sep 09, 2015 7:19 pm

Elegant solution for running a nodejs websocket server on VestaCP system
  • Quote

Post by hedgehog90 » Mon Mar 16, 2020 10:34 pm

I have a nodejs websocket server script that I want to deploy on my VestaCP managed server (Ubuntu 16.04)

I could easily start/stop it manually via ssh, but I'd like to integrate it into the VestaCP backend to make it a bit easier to manage, so it will run automatically on startup, also allowing me to start/stop it via the VestaCP web interface if I edit the script or it stops running.

Any suggestions?

Edit:
Maybe an nginx template .sh script? I'm not familiar with these, I assume they're called on web rebuild? And in the script I assume I would need to stop any existing process before starting it to prevent multiple instances.
Top

plutocrat
Posts: 232
Joined: Fri Jan 27, 2017 9:16 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Elegant solution for running a nodejs websocket server on VestaCP system
  • Quote

Post by plutocrat » Tue Mar 17, 2020 8:16 am

Sounds like you're looking at writing a service file which can be controlled by sysvinit (I think for Ubuntu 16) or systemd (I think for Ubuntu 18), so that you could run it with
service mynodeserver start|stop|status
or
systemctl start|stop|status mynodeserver

There will be examples around the internet.
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password