A self-sufficient colony in space capable of expanding on its own should be the ultimate goal of NASA. Sure, this goal may take a hundred or more years to reach, but it is certainly possible. Once it happens we will quickly settle the solar system, and it opens the real possibility of travel to the stars(if perhaps travel that takes many generations).
What would it take to be self sufficient though? In the abstract, you need access to energy and raw materials in space. Then you need the technology to convert those materials into the form you need, using the energy that is available.
A large colony, with several small factories, will be necessary. Luckily building space ships intended to stay in space is comparatively easy relative to ones that need to take off from earth. The pressure they need to hold in is only 1 atmosphere. They won't be subjected to large forces, as accelerations can be done over long periods of time through
solar sails or
electric propulsion systems. Radiation and meteorite protection can simply be done by using large masses of whatever material proves cheapest around the ships.
Right off the bat, we know if we are going to expand without help from earth we need mining equipment, something to mine, and facilities to convert that raw material into the form we want it in. An asteroid or low gravity moon seem ideal to me. I admit to knowing little about mining, and I suspect many of the methods we use on earth will not work well in space. Still, if we want a colony capable of growing on its own, it is safe to say we need at least a few dozen people employed in collecting raw materials, and likely many more for converting that material into the alloys, gasses, and liquids we would need to build more ships.
The ability to build solar cells is high on the list of uses for that material. Since the cells will last so long, it is not really necessary to be able to build them quickly, but you will need to build them if you want to expand. I suspect this facility would be hard to operate using less than a dozen people.
Metal parts of all kinds will be needed. Modern
Computer Numerical Controlled systems can really do amazing things. A model could probably be designed that can be built through the work of only a few dozen people. Many of these could easily enough be operated to create most metal objects.
Computer chips are also likely to be needed in such a colony. These would not need to be the most high-tech devices, but they should be robust and be capable of being used for a wide range of applications. Fabrication of these chips is complicated, once again I couldn't imagine that a factory could be run with less than a few dozen people, and maybe many more might be needed. Because of the light weight of computer chips, and their complexity, early settlements probably would just go ahead and import them. To be fully self-sufficient it would be best that they could build their own.
Food could be a real issue. Access to energy in such large amounts means that it probably will prove best to grow them indoors using artificial lighting, although that adds another factory to the list of what is needed. A lot of research has gone into this subject, so I suspect it can be beaten easily enough.
In the end, I imagine a colony of 1000 people could be designed to take care of itself. It may require a whole lot of primitive living at first though. Still, as the colony grows it will be possible to increase specialization. By the time the population reaches a million, standards of living would be quite high. By the time it reaches 10 billion, space will be the place to live.
Wikipedia is amazing as usual, and has a particularly interesting article on the subject of
space colonization.