How can I install joplin CLI server as a windows service?

I know that I can use the joplin server start command to start the Joplin CLI server from the command line, but this still need to keep the console window open.

Is there a better way to install joplin CLI server as a standard windows service? For example, there are some modules on npm, like node-windows, that can install node.js app as windows services, but I don't know how to use these methods with joplin CLI server.

I want this feature.

maybe we can add install and uninstall command to joplin CLI, like systemctl:

joplin server install --profile '...'
joplin server uninstall --profile '...'
joplin server enable
joplin server disable

My temporary solution:

  1. install joplin CLI:
npm install -g joplin
  • joplin CLI install dir:
  1. goto
    download WinSW.exe

  2. copy WinSW.exe to joplin CLI install dir.

  3. make a file named jcp.cmd, write one line:

node main.js --profile C:/Users/vagra/.config/joplin-desktop/ server start
  1. make a file named jcp.xml, write:
  <description>Joplin Clipper Server</description>
  <log mode="reset"></log>
  1. open cmd or power shell in joplin CLI install dir.

  2. type this command to install service named joplin:

./winsw install jcp.xml
  1. then test the joplin service:
./winsw start jcp.xml
  1. if report error, see the jcp.err.log in joplin CLI dir.

  2. go to Control panel > Administrative tools > services, you can see the joplin service .

I'm not sure what you are going to do, if you want to open it every time you start, there can be an easier way, but if you really need this, you can try it: