It's already working just fine on Enhance, but could be easier off course.
Create a website, package NodeJS enabled, no resource limits except CPU and RAM (minimum 1.5GB) for the deployment phase. Low NPROC definitely won't allow EmDash CMS to start or install. Make sure an SSH key or password is set and the website user can SSH with the given command.
Create a NodeJS App.
manual at first.
Version: 22.xx.x
Startup command: npm run dev -- --host 0.0.0.0
Working directory: <projectname>
Proxy enabled: yes
Path: blank
Port: 4321
Deploy
Login as user to webspace via SSH
/usr/bin/install_nvm_and_node.sh
Logout -> Login via SSH again to get correct environment values.
Change to NodeJS 22, as it won't run with anything else. The install command probably installed 25.xx.x
nvm install 22
nvm alias default 22
nvm use 22
nvm uninstall 25
Install EmDash, follow installer steps including <projectname>:
npm create emdash@latest
Make sure to install dependencies, use npm for it. This step can take a LONG time on small servers and might get killed, especially with resource limits set.
Once done, run it and you're done (add the host part if you want it to be globally accessible):
cd <projectname>
npm run dev -- --host 0.0.0.0
If it's somehow complaining about CORS, make sure to solve that. I'm using Nginx, so I added the following to the vhost override:
add_header 'Access-Control-Allow-Origin' 'https://projectdomainforemdash.com';
If it's all running fine and the website loads and works, you can kill it (CTRL+C) in the terminal and set the NodeJS App to automatic in the Enhance UI. Play with the resource limits if you wish, I didn't yet.