Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how is run with node index.js possible? #9

Closed
sutidor opened this issue Aug 19, 2019 · 23 comments
Closed

how is run with node index.js possible? #9

sutidor opened this issue Aug 19, 2019 · 23 comments

Comments

@sutidor
Copy link

sutidor commented Aug 19, 2019

Hey Jan,
how do I build the source and run it from node index.js? I want to deploy on plesk.

I tried a lot of things for hours but nothing seems to work. When I try to "build" via VS Code I get following error:
error TS2688: Cannot find type definition file for 'jest'.
error TS2688: Cannot find type definition file for 'node'.

Some operation I did got me the folder "dist" but even when I run that, there are errors.

Please help or give me a hint. Thanks Sven

@janober
Copy link
Member

janober commented Aug 19, 2019

Hello!

Sorry to hear that you have problems!

Do you have to build it from source? Can you not simply use the n8n npm package?

In case that is not possible you can simply follow the guide here:
https://github.com/n8n-io/n8n/blob/master/CONTRIBUTING.md#development-setup

To start it you can then also run instead of npm run start simply: node packages/cli/dist/index.js both do basically the same thing.

When you publish n8n on a webserver please make sure to secure it like descibed here:
https://github.com/n8n-io/n8n/tree/master/packages/cli#securing-n8n

Hope that helps!

@janober
Copy link
Member

janober commented Aug 19, 2019

Actually realize that the easier way of simply npm installing n8n did not work because it did not resolve the path to the editor-ui correctly. Fixed that bug now. So in case you do not have to build it yourself for some reason and you are happy with the currently released version you can now simply do this:

# Install n8n in the folder you want to run it from
npm install n8n

# Start it
node node_modules/n8n/dist/index.js

In case you still have problems simply get back to me.

@sutidor
Copy link
Author

sutidor commented Aug 19, 2019

For those who come after me... To get n8n working on (Debian) Plesk / node index.js the following steps must be taken:

(Versions used: Plesk 17.8.11 Update #64; Nodejs 12.4.0)

In Plesk

create new domain n8n.domain.tld
go to hosting settings and disable PHP and fast CGI

Optional Activate SSL

go to hosting settings and activate your SSL certificate (wildcard in my case) OR go to letsencrypt and get a cert n8n.domain.tld

if you havent already

Install node.js in tools and settings -> updates and upgrades
(there is a way to install latest nodejs manually and register it in plesk, just google that)

Optional use PostgreSQL

Install postgresql tools and settings -> updates and upgrades
Go to tools and settings -> database server and click on the grey circle to add an admin account and password to postgresql
Go to your n8n.domain.tld, add a database, connect it to your subscription

ssh to server

apt install build-essential
cd /var/www/vhosts/domain.tld/n8n.domain.tld/
npm init --yes
npm install n8n
#even though you may override it via environment variables, need to install sqlite3
npm install sqlite3 --save

fix permissions: find out correct permissions

to find out which permissions your other, working projects have, use
cd /var/www/vhosts/domain.tld/
ls -l
cd /var/www/vhosts/domain.tld/another.domain.tld/
ls -l

fix permissions: chown (notice -R in first for permissions in both folder and subfolders)

chown subscriptionuser:psacln -R /var/www/vhosts/domain.tld/n8n.domain.tld/
chown subscriptionuser:psaserv /var/www/vhosts/domain.tld/n8n.domain.tld/

Back to Plesk: Go to your domain n8n.domain.tld and adjust NodeJS Settings

Set the document-root and application-root to /var/www/vhosts/domain.tld/n8n.domain.tld/node_modules/n8n/bin
Set application startup file to n8n
Set custom environment variables as you please, for example

N8N_HOST=n8n.domain.tld
N8N_PROTOCOL=https
N8N_PORT=443
VUE_APP_URL_BASE_API=https://n8n.domain.tld/
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=
N8N_BASIC_AUTH_PASSWORD=
DB_TYPE=postgresdb
DB_POSTGRESDB_DATABASE (default: 'n8n')
DB_POSTGRESDB_HOST (default: 'localhost')
DB_POSTGRESDB_PORT (default: 5432)
DB_POSTGRESDB_USER (default: 'root')
DB_POSTGRESDB_PASSWORD (default: empty)

nginx config

In order to receive all event callbacks in UI, you have to disable Proxymode.
Go to preferences for nginx and apache
disable "proxymode"

to update

cd /var/www/vhosts/domain.tld/
nano package.json
change
"dependencies": {
"n8n": "~0"
}
...otherwise it wont get updated.
npm update

@sutidor
Copy link
Author

sutidor commented Aug 19, 2019

Jan, thanks for your quick advice. I will dive into n8n now.

2 more questions:
What are your recommended permissions for the installed files?
How to update n8n once there are new versions?

@janober
Copy link
Member

janober commented Aug 20, 2019

Thanks a lot for taking the time to write up the Plesk guide for other people. Is really very appreciated. If it is OK with you I would use it as a base for a Plesk-Setup-Guide I would like to add to the project documentation.

About your questions:

  1. Permissions: n8n does not write or change anything in its own folder. So theoretically only read access is needed, that means 400 should be enough. The only folder to which it writes to (on the initial start at least) is the ~/.n8n folder. There it keeps for example the secret to decode the credentials. It also keeps there the sqlite database file (in case it gets used, but not the case for you as you use Postgres).
  2. Update: Simply running npm update in the folder should check for a new version and install it

@janober
Copy link
Member

janober commented Aug 21, 2019

Closing this issue.

@janober janober closed this as completed Aug 21, 2019
@gabrieligbastos
Copy link

is it possible to run it to develop/extend on Mac?

i followed:

npm install -g lerna

git clone {repo}

cd {repo}

lerna bootstrap --hoist

npm run build

all successfuly, except the build, with error (remember, i'm on Mac)

/Users/gbastos/Development/ThirdParties/n8n/node_modules/open/index.js:29
		...options
		^^^
SyntaxError: Unexpected token ...
    at Object.exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/gbastos/Development/ThirdParties/n8n/node_modules/@vue/cli-shared-utils/lib/openBrowser.js:9:14)
    at Module._compile (module.js:571:32)

npm ERR! Darwin 18.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v7.6.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! n8n-editor-ui@0.14.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the n8n-editor-ui@0.14.0 build script 'vue-cli-service build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the n8n-editor-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     vue-cli-service build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs n8n-editor-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls n8n-editor-ui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/gbastos/.npm/_logs/2019-09-03T13_20_40_296Z-debug.log
lerna ERR! npm run build exited 1 in 'n8n-editor-ui'
lerna ERR! npm run build exited 1 in 'n8n-editor-ui'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.

npm ERR! Darwin 18.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v7.6.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! n8n@ build: `lerna exec npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the n8n@ build script 'lerna exec npm run build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the n8n package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     lerna exec npm run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs n8n
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls n8n
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/gbastos/.npm/_logs/2019-09-03T13_20_40_328Z-debug.log

@janober
Copy link
Member

janober commented Sep 3, 2019

Should also work on a mac. Not sure what the issue is right now but you are using a quite old version of node (v7.6.0). Never tested it with such an old version. I would recommend v10 or v12. Could you please try to upgrade node and then try again from the beginning?

@gabrieligbastos
Copy link

Oh right, thanks for your quickly response!
I will try it right now, just a doubt, i can ignore build-essential or tools, right? those are just for ubuntu or windows, right?

@janober
Copy link
Member

janober commented Sep 3, 2019

No problem.
Not sure if you can really ignore them. Something equivalent does for sure also exist for MacOS (even though I have no idea how they are called) and without it, it will not work. Anyway the most people have that stuff already installed when they ever did develope other modules. So if you did, the chance is high that you already have it. I did just put it there to avoid problems I could think of that people could run into.

@gabrieligbastos
Copy link

oh, i see.
i said that because of this:
https://stackoverflow.com/questions/38086451/how-to-install-build-essential-on-mac

btw, i decided to run:
xcode-select --install

@janober
Copy link
Member

janober commented Sep 3, 2019

It installs some things like c++ compiler, make and so on:
https://packages.ubuntu.com/xenial/build-essential

Was not aware that the inital purpose of the package was to create Debian packages. But that does actually not matter. n8n dependencies need it to build correctly (and probably the most larger projects on npm also). Actually also think Python is needed (which I thought was in build-essentials but I was wrong there). Anyway if that becomes a problem it will display you a new error message ;-) I keep my fingers crossed!

@gabrieligbastos
Copy link

oh, i see, thanks..
well, not built yet =(

lerna notice cli v3.16.4
lerna info versioning independent
lerna info Executing command in 6 packages: "npm run build"

> n8n-workflow@0.10.0 build /Users/gbastos/Development/ThirdParties/n8n/packages/workflow
> tsc


> n8n-core@0.9.0 build /Users/gbastos/Development/ThirdParties/n8n/packages/core
> tsc


> n8n-editor-ui@0.14.0 build /Users/gbastos/Development/ThirdParties/n8n/packages/editor-ui
> vue-cli-service build


⠙  Building for production...Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
⠹  Building for production...
> n8n-node-dev@0.3.0 build /Users/gbastos/Development/ThirdParties/n8n/packages/node-dev
> tsc


> n8n-nodes-base@0.13.0 build /Users/gbastos/Development/ThirdParties/n8n/packages/nodes-base
> tsc && gulp

⠋  Building for production...=============

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: ~3.1.1

YOUR TYPESCRIPT VERSION: 3.5.3

Please only submit bug reports when using the officially supported version.

=============
⠦  Building for production...=============

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: ~3.1.1

YOUR TYPESCRIPT VERSION: 3.5.3

Please only submit bug reports when using the officially supported version.

=============
⠇  Building for production...=============

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: ~3.1.1

YOUR TYPESCRIPT VERSION: 3.5.3

Please only submit bug reports when using the officially supported version.

=============
⠋  Building for production...=============

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: ~3.1.1

YOUR TYPESCRIPT VERSION: 3.5.3

Please only submit bug reports when using the officially supported version.

=============
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: ~3.1.1

YOUR TYPESCRIPT VERSION: 3.5.3

Please only submit bug reports when using the officially supported version.

=============
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: ~3.1.1

YOUR TYPESCRIPT VERSION: 3.5.3

Please only submit bug reports when using the officially supported version.

=============
⠋  Building for production...=============

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: ~3.1.1

YOUR TYPESCRIPT VERSION: 3.5.3

Please only submit bug reports when using the officially supported version.

=============
⠧  Building for production...[11:07:17] Using gulpfile ~/Development/ThirdParties/n8n/packages/nodes-base/gulpfile.js
[11:07:17] Starting 'default'...
[11:07:17] Finished 'default' after 59 ms
⠋  Building for production...

 ERROR  Failed to compile with 2 errors                                                                                                                                                          11:07:29 AM

 error  in /Users/gbastos/Development/ThirdParties/n8n/packages/editor-ui/src/components/NodeSettings.vue

ERROR in /Users/gbastos/Development/ThirdParties/n8n/packages/editor-ui/src/components/NodeSettings.vue
92:9 Object is possibly 'null'.
    90 | 			},
    91 | 			nodeTypeDescription (): string {
  > 92 | 				if (this.nodeType.description) {
       | 				    ^
    93 | 					return this.nodeType.description;
    94 | 				} else {
    95 | 					return 'No description found';

 error  in /Users/gbastos/Development/ThirdParties/n8n/packages/editor-ui/src/components/NodeSettings.vue

ERROR in /Users/gbastos/Development/ThirdParties/n8n/packages/editor-ui/src/components/NodeSettings.vue
93:13 Object is possibly 'null'.
    91 | 			nodeTypeDescription (): string {
    92 | 				if (this.nodeType.description) {
  > 93 | 					return this.nodeType.description;
       | 					       ^
    94 | 				} else {
    95 | 					return 'No description found';
    96 | 				}

Webpack Bundle Analyzer saved report to /Users/gbastos/Development/ThirdParties/n8n/packages/editor-ui/dist/report.html
 ERROR  Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! n8n-editor-ui@0.14.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the n8n-editor-ui@0.14.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gbastos/.npm/_logs/2019-09-03T14_07_30_673Z-debug.log
lerna ERR! npm run build exited 1 in 'n8n-editor-ui'
lerna ERR! npm run build exited 1 in 'n8n-editor-ui'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! n8n@ build: `lerna exec npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the n8n@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gbastos/.npm/_logs/2019-09-03T14_07_30_716Z-debug.log

any clue on this?

@gabrieligbastos
Copy link

what version of python?
i have:
Python 2.7.10

@janober
Copy link
Member

janober commented Sep 3, 2019

That message is actually a TypeScript error from some new code I pushed 2 days ago. I did fix it now. If you pull the code again (and so the fix) it should now work.

@gabrieligbastos
Copy link

Wow, thanks! Working ;)
Thanks very much

@janober
Copy link
Member

janober commented Sep 3, 2019

Great to hear! You are welcome! Have fun!

@zmayyem
Copy link

zmayyem commented Apr 28, 2020

@sutidor Thx for your explination about installing n8n on plesk , but this is did'nt work for me

I use Plesk Obsidian 18 and debian I got serval error in the instllation process as well it did not work

Can you please explain how can install the lastetst version on plesk 18

Or if is it possible how to use it via the plesk docker manager ??

@zmayyem
Copy link

zmayyem commented Apr 28, 2020

I dont have any idea on docker or , but I just want to install n8n on my VPS Server and point it to a subdomain managed By Plesk Panel , without loosing Plesk configuration Or My Other Domains

@sutidor
Copy link
Author

sutidor commented Apr 28, 2020

Which error you got during installation? Maybe it does not have to do with Plesk

@zmayyem
Copy link

zmayyem commented Apr 29, 2020

Hi @sutidor , I will explain you what I did exactly step by step
I have More than a week testing and repeat testing on fresh VPS and I did not success :(
I hope you help me and if you want I can give you the VPS Root Access to verify.

So I started from scratch by creating new VPS on Digitalocean.

1) I start by creating fresh Droplet (Debian 9 64bit).

2) I Installed New Plesk Obsidian 18.0 on the VPS. (Via SSH)

3) I added the main Domain (besthotelguides.com).

4) I Created subdomain (n8n.besthotelguides.com).

5) I Installed SSL on both Main Domain and Subdomain.

6) I Installed Nodejs from (Plesk tools->update->Add New Component).
Plesk 18 Already have the NodeJs v 12.4.0 Like you used on your documentation

7) I disabled PHP & FastCGI of the subdomain (n8n.besthotelguides.com.com)
from the subdomain Hosting Setting.

8) I created New MySql Database n8n (I pass the PostgreSql Installation because I try 5 Time
installing it and no Result , So I decide in the last try to use MySql, because I read that lastest version of n8n is compatible with MAriaDB/MySql)

9) Via SSH and folowing your documentation

9.1) cd /var/www/vhosts/besthotelguides.com/n8n.besthotelguides.com/

9.2) npm init --yes
here i got an error (-bash: npm: command not found)
So I fix it By Installing npm with those commands:
9.2.1) curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
9.2.2) apt-get update && sudo apt-get install yarn
9.2.3) apt-get install nodejs npm
9.2.4) npm -v and the result is 6.14.4. so here npm is installed.

Backing to the step 9.2 executing the command npm init --yes and the result is :

{
  "name": "n8n.example.com",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "description": ""
}

9.3) npm install n8n
After excuting this command this is the result

`npm WARN deprecated pg-promise@9.3.6: This version of pg-promise is obsolete. You should update to a newer version.

> mmmagic@0.5.3 install /var/www/vhosts/besthotelguides.com/n8n.besthotelguides.com/node_modules/mmmagic
> node-gyp rebuild

make: Entering directory '/var/www/vhosts/besthotelguides.com/n8n.besthotelguides.com/node_modules/mmmagic/build'
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/apprentice.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/apptype.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/ascmagic.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/cdf.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/cdf_time.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/compress.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/der.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/encoding.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/fsmagic.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/funcs.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/is_tar.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/magic.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/print.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/readcdf.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/readelf.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/softmagic.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/fmtcheck.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/strlcat.o
  CC(target) Release/obj.target/libmagic/deps/libmagic/src/strlcpy.o
  AR(target) Release/obj.target/deps/libmagic/magic.a
  COPY Release/magic.a
  CXX(target) Release/obj.target/magic/src/binding.o
  SOLINK_MODULE(target) Release/obj.target/magic.node
  COPY Release/magic.node
make: Leaving directory '/var/www/vhosts/besthotelguides.com/n8n.besthotelguides.com/node_modules/mmmagic/build'

> sqlite3@4.2.0 install /var/www/vhosts/besthotelguides.com/n8n.besthotelguides.com/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
[sqlite3] Success: "/var/www/vhosts/besthotelguides.com/n8n.besthotelguides.com/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node" is installed via remote
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN request-promise-native@1.0.8 requires a peer of request@^2.34 but none is installed. You must install peer dependencies yourself.
npm WARN request-promise-core@1.1.3 requires a peer of request@^2.34 but none is installed. You must install peer dependencies yourself.
npm WARN n8n.besthotelguides.com@1.0.0 No description
npm WARN n8n.besthotelguides.com@1.0.0 No repository field.

+ n8n@0.64.0
added 510 packages from 707 contributors and audited 1292 packages in 47.133s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities`

9.4) executing the command npm install sqlite3 --save
and this is the result of this command

> sqlite3@4.2.0 install /var/www/vhosts/besthotelguides.com/n8n.besthotelguides.com/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
[sqlite3] Success: "/var/www/vhosts/besthotelguides.com/n8n.besthotelguides.com/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node" is installed via remote
npm WARN request-promise-core@1.1.3 requires a peer of request@^2.34 but none is installed. You must install peer dependencies yourself.
npm WARN request-promise-native@1.0.8 requires a peer of request@^2.34 but none is installed. You must install peer dependencies yourself.
npm WARN n8n.besthotelguides.com@1.0.0 No description
npm WARN n8n.besthotelguides.com@1.0.0 No repository field.

+ sqlite3@4.2.0
updated 1 package and audited 1389 packages in 6.606s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

9.5) Fixing Permession
9.5.1) to see permessions I executed the command : cd /var/www/vhosts/besthotelguides.com/ then the command ls -l and the result is

total 16
drwxr-xr-x 2 kais psacln  4096 Apr 28 21:28 error_docs
drwxr-x--- 3 kais psaserv 4096 Apr 28 21:29 httpdocs
drwx------ 3 kais root    4096 Apr 28 22:21 logs
drwxr-x--- 3 kais psaserv 4096 Apr 28 23:57 n8n.besthotelguides.com

9.5.2) executing the command : chown kais:psacln -R /var/www/vhosts/besthotelguides.com/n8n.besthotelguides.com/
9.5.3) executing the command : chown kais:psaserv /var/www/vhosts/besthotelguides.com/n8n.besthotelguides.com/

10) Adjusting NodeJS Setting From Plesk Panel
From The Plesk Panel this screenshot show how I set configuration

n8n-nodejs-config

11 I disabled the Proxy Mode From the Apache/Nginx Configuration

12 I access to the subdomain url https://n8n.besthotelguides.com
and this is the result on this screenshot

n8n-not-accessible

Ps: I back to check the MySQl Database and I find it empty , I dont know if environnement that
i set it is valid or no, as well I dont know if I miss other command or no to start n8n or only
the Plesk node configuration is satisfisant !!
Please @sutidor , @janober , do you have any idea how to fix this issue
I dont know if I forget something but I hope you understand what is the problem and how
can i fix it , as well if you like I can give you the root access of the server to verify

thanks in advance

@zmayyem
Copy link

zmayyem commented Apr 30, 2020

@sutidor Any help please ??

@lolcabanon
Copy link

Hey guys! I know it's been a super long time, but I just stumbled upon this thread, and I am running n8n on a shared hosting (not cPanel, but very similar, it uses PassengerPhusion to manage node apps just like cPanel).

Steps :

  1. Create domain and relevant DNS config from xPanel
  2. Create new node app from xPanel :
    a. Select domain
    b. Select working directory for the app files
    c. Startup file : node_modules/n8n/bin/n8n
  3. Run npm init && npm install n8n inside the working directory (or create/update package.json with n8n as dependency and run install command from the UI)
  4. Run the app
  5. Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants