{"id":2434,"date":"2020-05-09T13:00:00","date_gmt":"2020-05-09T12:00:00","guid":{"rendered":"https:\/\/chewett.co.uk\/blog\/?p=2434"},"modified":"2020-05-08T12:00:11","modified_gmt":"2020-05-08T11:00:11","slug":"installing-windows-services-using-nssm","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/2434\/installing-windows-services-using-nssm\/","title":{"rendered":"Installing Windows Services using NSSM"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"254\" data-attachment-id=\"2447\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/2434\/installing-windows-services-using-nssm\/nssm_to_install_service\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_to_instalL_service.jpg?fit=800%2C300&amp;ssl=1\" data-orig-size=\"800,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"nssm_to_instalL_service\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_to_instalL_service.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_to_instalL_service.jpg?fit=678%2C254&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_to_instalL_service.jpg?resize=678%2C254&#038;ssl=1\" alt=\"\" class=\"wp-image-2447\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_to_instalL_service.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_to_instalL_service.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_to_instalL_service.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_to_instalL_service.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure>\n\n\n\n<p>This post talks about how you can quickly and easily create Windows services with NSSM.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Creating Windows Services with NSSM<\/h2>\n\n\n\n<p>Windows includes a useful utility <code>sc<\/code> which allows the creation of services however this can be complex to use.<\/p>\n\n\n\n<p>NSSM aka the &#8220;Non-Sucking Service Manager&#8221; provides a small user interface to deal with Windows Services. Today I am going to show you how to install a simple Windows Service.<\/p>\n\n\n\n<p>NSSM can be downloaded from their website: <a href=\"https:\/\/nssm.cc\/download\">https:\/\/nssm.cc\/download<\/a><\/p>\n\n\n\n<p>Once unzipped it will have a folder for win64 and win32. If you are running a 64 bit windows install use the binary in win64. If unsure use the win64 binary and if it fails try the 32 bit binary. The majority of people will now be running a 64 bit windows install.<\/p>\n\n\n\n<p>Once you know which folder to use you will want to open an adminstrative console or powershell window. To install a windows service you can enter the following.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nssm.exe install <\/pre>\n\n\n\n<p>Running this command will open up the NSSM install dialog.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"431\" height=\"232\" data-attachment-id=\"2446\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/2434\/installing-windows-services-using-nssm\/nssm_install\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_install.jpg?fit=431%2C232&amp;ssl=1\" data-orig-size=\"431,232\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"nssm_install\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_install.jpg?fit=300%2C161&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_install.jpg?fit=431%2C232&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_install.jpg?resize=431%2C232&#038;ssl=1\" alt=\"\" class=\"wp-image-2446\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_install.jpg?w=431&amp;ssl=1 431w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_install.jpg?resize=300%2C161&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/nssm_install.jpg?resize=50%2C27&amp;ssl=1 50w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/><\/figure>\n\n\n\n<p>This window will let you configure anything you need to related to the service. The key elements are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Path &#8211; Path to the executable that will act as the service<\/li><li>Startup Directory &#8211; Directory that the executable will run in<\/li><li>Arguments &#8211; Any arguments needed to be passed to the executable<\/li><li>Service Name &#8211; Name of the service in Windows<\/li><\/ul>\n\n\n\n<p>Once entered pressing &#8220;Install service&#8221; will configure and install the service in Windows Service Manager.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post talks about how you can quickly and easily create Windows services with NSSM.<\/p>\n","protected":false},"author":1,"featured_media":2448,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Today I have written a quick guide on installing Windows Services using #NSSM","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[374,375],"class_list":["post-2434","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-informational","tag-nssm","tag-windows-services"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/05\/install_service_nssm_posticon.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-Dg","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1908,"url":"https:\/\/chewett.co.uk\/blog\/1908\/install-apache-as-a-service-on-windows\/","url_meta":{"origin":2434,"position":0},"title":"Install Apache as a Service on Windows","author":"Chewett","date":"January 26, 2019","format":false,"excerpt":"Today I share how you can install the Apache webserver as a Windows service. Why install Apache as a service? By installing Apache as a service you are able to have it start automatically on boot. In addition to this, running Apache as a windows service allows you to easily\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/install_apache_windows_service.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/install_apache_windows_service.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/install_apache_windows_service.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/install_apache_windows_service.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2407,"url":"https:\/\/chewett.co.uk\/blog\/2407\/how-to-remove-teamcity-as-a-service-on-windows\/","url_meta":{"origin":2434,"position":1},"title":"How to remove TeamCity as a Service on Windows","author":"Chewett","date":"February 29, 2020","format":false,"excerpt":"Today I am leaving a note on how to remove the Jetbrains TeamCity service on Windows. Removing TeamCity as a service on Windows To remove the TeamCity service you will need to find the location of your TeamCity install. For me I had installed it under: C:\\Teamcity\\ Once in this\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/02\/remove_teamcity_service_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/02\/remove_teamcity_service_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/02\/remove_teamcity_service_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/02\/remove_teamcity_service_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1713,"url":"https:\/\/chewett.co.uk\/blog\/1713\/running-two-mysql-databases-on-windows\/","url_meta":{"origin":2434,"position":2},"title":"Running two MySQL databases on Windows","author":"Chewett","date":"November 10, 2018","format":false,"excerpt":"This post describes the process you need to follow to set up a second MySQL database on Windows. Preparation\u00a0for configuring a secondary database The base of this guide assumes that you have installed MySQL server for windows already and it is running as normally. It is assumed that the location\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/running_multiple_databases.fw_.png?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/running_multiple_databases.fw_.png?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/running_multiple_databases.fw_.png?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/running_multiple_databases.fw_.png?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2409,"url":"https:\/\/chewett.co.uk\/blog\/2409\/how-to-install-teamcity-as-a-service-on-windows\/","url_meta":{"origin":2434,"position":3},"title":"How to install TeamCity as a Service on Windows","author":"Chewett","date":"March 14, 2020","format":false,"excerpt":"Today I have written a small note on how to install the Jetbrains TeamCity service on windows. Installing TeamCity as a service on Windows To install TeamCity as a service you will need to find the location of your TeamCity install. For me I have installed it under: C:\\Teamcity\\ Once\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/02\/install_teamcity_service_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/02\/install_teamcity_service_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/02\/install_teamcity_service_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/02\/install_teamcity_service_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":572,"url":"https:\/\/chewett.co.uk\/blog\/572\/installing-ubuntu-linux-tools-windows\/","url_meta":{"origin":2434,"position":4},"title":"Installing Ubuntu Linux tools for Windows","author":"Chewett","date":"August 23, 2017","format":false,"excerpt":"I am a big fan of Linux and today want to share how you can install the Windows Subsystem for Linux (WSL) on Windows 10. This new feature available in Windows 10 lets you install a Linux bash shell and run various linux tools on Windows. Here I describe how\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/windows_subsystem_for_linx.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/windows_subsystem_for_linx.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/windows_subsystem_for_linx.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/windows_subsystem_for_linx.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":119,"url":"https:\/\/chewett.co.uk\/blog\/119\/tile-windows-like-windows-7-on-xfce\/","url_meta":{"origin":2434,"position":5},"title":"Tile windows like Windows 7 on XFCE","author":"Chewett","date":"March 3, 2013","format":false,"excerpt":"Windows 7 has a really nice feature that lets you tile a window to the left or right of the screen, allowing easier placement. This is normally activated with the Windows-(left, right, up down) Arrow key combination. I had searched how to do this with XFCE for a while and\u2026","rel":"","context":"In &quot;Fixes&quot;","block_context":{"text":"Fixes","link":"https:\/\/chewett.co.uk\/blog\/category\/fixes\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=2434"}],"version-history":[{"count":4,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2434\/revisions"}],"predecessor-version":[{"id":2449,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2434\/revisions\/2449"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/2448"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=2434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=2434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=2434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}