In games that have the feature enabled, you can enter into a Formal Alliance with another player.
A formal alliance is an agreement between two players, but a player may be in as many formal alliances as they wish. If a player is allied with two neighbors, those neighbors will still be enemies and must create their own formal agreement.
Players in a Formal Alliance cannot capture each others stars.
24 ticks notice must be given before ending an alliance. This gives both players a short time to prepare for war.
Players in a formal alliance share scanning data. Your ally will be able to see what you can see, and you will be able to see what they can. This can be very useful when coordinating attacks and planning strategy.
To enter into a Formal Alliance you must pay a fee and request the alliance. It's best to negotiate the alliance before paying the fee so that it is not wasted. Once you have requested the alliance, the player in question must accept.
Players in an alliance will not be able to capture each others stars and will share scanning data.
It takes 24 ticks to end an alliance. To do so you must Declare War, then wait for the timer to expire before you ships can capture former allied stars.
You can Request Alliances, Accept Alliances, and Declare War on a players Empire page.