• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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