Access rules
Access rules decide which files players can download and upload. This page shows how to write a rule, give a group of players access, set limits, and check a rule before your game ships.
You manage rules in Nexus → Asset Storage → Access rules. Only organization owners and admins can change them.
How rules work
Section titled “How rules work”- Without a rule, players can’t reach any file.
- A rule covers every path that matches its pattern.
- Each path matches one rule at most. Nexus refuses a new rule that would overlap an existing one, and shows a path that both would match.
- Your backend, with an API key, and Nexus can reach every file. Rules only apply to players.
- Changes apply to players at once.
- You can’t change a rule’s pattern later. You can change who has access and the limits.
- If you delete a rule, players lose access to its files. The files stay in storage, and your backend can still reach them.
Write a pattern
Section titled “Write a pattern”A pattern is a path whose parts can be wildcards:
| Part | Matches |
|---|---|
A name, such as public |
Exactly that name. |
* |
Any one name, at one level. |
** |
Everything below, at any depth. Use it only as the last part. |
{player} |
One player’s own folder. Use it once at most. |
A wildcard is always a whole part: level-* isn’t allowed. Some examples:
| Pattern | Matches | Doesn’t match |
|---|---|---|
public/** |
public/manifest.json, public/textures/grass.png |
manifest.json |
saves/{player}/** |
saves/managed:283749102938475021/slot1.sav |
saves/slot1.sav, which has no player folder |
avatars/{player}/* |
avatars/managed:283749102938475021/avatar.png |
avatars/managed:283749102938475021/2026/avatar.png, because * matches one level only |
While you type a pattern, the rule editor shows paths it matches under Example paths.
Choose who can download
Section titled “Choose who can download”Under Who can download, check one or more of these:
- Every player: every signed-in player of your platform.
- The player whose folder it is: the player whose ID is in place of
{player}. The pattern needs{player}. - A group, under Members of these groups. See Give a group access.
A player can download a file when any one of them applies. If you check none, only your backend can download.
Players can also list files, but only inside a rule that lets them download.
Let players upload
Section titled “Let players upload”Turn on Players can upload and delete their own files. The pattern needs
{player}, because a player can only write in their own folder.
Then set the limits. In these fields, 1 MB is 1,000,000 bytes.
- Largest file: the size of one file, in MB. Up to 5,000 MB.
- Files per player: how many files each player can keep under this rule. Optional.
- Space per player: how much space each player can use under this rule, in MB. Optional.
- Allowed content types: a comma-separated list, such as
image/png, image/webp. The content type of each upload must be in the list. Optional. - Only players in these groups can upload: leave it empty to let every player upload. Optional.
Limits apply to players, not to your backend. A file your backend writes in a player’s folder still counts toward that player’s limits.
Before you save, check In one sentence. It says what the rule lets players do.
Start from a template
Section titled “Start from a template”New rule offers templates for common needs. Each one fills in the rule, and you can change it before you select Create rule.
| Template | Pattern | What players can do |
|---|---|---|
| Game content | public/** |
Every player downloads. Only your backend uploads. |
| Premium content | premium/** |
Players in a group, such as premium, download. Only your backend uploads. |
| Beta builds | beta/** |
Players in a group, such as beta-testers, download. Only your backend uploads. |
| Save games | saves/{player}/** |
Each player downloads and uploads their own files: 10 MB per file, 20 files and 50 MB in total. |
| Profile pictures | avatars/{player}/* |
Each player uploads one PNG, JPEG or WebP picture of up to 2 MB. Every player downloads them. |
| Crash reports | crash-reports/{player}/* |
Each player uploads up to 10 reports of up to 5 MB. Only your backend reads them. |
A template whose pattern a rule already uses shows In use.
Give a group access
Section titled “Give a group access”A group is a named set of players, such as the buyers of an extended edition or your beta testers. A platform can have 100 groups.
-
Create the group.
In Nexus, open your platform and go to Auth → Groups. Select New group, and enter a Name, such as
Beta testers. Nexus suggests a Slug, such asbeta-testers: lowercase letters, digits and dashes. Select Create group. -
Add players.
Select the group. In Player ID, enter a player’s ID, such as
managed:283749102938475021. To end the membership on a date, set Ends on. Select Add member.Without an end date, the membership lasts until you remove it. Adding the same player again replaces their end date.
-
Use the group in a rule.
In Asset Storage → Access rules, create or edit a rule. Under Who can download, check the group. To let only the group upload, check it under Only players in these groups can upload.
A change to a group’s members can take up to 30 seconds to reach Asset Storage. If you delete a group, the rules lose their access for it.
Test a rule
Section titled “Test a rule”The Rule tester, under the list of rules, shows what a player can do before your game ships.
-
Describe the player.
In Player ID, enter the ID of a player, real or made up. Under Groups the player belongs to, select their groups.
-
Choose a path and an action.
In Path, enter a path. Write
{player}for the player’s own folder, such assaves/{player}/slot1.sav. Choose Download, Upload or Delete. -
Run the test.
Select Test access. You should see Allowed or Denied, the rule that decided, and why.
Next steps
Section titled “Next steps”- Get started: upload and download your first files.
- API reference: what players get when a rule refuses them.