{"id":223,"date":"2016-07-04T23:16:28","date_gmt":"2016-07-04T22:16:28","guid":{"rendered":"https:\/\/solidt.eu\/blog\/?p=223"},"modified":"2018-08-24T22:02:19","modified_gmt":"2018-08-24T21:02:19","slug":"nodejs-hosting-with-systemd","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/nodejs-hosting-with-systemd\/","title":{"rendered":"NodeJS hosting with systemd"},"content":{"rendered":"<pre class=\"\" lang=\"ini\" title=\"node-web.service\"> \r\n[Unit]\r\nDescription=node-web\r\n\r\n[Service]\r\nExecStart=\/usr\/bin\/node \/home\/noded\/node-web\/index.js\r\nRestart=always\r\n#StandardOutput=syslog\r\n#StandardError=syslog\r\nSyslogIdentifier=node-web\r\nUser=noded\r\nGroup=noded\r\nEnvironment=NODE_ENV=production\r\nWorkingDirectory=\/home\/noded\/node-web\/\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n<\/pre>\n<pre>Copy your service file into the \/etc\/systemd\/system\/.service\r\n\r\nReload service files (systemctl daemon-reload)\r\nStart it with systemctl start node-web.\r\n\r\nEnable it to run on boot with systemctl enable node-web.\r\n\r\nSee logs with journalctl -u node-web\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>[Unit] Description=node-web [Service] ExecStart=\/usr\/bin\/node \/home\/noded\/node-web\/index.js Restart=always #StandardOutput=syslog #StandardError=syslog SyslogIdentifier=node-web User=noded Group=noded Environment=NODE_ENV=production WorkingDirectory=\/home\/noded\/node-web\/ [Install] WantedBy=multi-user.target Copy your service file into the \/etc\/systemd\/system\/.service Reload service files (systemctl daemon-reload) Start it with systemctl start node-web. Enable it to run on boot with systemctl enable node-web. See logs with journalctl -u node-web<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-223","post","type-post","status-publish","format-standard","hentry","category-other-scripts"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=223"}],"version-history":[{"count":5,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/223\/revisions"}],"predecessor-version":[{"id":819,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/223\/revisions\/819"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}