The town of Puerto Obaldía in Panama has a Colombian consulate (not an honorary consulate). There are some photos of the consulate here.
Puerto Obaldía only host 672 people according to Wiki.
This town is literally in the middle of nowhere. It has no access to any roads (its located in the Darien gap) and only has a small airfield to connect it to the outside world.
I believe it could the smallest non-capital city with a full time operational consulate in the world.
This is tentative because I can’t find proof it…
A couple of years ago I saw a documentary about the research bases on Antartica. (Probably on Discovery or Natiopnal geograhic Channel, I don’t remember.)
According to that documentary the various base-commanders have limited consular or ambassadorial powers. These bases can be isolated from the outside world for months and often have people of several nationalities on base. In order to be able to deal with certain things themselves the base-commanders have wide-ranging authority.
I tried to find some conclusive evidence that this is true, but I can’t.
If this is true one could argue (since Antartica doesn’t have a capital) that all these bases are “outside the capital” and given the very low number of people on each base it would probably beat the current (Barentsburg) best answer easily.
The city of Airar in the island nation of Palau hosts the embassy of the United States of America, even though it is not the capital of Palau. Airar had a population of 2455 in 2015. The embassy provides services to US citizens.
Russian Consulate General in Barentsburg, Norway. The settlement has a population of 470 people.
Even if you assume that is also serves Longyearbyen, the capital of Svalbard (not connected by any roads with Barentsburg), the population of both settlements is only around 2570.
México has a consulate in Presidio, TX, which has a population of around 4500.
Credit:stackoverflow.com‘