Cant keep n8n self-hosted active

Describe the problem/error/question

I have n8n self-hosted installed on a cloud linode server using npm. I SSH into the linode and set the exports, Run n8n from cli with “n8n start”, everything works for awhile, but after about 1hr or so the ssh session is closed and n8n closes with the ssh session. Id like to ssh from my home computer, set the export variables, launch n8n, and be able to close my ssh connection without n8n closing with it

What is the error message (if any)?

None, Linode server n8n is running is still active but n8n the service stops with the ssh session.

Please share your workflow

Described in problem

Information on your n8n setup

  • n8n version: ---- 1.64.3

  • Database (default: SQLite):

  • n8n EXECUTIONS_PROCESS setting (default: own, main): — tried this and was told “deprecated”

  • Running n8n via (Docker, npm, n8n cloud, desktop app): NPM on linode

  • Operating system: Ubuntu 24.04 LTS

Hey @synfulacktor,

Welcome to the community :raised_hands:

This is happening because you are not running as a background service so when you leave the console or it disconnects it is being stopped.

I would recommend using the docker based install option which will take care of this for you and n8n will just keep running.

If for some reason you want to use the npm option you could look into using pm2 or making a service script for your distro of choice.