You first need to research the respective tech in the defence tech tree. Can't remember what it is called but basically it allows Jarun Migrators to create star bases.
Once that is done all you need to do is create a Jarun Migrator (the colony frigate), it will look slightly different than normal, a different nose. It now has an ability to create a base wherever it is currently. So move the Migrator to the place in the grav well where you want the base and press it.