If you have ever wondered how FiveM servers run instanced apartments, separate game modes, or private party sessions without spinning up a second server, routing buckets are the answer. Here is what they are and how they work.
By default, every player on a FiveM server shares the same game world. They can see each other, interact with each other's vehicles, and affect each other's entities. That works fine for open-world roleplay, but it breaks down the moment you need separation.
How do you run a character creation screen without other players seeing a new player floating? How do you send a player into a private apartment without them seeing through the walls into someone else's session?
A routing bucket is an isolated game world that exists within the same server. Players assigned to different buckets cannot see each other, cannot see each other's vehicles or entities, and do not share NPC population. From the game's perspective, they are in completely separate worlds, even though they are on the same server at the same time.
Every player starts in bucket 0 by default, which is the shared game world. Assigning a player to any other bucket number moves them into an isolated instance.
The same applies to entities. A vehicle or object can be assigned to a specific bucket, and only players in that bucket will see it.
The official FiveM documentation lists these as intended uses:
A common practical use on RP servers is instanced housing. When a player enters their apartment, the script moves them to a unique bucket. Other players outside the apartment cannot see them, and the player inside cannot see or interact with the outside world. When they leave, they are moved back to bucket 0.
Routing buckets split a single FiveM server into isolated world instances. Players in different buckets cannot see or interact with each other. They are used for instanced housing, private sessions, multi-mode servers, and character creation screens. Each bucket can have its own entity lockdown rules and NPC population settings. They require OneSync and are managed entirely server-side.