Use NSSM to install SyncThing as a Windows service

SyncThing does what OneDrive & Google Drive can do but under your control, across your machines, with more options, and without having to touch a 3rd party data snooping provider and without having to pay 3rd party Terabyte rates. I use it on my home network both to synchronise configuration across multiple machines and as an at-home backup solution. It's fast, simple, well-maintained and it works.

NSSM is “the Non-Sucking Service Manager” which has a simple GUI to set up commandline programs like SyncThing as a Windows Service.

Install SyncThing

To use SyncThing as a Service, avoid the GUI options such as SyncTrayzor and go for the GitHub download. Choose a directory to install to, such as your Program Files directory.

SyncTrayzor is great for your working machine, where you only need SyncThing to run when you are logged in. For a server which is hosting backups and redundant copies of your files, you want a Windows service running whenever the machine is up.

Install NSSM

NSSM also has no installer as of early 2020. Download & extract to a Program Files directory.

I then added New-Alias nssm "C:\Program Files\nssm-2\win64\nssm.exe" to my PowerShell profile

Launch NSSM

nssm without parameters will show you the commands you can use. The simplest is to use install & edit to get the GUI:
To show service installation GUI: nssm install [<servicename>]
To show service editing GUI: nssm edit <servicename>

So use:

nssm install SyncThing

And then fill in the boxes by finding the path where you installed SyncThing. I only edited the first three tabs: Application, Details, and Log On. The rest can stay as default.

What about the Parameters? See the SyncThing Docs. This is mine:

-no-console -no-browser -no-restart -gui-address=localhost:8384

-no-console -no-browser are because services run headless.
-no-restart because the Windows Service infrastructure has options for handling restarts.
-gui-address=localhost:8384 to make the gui console only available on localhost, not across the network. You may not want this.

You can now use nssm to start/stop/monitor services, not just the ones you have installed with it.

nssm start SyncThing
nssm status SyncThing

Or, you can use the standard Windows Services gui.

Where is the config?

Nssm just edits the Windows service config, which is visible in the Local Services app, which you can launch from Task Manager -> Services

SyncThing keeps config in the place noted in SyncThing Docs unless you add e.g. -home=D:\MyPath to the startup parameters

Where is the SyncThing Gui?

If you followed my example and used -gui-address=localhost:8384 then open that address in your browser and read all about at https://docs.syncthing.net/intro/gui.html

More Options?

See https://docs.syncthing.net/users/syncthing.html

Yes but I want to manage it across my home network?

  1. Change the startup options to use -gui-address=0.0.0.0:8384.
  2. Add the full path to SyncThing.exe as a firewall exception in your Windows firewall.
  3. Restart the service

This will make the browser interface accessible across the network. Then:

  1. Open the the GUI at localhost:8384.
  2. Open the Settings (under the Actions menu, top right).
  3. Open the GUI panel.
    1. Choose HTTPS
    2. Add a username and password. NB I think these are both case sensitive.

Choosing an Affordable Mechanical Keyboard

tl;dr: KeyChron are brilliant and cheaper than the alternatives.

My nephew was foolish enough to ask about the keyboard he spotted in a photo of my desktop so, armed with my Keychron K2, I explained what led me to it.

I got out kitchen scales and improvised some 2-10 gramme weights and carefully weighed the actuation force on my MacBook and on my Logitech K480. I found that the MacBook is approx 60grammes and that the K480—which I find too much hard work to type on—is about 70g. To me, the difference feels much more than that, but that's what the scales told me. (And yes, the A-level physicists amongst you will know that by gramme I mean, milliNewton)

I deduced that any switch of 60g or below, I would be happy with.
I then noted that the Gateron Blue is allegedly noisy (fine if you don't share a room with someone, anti-social if you do); and I examined the graphs of the actuation curves. I would have preferred the ‘clicky’ buckling spring feel of the Blue but I've used a noisy keyboard before and feel the noise can be a real downer. I definitely didn't want the linear feel which the Red and Black have (allegedly gamers like it, but I don't) so that left me with the Brown ‘Tactile’ which is in between.

I went for aluminium backlit because boo to plastic (don't kid yourself though; I do not know whether the carbon footprint of producing the aluminium keyboard is any less than that of the plastic). Nightlife without backlighting is grim, it is must-have for me. My other must-haves are Mac keycaps, and either the “tenkeyless” keyset or the full 101 keys, because I hate not having page up/down and home/end on the main keyboard.

I agonised over K1 or K2 and went for K2 because K1 didn't have the Brown switches. But … having become a closet Apple fanboi I am now disappointed that the K2 feels much higher off the desk that the Apple ultra-flat style and I may yet buy a K1 instead. Or a wrist rest.

I assure you however that the K2 is the best keyboard I've had for years. I had an IBM buckling spring keyboard for while in the 1990s, and a noisy Cherry for a while last year. The KeyChron has the same solid feel at the IBM had, but with the Brown switches is lighter and feels slightly less industrial. It is really nice, impressively priced, and I very much like it.

It will make you want to type long letters, or—should you happen to have WhatsApp Web on your computer—really really long messages to your nephew about how good your keyboard is. 🤷

Also 10% off! https://keychronwireless.refr.cc/chriscarroll

I did spend a while looking at other keyboards, mostly mechanical, but wasn't willing to pay the enormous prices. KeyChron is a half or even a third of the price of other good mechanical keyboards. Seemed a no-brainer to me.

UK Measures for Covid-19 announced 23rd March 2020

These were announced at 8:30pm on UK TV:

NEW RULES ON STAYING AT HOME AND AWAY FROM OTHERS
The single most important action we can all take, in fighting coronavirus, is to stay at home in order to protect the NHS and save lives.
When we reduce our day-to-day contact with other people, we will reduce the spread of the infection. That is why the government is now (23 March 2020) introducing three new measures.
1. Requiring people to stay at home, except for very limited purposes 2. Closing non-essential shops and community spaces
3. Stopping all gatherings of more than two people in public
Every citizen must comply with these new measures. The relevant authorities, including the police, will be given the powers to enforce them – including through fines and dispersing gatherings.
These measures are effective immediately. The Government will look again at these measures in three weeks, and relax them if the evidence shows this is possible.
1. STAYING AT HOME
You should only leave the house for one of four reasons.
●  Shopping for basic necessities​, for example food and medicine, which must be as infrequent as possible.
●  One form of exercise a day, for example a run, walk, or cycle - alone or with members of your household.
●  Any medical need​, or to provide care or to help a vulnerable person.
●  Travelling to and from work​, but only where this absolutely cannot be done from home.
These four reasons are exceptions - even when doing these activities, you should be minimising time spent
outside of the home and ensuring you are 2 metres apart from anyone outside of your household.
These measures must be followed by everyone. Separate advice is available for individuals or households
who are isolating​, and for the ​most vulnerable who need to be shielded​.
If you work in a critical sector outlined in this ​guidance​, or your child has been identified as vulnerable, you can continue to take your children to school. ​Where parents do not live in the same household, children under 18 can be moved between their parents’ homes


2. CLOSING NON-ESSENTIAL SHOPS AND PUBLIC SPACES
Last week, the Government ordered certain businesses - including pubs, cinemas and theatres - to close.
The Government is now extending this requirement to a further set of businesses and other venues, including:
● all non-essential retail stores - this will include clothing and electronics stores; hair, beauty and nail salons; and outdoor and indoor markets, excluding food markets.
● libraries, community centres, and youth centres​.
●  indoor and outdoor leisure facilities​ such as bowling alleys, arcades and soft play facilities.
●  communal places within parks​, such as playgrounds, sports courts and outdoor gyms.
●  places of worship, ​except for funerals attended by immediate families.
●  hotels, hostels, bed and breakfasts, campsites, caravan parks, and boarding houses for commercial/leisure use (excluding permanent residents and key workers).
More detailed information can be found ​here​, including a full list of those businesses and other venues that must close. Businesses and other venues not on this list may remain open.


3. STOPPING PUBLIC GATHERINGS
To make sure people are staying at home and apart from each other, the Government is also ​stopping all
public gatherings of more than two people​. There are only two exceptions to this rule:
●  where the gathering is of a group of people who live togethe​r - this means that a parent can, for example, take their children to the shops if there is no option to leave them at home.
●  where the gathering is essential for work purposes - but workers should be trying to minimise all meetings and other gatherings in the workplace.
In addition, the Government is stopping social events, including weddings, baptisms and other religious ceremonies. This will exclude funerals, which can be attended by immediate family.


DELIVERING THESE NEW MEASURES
These measures will reduce our day to day contact with other people. They are a vital part of our efforts to reduce the rate of transmission of coronavirus.
Every citizen is instructed to comply with these new measures.
The Government will therefore be ensuring the police and other relevant authorities have the powers to enforce them, including through fines and dispersing gatherings where people do not comply.
They will initially last for the three weeks from 23 March, at which point the Government will look at them again and relax them if the evidence shows this is possible.

https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/874742/Full_guidance_on_staying_at_home_and_away_from_others__1_.pdf

Italian measures for Covid-19 8th—11th March 2020

Decree of the president of the Council of Ministers 9 March 2020

Decree of the president of the Council of Ministers 11 March 2020

[By google translate]

9th March 

DECRETO DEL PRESIDENTE DEL CONSIGLIO DEI MINISTRI 9 marzo 2020

Given the law of 23 August 1988, n. 400;
Given the decree-law of 23 February 2020, n. 6, containing "measures
Urgent for the containment and management of the emergency
Epidemiological from COVID-19" and, in particular, art. 3;
Having regard to the decree of the President of the Council of Ministers of 23
February 2020, containing «Implementing provisions of the decree-law of 23
February 2020, n. 6, containing urgent measures regarding the
containment and management of the epidemiological emergency from COVID-19 ",
published in the Official Journal n. 45 of 23 February 2020;
Having regard to the decree of the President of the Council of Ministers of 25
February 2020, containing «Further implementing provisions of the
decree-law of 23 February 2020, n. 6, containing urgent measures
regarding the containment and management of the epidemiological emergency from
COVID-19 ", published in the Official Journal n. 47 of 25 February
2020;
Having regard to the decree of the President of the Council of Ministers 1 March
2020, containing «Further implementing provisions of the decree-law 23
February 2020, n. 6, containing urgent measures regarding the
containment and management of the epidemiological emergency from COVID-19 ",
published in the Official Journal n. 52 of 1 March 2020;
Having regard to the decree of the President of the Council of Ministers 4 March
2020, containing «Further implementing provisions of the decree-law 23
February 2020, n. 6, containing urgent measures regarding the
containment and management of the epidemiological emergency from COVID-19,
applicable on the whole national territory ", published in
the Official Journal n. 55 of March 4, 2020;
Having regard to the decree of the President of the Council of Ministers 8 March
2020, containing «Further implementing provisions of the decree-law 23
February 2020, n. 6, containing urgent measures regarding the
containment and management of the epidemiological emergency from COVID-19 ",
published in the Official Journal n. 59 of March 8, 2020;
Considering that the World Health Organization on30
January, 2020 declared the COVID-19 epidemic an emergency of
public health of international importance;
Given the resolution of the Council of Ministers of 31 January 2020,
with which the state of emergency was declared for six months
on the national territory relating to the health risk associated with the
onset of diseases deriving from transmissible viral agents;
Considering the evolution of the epidemiological situation, the
particularly widespread nature of the epidemic and the increase in
cases on the national territory;
It was deemed necessary to extend the
measures already provided for by art. 1 of the Prime's decree of
Minister8 March 2020;
Considering, moreover, that the supranational dimensions of the phenomenon
Epidemic and the interest of several areas on the national territory
make necessary measures aimed at guaranteeing uniformity
in the implementation of the prophylaxis programs developed at
international and European level;
On a proposal from the Minister of Health, after consulting the Ministersthe
ofInterior, Defense, the Economy and Finance, as well as the
Ministers of Education, Justice, Infrastructure and
Transport, University and Research, agricultural policies
food and forestry, cultural goods and activities and
tourism, labor and social policies, for the public
administration, for youth policies and sports and for
regional affairs and autonomy, as well as after hearing the President of the
Conference of Presidents of the Regions;

Decrees: 

Art. 1 

Urgent measures to contain the contagion on the whole national territory 

  1. In order to counter and contain the spread of the virus,
    COVID-19the measures referred to in art. 1 of the Prime's decree of
    Minister8 March 2020 are extended to the whole territory
    national.
  2. All forms of prohibited on the whole national territory
    gathering of people in public places or places open to the public are.
  3. Letter d) of art. 1 decree of the President of the Council
    of Ministers of 8 March 2020 is replaced by the following:
    «d) sporting events and competitions of allare suspended
    types and disciplines, in public or private places. Thefacilities
    sportscan be used, behind closed doors, only for sessions of
    Training professional and non-professional athletes,
    recognized as being of national interest by theNational Olympic Committee
    Italian(CONI) and by their respective federations, in view of their
    participation in the Olympic Games or national and
    international events; remains only allowed the holding
    Of events and sports competitions organized by bodies
    international sports within sports facilities used
    behind closed doors, which open without the presence of the public; in
    all such cases, the associations and sports clubs, by means of
    their medical staff, are required to carry out the checks
    Appropriate to contain the risk of spreading the COVID-19 virus among
    athletes, technicians, managers and all attendants who
    participate; sport and motor activities carried out outdoors are
    allowed only on condition that it is possible to
    respect the interpersonal distance of one meter; ".

10th March 2020 Press Release

Covid-19, the #Iorestoacasa decree in the Official Journal

All of Italy becomes a protected area. With the latest dpcm signed on the evening of March 9 by the President of the Council of Ministers, Giuseppe Conte, the restrictive measures already applied for Lombardy and the 14 northern provinces most affected by the coronavirus are extended to the whole national territory. The new provision comes into force on March 10 and will take effect until April 3.
Move only if necessary
You can leave the house only for work needs, health reasons and needs. If required, these needs must be attested by self-declaration, which can also be made sitting immediately by filling in forms provided by the police force or downloaded from the Internet. A false declaration is a crime.
Download the new self-certification form of the Ministry of the Interior updated to the Dpcm 9 March.
Read the directive of the Minister of the Interior to the Prefects.
Prohibition of gathering
All forms of gathering of people in public places or places open to the public are forbidden on the whole national territory.
Restaurants and bars closed at 6 pm Restaurant and bar
activities are allowed from 6 to 18, with the obligation of the manager to guarantee compliance with the interpersonal distance of at least one meter.
Shopping centers closed on weekends (except pharmacies, parapharmacies and food)
Closed shopping malls and markets on holidays and on holidays. On weekdays, the manager of the business must ensure compliance with the interpersonal safety distance of one meter. The closure is not available for pharmacies, parapharmacies and food outlets (which in any case must guarantee a distance of one meter between people)
Sports events and competitions

Sports are suspended events and competitions of all orders and disciplines are suspended, in public places or private. Only those organized by international sports organizations, inside closed-door systems or outdoors without the presence of the public, are permitted.
Training for athletes behind closed doors
Sports facilities can be used, behind closed doors, only for training sessions of professional and non-professional athletes, recognized as being of national interest by the Italian National Olympic Committee (CONI) and by their respective federations, in view their participation in the Olympic games or national and international events.
Stop to gyms, swimming pools, spas and leisure centers
The activities of gyms, sports centers, swimming pools, swimming centers, wellness centers, spas (except for the provision of services falling within the essential assistance levels), cultural centers, are suspended social centers, recreation centers.

11 March 2020

DECRETO DEL PRESIDENTE DEL CONSIGLIO DEI MINISTRI 11 marzo 2020

Given the law of 23 August 1988, n. 400;
Given the decree-law of 23 February 2020, n. 6, containing "measures
Urgent for the containment and management of the emergency
Epidemiological from COVID-19" and, in particular, art. 3;
Having regard to the decree of the President of the Council of Ministers of 23
February 2020, containing «Implementing provisions of the decree-law of 23
February 2020, n. 6, containing urgent measures regarding the
containment and management of the epidemiological emergency from COVID-19 ",
published in the Official Journal n. 45 of 23 February 2020;
Having regard to the decree of the President of the Council of Ministers of 25
February 2020, containing «Further implementing provisions of the
decree-law of 23 February 2020, n. 6, containing urgent measures
regarding the containment and management of the epidemiological emergency from
COVID-19 ", published in the Official Journal n. 47 of 25 February
2020;
Having regard to the decree of the President of the Council of Ministers 1 March
2020, containing «Further implementing provisions of the decree-law 23
February 2020, n. 6, containing urgent measures regarding the
containment and management of the epidemiological emergency from COVID-19 ",
published in the Official Journal n. 52 of 1 March 2020;
Having regard to the decree of the President of the Council of Ministers 4 March
2020, containing «Further implementing provisions of the decree-law 23
February 2020, n. 6, containing urgent measures regarding the
containment and management of the epidemiological emergency from COVID-19,
applicable on the whole national territory ", published in
the Official Journal n. 55 of March 4, 2020;
Having regard to the decree of the President of the Council of Ministers 8 March
2020, containing «Further implementing provisions of the decree-law 23
February 2020, n. 6, containing urgent measures regarding the
containment and management of the epidemiological emergency from COVID-19 ",
published in the Official Journal n. 59 of March 8, 2020;
Having regard to the decree of the President of the Council of Ministers 9 March
2020, containing «Further implementing provisions of the decree-law 23
February 2020, n. 6, containing urgent measures regarding the
containment and management of the epidemiological emergency from COVID-19,
applicable on the entire national territory published in
the Official Journal n. 62 of 9 March 2020 ";
Considering that the World Health Organization on30
January, 2020 declared the COVID-19 epidemic an emergency
international public health;
Given the resolution of the Council of Ministers of 31 January 2020,
with which the state of emergency was declared for six months
on the national territory relating to the health risk associated with the
onset of diseases deriving from transmissible viral agents;
Considering the evolution of the epidemiological situation, the
particularly widespread nature of the epidemic and the increase in
cases on the national territory;
It was deemed necessary to adopton the entire national territory
further measures regarding the containment and management of the emergency
Epidemiological from COVID-19;
Considering, moreover, that the supranational dimensions of the phenomenon
Epidemic and the interest of several areas on the national territory
make necessary measures aimed at guaranteeing uniformity
in the implementation of the prophylaxis programs developed at
international and European level;
On a proposal from the Minister of Health, after consulting the Ministersthe
ofInterior, Defense, Economy and Finance, as well as the
Ministers of Infrastructure and Transport,Development
Economic, Agricultural, Food and Forestry Policies, Goods
and Activities cultural and tourism, labor and
social policies, for the public administration, and for affairs
Regional and autonomies, as well as after hearing the President of the
Conference of Presidents of the Regions;

Decrees: 

Art. 1 

Urgent measures to contain the contagion on the whole territory national

In order to counter and contain the spread of the virus
COVID-19, the following are adopted throughout the national territory
measures:
1) Retail commercial activities are suspended,
except for the sale of food and first
needs identified in Annex 1, both in the context of
neighborhood businesses, and in the medium and
large-scale distribution, also included in shopping centers,
provided that access is permitted only to the aforementioned activities.are
Regardless of the type of activity carried out, the closed, with the
Markets exception of activities directed to the sale of only
food. Newsagents, tobacconists, pharmacies and remain open
parapharmacies. In any case, the distance must be guaranteed
interpersonal safety of one meter.
2) The activities of catering services (including) are suspended
bars, pubs, restaurants, ice cream shops, patisseries, with the exception of
canteens and continuous catering on a contractual basis, which
guarantee the interpersonal safety distance of one meter.
Only catering with home delivery in permitted
compliance with hygiene and health standards is for both
packaging and transport activities. The
food and drink administration establishments located in the areas
service and refueling located along the road,
motorway and railway, airport,stations
lake and hospital and hospitals are also open, guaranteeing the safety distance
Interpersonal of a meter.
3) Activities relating to personal services (are suspended
including hairdressers, barbers, beauticians) other than those identified
in Annex 2.
4)remain guaranteed, in compliance with standards.
Banking, financial and insurance services hygiene and health
as well as the activities of the agricultural, livestock and sector,
agro-food processing including the supply chains that supply
goods and services.
5) The President of the Region with ordinance pursuant to art. 3,
paragraph 2, of the decree-law 23 February 2020 n. 6, can arrange the
programming of the service provided by transport companies
local public, even if not scheduled, aimed at reducing and
eliminating services in relation to the health interventions
necessary to contain the coronavirus emergency on the basis of
actual needs and only in order to ensure the minimum services
essential. The Minister of Infrastructure and Transport, in
agreement with the Minister of Health, can arrange, with the aim of
limiting the coronavirus emergency, scheduling with
reduction and suppression of interregional automotive services and
rail, air and sea transport, based on
actual needs and for the sole purpose of ensuring the minimum services
essential.
6) Without prejudice to the provisions of art. 1, paragraph 1, letter
e), of the decree of the President of the Council of Ministers of 8
March 2020 and without prejudice to the activities strictly functional to the
management of the emergency, the public administrations ensure the
ordinary performance of the work services inform
Agile of its employees, also by way of derogation from agreements
Individual and disclosure obligations pursuant to articles 18 to
23 of law no. 81 and identify the activities that cannot be
postponed.
7) With regard to production activities and activities, it
Professional is recommended that:
a) maximum use is made by companies in
agile work mode for the activities that can be carried out
at home or in modality to distance;
b) holidays and paid leave for are incentivized
employees as well as other instruments provided for in
collective bargaining;
c) the activities of the company departments notare suspended
indispensable for production;
d) adopt anti-contagion safety protocols and, where
it is not possible to respect the interpersonal distance of one meter
as the main containment measure, with the adoption of tools
individual protection;
e) the sanitation of the is encouraged safety nets
workplace, also by using forms of for this purpose
social;
8) for production activities only, it is also recommended that
movements within the sites are limited andis limited
access to common areas;
9) in relation to the provisions of numbers 7 and 8, they
favor, limited to productive activities, agreements between
employers' and trade union organizations.
10) For all non-suspended activities, maximum
use of agile working methods is recommended.