You have to get people there, and you have to get them to want to bother coming back.
1. raise awareness. e.g. though word-of-mouth recommendations, or advertising (online, TV, events, IRL?)
2. it has to have something to keep attention,
3. it has to be worth coming back to
It happens through phased growth, sometimes explicitly planned, always interactively managed. A marketing and sales pipeline provides a google-able articulated view of a similar process. Or go as far "Manufacturing Consent"
They're built on positive feedback cycles, where contributions spur further engagement of viewing, and prompting others to engage. These are called virtuous cycles, when it's going in a desired direction (e.g. more contributions drive more views drive more contributions), and vicious cycles when they're not (bad drives out the good, e.g. toleration of off-topic / inappropriate content, deters helpful contributors from returning, while encouraging more detrimental contributions).
I would recommend reading Peter Hintjen's "Social Architecture"[1]. He addresses a question worded exactly the same as yours. He built a more narrowly scoped community as an integral part of building the ZeroMQ messaging library and tools, and ensuring that it was useful to as many people as possible.
Also, check out his other books [2]. Though, note that gitbook.com broke the links, and e.g.
https://www.gitbook.com/book/hintjens/social-architecture/de...
becomes
https://hintjens.gitbooks.io/social-architecture/content/
[1]: https://hintjens.gitbooks.io/social-architecture/content/
[2]: http://hintjens.com/books
I'm planning to grow a group chat (matrix self-hosted) with friends, into a dev.to-forked blogging community, that I can share with other tech friends, non-tech friends, co-workers, and use to explain work successes to family.