• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question How do i deploy a Remix app to my plesk server?

MortenVolde

New Pleskian
Server operating system version
CentOS Linux 7.8.2003 (Core)
Plesk version and microupdate number
Plesk Obsidian v18.0.54
I have made a Remix app and i want to deploy it to me plesk server but i can't figure out what to do.
I have installed node.js but can't figure out the application startup file or what it is i exactly need to do.
Do i need to have 2 domains? one for the client side and one for the server side?
Is there anybody who already have done this and what did you do to make it work?
 
I have made a Remix app and i want to deploy it to me plesk server but i can't figure out what to do.
I have installed node.js but can't figure out the application startup file or what it is i exactly need to do.
Do i need to have 2 domains? one for the client side and one for the server side?
Is there anybody who already have done this and what did you do to make it work?
Hi, this is a bit tricky, but you can do it by following next steps:
I suppose you already have Node set in your Plesk.

1) Remix use some adapters in order to ran your SSR app , the default one is Remix App Server. in your case you need to use @remix-run/express adapter you can find more info about this reading this part Runtimes, Adapters, Templates, and Deployment and specially this part Templates and Stacks.
So basically you need to setup your app using this command:
Bash:
npx create-remix@latest --template remix-run/remix/templates/express
this will create a new server.js file inside your root project. This is just setting up your express backend app.

2) Be sure you have the start command set like this "start": "cross-env NODE_ENV=production node ./server.js",
inside your package.json file.

3) ran npm run build this will generate a build folder for later copy to plesk.

4) create loader.cjs file inside your project root same place with server.js file and add this content to it:
JavaScript:
async function loadApp() {
    await import('./server.js');
}
loadApp();
more info about this file you can find on this thread.

5) Set your Plesk node App like this:
1732051990024.png

6 ) copy all your project files , including build folder, server.js and loader.cjs to your /httpdocs domain folder.

7) Execute npm install and npm build from Run Node.js commands tab:
1732052220948.png

8) Restart your Node App and check your domain if now works.
 
Back
Top