Darius Kazemi, recent Mozilla Fellow and one of my favorite internet artists, has put together a comprehensive guide on how to run your own social network. The Mastodon instance he runs, Friend Camp, seems like one of the more fun and positive social networks around.
This document exists to lay out some general principles of running a small social network site that have worked for me. These principles are related to community building more than they are related to specific technologies. This is because the big problems with social network sites are not technical: the problems are social problems related to things like policy, values, and power.