# \#storage

**URL:** https://forum.heroiclabs.com/tag/storage/31.md

[Latest](https://forum.heroiclabs.com/latest.md) · [Categories](https://forum.heroiclabs.com/categories.md) · [Tags](https://forum.heroiclabs.com/tags.md)

---

## [Performance considerations for inventory and economy list calls](https://forum.heroiclabs.com/t/performance-considerations-for-inventory-and-economy-list-calls/6534)

<div class="topic-metadata">

**Author:** [@kroonhorstdino](https://forum.heroiclabs.com/u/kroonhorstdino)\
**Replies:** 1\
**Last updated:** [March 31, 2026, 10:43am UTC](https://forum.heroiclabs.com/t/performance-considerations-for-inventory-and-economy-list-calls/6534 "2026-03-31T10:43:16Z")

</div>

Fetching entries I am wondering what the performance considerations are when calling methods such as \`InventorySystem.ListItems()\` or \`EconomySystem.List()\`. Each player may have 100s of items in their inventory and eve…

---

## [Bucketed Leaderboards and Storage Locks](https://forum.heroiclabs.com/t/bucketed-leaderboards-and-storage-locks/6470)

<div class="topic-metadata">

**Author:** [@ErfanNikouie](https://forum.heroiclabs.com/u/ErfanNikouie)\
**Replies:** 1\
**Last updated:** [January 8, 2026, 5:07pm UTC](https://forum.heroiclabs.com/t/bucketed-leaderboards-and-storage-locks/6470 "2026-01-08T17:07:07Z")

</div>

Hello guys. I have encountered an issue with the storage system. What I am trying to achieve is consistent bucketed leaderboards. Players should be assigned a bucket when they first play a game. The bucket data for each…

---

## [Reading 1 value from the storage](https://forum.heroiclabs.com/t/reading-1-value-from-the-storage/5496)

<div class="topic-metadata">

**Author:** [@yuossf000](https://forum.heroiclabs.com/u/yuossf000)\
**Replies:** 4\
**Last updated:** [July 23, 2024, 8:19am UTC](https://forum.heroiclabs.com/t/reading-1-value-from-the-storage/5496 "2024-07-23T08:19:44Z")

</div>

Hi, sorry if the question answered before but I couldn’t find it. I started using Nakama with Godot4 2 days a go and when I was trying the storage part I found that the code down is how i can read the storage, but I Ca…

---

## [Should storage be treated as a complete database solution?](https://forum.heroiclabs.com/t/should-storage-be-treated-as-a-complete-database-solution/5431)

<div class="topic-metadata">

**Author:** [@alireza](https://forum.heroiclabs.com/u/alireza)\
**Replies:** 2\
**Last updated:** [July 10, 2024, 6:26pm UTC](https://forum.heroiclabs.com/t/should-storage-be-treated-as-a-complete-database-solution/5431 "2024-07-10T18:26:55Z")

</div>

I understand that storage is a table for storing player specific information and exists alongside other tables all being used in the nakama engine. https://forum.heroiclabs.com/t/storage-vs-database-the-difference/805 I…

---

## [Ingame Mail](https://forum.heroiclabs.com/t/ingame-mail/4268)

<div class="topic-metadata">

**Author:** [@Eatos](https://forum.heroiclabs.com/u/Eatos)\
**Replies:** 10\
**Last updated:** [April 16, 2024, 1:20pm UTC](https://forum.heroiclabs.com/t/ingame-mail/4268 "2024-04-16T13:20:15Z")

</div>

Hello everyone :slight\_smile: Recently we have been thinking to implement in our game an in-game mailbox which currently a lot of games on the market have it as a feature. The ingame mail can server the purpose of: S…

---

## [Advice for data structure in Storage Engine with misc. filters](https://forum.heroiclabs.com/t/advice-for-data-structure-in-storage-engine-with-misc-filters/5160)

<div class="topic-metadata">

**Author:** [@Theo-Rapidfire](https://forum.heroiclabs.com/u/Theo-Rapidfire)\
**Replies:** 2\
**Last updated:** [April 11, 2024, 1:33pm UTC](https://forum.heroiclabs.com/t/advice-for-data-structure-in-storage-engine-with-misc-filters/5160 "2024-04-11T13:33:44Z")

</div>

Hi, I’d like some advice for how to structure my Storage Engine setup; I’m working on a fairly simple project that uses async battles against other (mostly) random opponents. It’s made up of just 2 RPC functions; one t…

---

## [Trouble Retrieving Lua Server Stored Data on Godot Client](https://forum.heroiclabs.com/t/trouble-retrieving-lua-server-stored-data-on-godot-client/4958)

<div class="topic-metadata">

**Author:** [@districtjackson](https://forum.heroiclabs.com/u/districtjackson)\
**Replies:** 9\
**Last updated:** [February 13, 2024, 1:12pm UTC](https://forum.heroiclabs.com/t/trouble-retrieving-lua-server-stored-data-on-godot-client/4958 "2024-02-13T13:12:25Z")

</div>

Hi there! I’m currently trying to build a system that generates shareable match\_ids (match codes, as I’m calling them) that allow players to join games using the code for my Lua/Godot game. I’m doing it in a manner sugg…

---

## [Server-created storage object with 'Owner Read' permission cannot be read from client](https://forum.heroiclabs.com/t/server-created-storage-object-with-owner-read-permission-cannot-be-read-from-client/4903)

<div class="topic-metadata">

**Author:** [@Theo-Rapidfire](https://forum.heroiclabs.com/u/Theo-Rapidfire)\
**Replies:** 1\
**Last updated:** [January 22, 2024, 3:26pm UTC](https://forum.heroiclabs.com/t/server-created-storage-object-with-owner-read-permission-cannot-be-read-from-client/4903 "2024-01-22T15:26:29Z")

</div>

I’ve created a system where I can transfer items between players, and I’m experiencing an issue with reading the items back from the storage engine. The storage items are created authoritatively using the typescript fram…

---

## [Lua storage write error](https://forum.heroiclabs.com/t/lua-storage-write-error/4817)

<div class="topic-metadata">

**Author:** [@M.Alatal](https://forum.heroiclabs.com/u/M.Alatal)\
**Replies:** 0\
**Last updated:** [December 30, 2023, 4:15pm UTC](https://forum.heroiclabs.com/t/lua-storage-write-error/4817 "2023-12-30T16:15:30Z")

</div>

I am trying to use nk.storage\_write(x) in lua rpc code When i define the table (x) that i want to use with nk.storage\_write like this: local x = { { collection = “save”, key = “save1”, user\_id = user\_id, value = {} } …

---

## [How to create index about json object?](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689)

<div class="topic-metadata">

**Author:** [@hexun80149128](https://forum.heroiclabs.com/u/hexun80149128)\
**Replies:** 27\
**Last updated:** [December 15, 2023, 10:13am UTC](https://forum.heroiclabs.com/t/how-to-create-index-about-json-object/4689 "2023-12-15T10:13:54Z")

</div>

I want to implement an auction house function, where players can list equipment with different attributes. Players can filter and search based on the attributes of the equipment. Can I index the attributes of each equipm…

---

## [Could not read storage objects.	{"error": "cannot convert \[testcollection\] to Text"}](https://forum.heroiclabs.com/t/could-not-read-storage-objects-error-cannot-convert-testcollection-to-text/4489)

<div class="topic-metadata">

**Author:** [@jiangben](https://forum.heroiclabs.com/u/jiangben)\
**Replies:** 3\
**Last updated:** [October 20, 2023, 10:16am UTC](https://forum.heroiclabs.com/t/could-not-read-storage-objects-error-cannot-convert-testcollection-to-text/4489 "2023-10-20T10:16:42Z")

</div>

when import json as storage。 json file like this： \[{ "collection": "items", "key": "item\_1", "value": { "name": "Sword", "damage": 10 }, "permission\_read": 2, "permission\_write": 1, "user\_id": "00000000-0000-…

---

## [Unable to read after storage\_write in Lua](https://forum.heroiclabs.com/t/unable-to-read-after-storage-write-in-lua/4484)

<div class="topic-metadata">

**Author:** [@anteaters](https://forum.heroiclabs.com/u/anteaters)\
**Replies:** 4\
**Last updated:** [October 19, 2023, 1:32pm UTC](https://forum.heroiclabs.com/t/unable-to-read-after-storage-write-in-lua/4484 "2023-10-19T13:32:55Z")

</div>

Hello, using the example code to use storage\_write I get a successful write message in the log. but opening the created entry in the web view results in “An error occured while reading storage object.”. I’m using Nakama…

---

## [Storage Transactions/Locks](https://forum.heroiclabs.com/t/storage-transactions-locks/4398)

<div class="topic-metadata">

**Author:** [@BernardoSantos](https://forum.heroiclabs.com/u/BernardoSantos)\
**Replies:** 2\
**Last updated:** [September 27, 2023, 10:09am UTC](https://forum.heroiclabs.com/t/storage-transactions-locks/4398 "2023-09-27T10:09:16Z")

</div>

Hey! Is there any type of implementation for transactions or locks on the storage? My problem currently is, I want to read from storage to check if a bot is currently playing any match (we have user bots), if it isnt c…

---

## [Registering after hook for WriteStorageObjects](https://forum.heroiclabs.com/t/registering-after-hook-for-writestorageobjects/4147)

<div class="topic-metadata">

**Author:** [@totebo](https://forum.heroiclabs.com/u/totebo)\
**Replies:** 2\
**Last updated:** [July 28, 2023, 4:29pm UTC](https://forum.heroiclabs.com/t/registering-after-hook-for-writestorageobjects/4147 "2023-07-28T16:29:16Z")

</div>

Using a Lua module, the after hook for AuthenticateCustom fires. Fresh data is being saved to a user storage object, but for some reason the after hook for WriteStorageObjects doesn’t fire. Any idea why this might be? I…

---

## [Storage for progression](https://forum.heroiclabs.com/t/storage-for-progression/4127)

<div class="topic-metadata">

**Author:** [@totebo](https://forum.heroiclabs.com/u/totebo)\
**Replies:** 1\
**Last updated:** [July 26, 2023, 11:57am UTC](https://forum.heroiclabs.com/t/storage-for-progression/4127 "2023-07-26T11:57:14Z")

</div>

I’ve started writing logic for user storage and I’m wondering if there is a reason to use user metadata over Storage objects? I read in a post that storing Elo rating in metadata would be a good idea. As far as I under…

---

## [Can clients create collections and objects at will? How to prevent spam?](https://forum.heroiclabs.com/t/can-clients-create-collections-and-objects-at-will-how-to-prevent-spam/3974)

<div class="topic-metadata">

**Author:** [@elementalcode](https://forum.heroiclabs.com/u/elementalcode)\
**Replies:** 1\
**Last updated:** [June 22, 2023, 5:16pm UTC](https://forum.heroiclabs.com/t/can-clients-create-collections-and-objects-at-will-how-to-prevent-spam/3974 "2023-06-22T17:16:38Z")

</div>

I am reading the documentation and trying to grasp the concepts and I just read through the storage/collections part and it seems user can write objects to collections and create them in the process? If not, how do you …

---

## [How to make a custom SQL query on a collection in storage?](https://forum.heroiclabs.com/t/how-to-make-a-custom-sql-query-on-a-collection-in-storage/3822)

<div class="topic-metadata">

**Author:** [@Spuddy](https://forum.heroiclabs.com/u/Spuddy)\
**Replies:** 1\
**Last updated:** [May 4, 2023, 12:37pm UTC](https://forum.heroiclabs.com/t/how-to-make-a-custom-sql-query-on-a-collection-in-storage/3822 "2023-05-04T12:37:50Z")

</div>

I’m writing a server authoritative two player turn based game using the GoLang runtime. Two players are matched and the state of their game is stored in a public (owned by the system) “MultiplayerGames” storage Collectio…

---

## [How to Index Storage JSON for Custom SQL Query?](https://forum.heroiclabs.com/t/how-to-index-storage-json-for-custom-sql-query/3839)

<div class="topic-metadata">

**Author:** [@Spuddy](https://forum.heroiclabs.com/u/Spuddy)\
**Replies:** 1\
**Last updated:** [May 3, 2023, 2:52pm UTC](https://forum.heroiclabs.com/t/how-to-index-storage-json-for-custom-sql-query/3839 "2023-05-03T14:52:26Z")

</div>

I have a 2 player server authoritative game and I’m storing all the game states in a “MultiplayerGames” collection as JSON in the Storage value field. The JSON for each game state looks something like this … { "comple…

---

## [Error querying storage collections](https://forum.heroiclabs.com/t/error-querying-storage-collections/3775)

<div class="topic-metadata">

**Author:** [@voxel456](https://forum.heroiclabs.com/u/voxel456)\
**Replies:** 2\
**Last updated:** [April 12, 2023, 4:57pm UTC](https://forum.heroiclabs.com/t/error-querying-storage-collections/3775 "2023-04-12T16:57:31Z")

</div>

{Details} Versions: Nakama {3.5}, {Linux} Server Framework Runtime language (If relevant) {Go} Hello All, I succesfully upgraded nakama from 3.9.0 to 3.15.0, And after complete upgradae & database migrate, having the…

---

## [Server side storage locks?](https://forum.heroiclabs.com/t/server-side-storage-locks/3760)

<div class="topic-metadata">

**Author:** [@Spuddy](https://forum.heroiclabs.com/u/Spuddy)\
**Replies:** 5\
**Last updated:** [April 10, 2023, 1:31pm UTC](https://forum.heroiclabs.com/t/server-side-storage-locks/3760 "2023-04-10T13:31:05Z")

</div>

I’m trying to port my server authoritative 2 player turn based game from GameSparks to Nakama and I’m intending to store the game states in Nakama Storage using GoLang. It’s more of a round based game rather than turn ba…

---

## [What is the best way to export all data collections to another server instance?](https://forum.heroiclabs.com/t/what-is-the-best-way-to-export-all-data-collections-to-another-server-instance/3224)

<div class="topic-metadata">

**Author:** [@MrFlox](https://forum.heroiclabs.com/u/MrFlox)\
**Replies:** 1\
**Last updated:** [November 10, 2022, 1:21pm UTC](https://forum.heroiclabs.com/t/what-is-the-best-way-to-export-all-data-collections-to-another-server-instance/3224 "2022-11-10T13:21:24Z")

</div>

We have local nakama server for experiments and production nakama server on hosting. We want to synchronize all data from local nakama storage to external. We found abilty to import storage data through json, but didn’t …

---

## [Creating items for economy](https://forum.heroiclabs.com/t/creating-items-for-economy/3209)

<div class="topic-metadata">

**Author:** [@tetsubo](https://forum.heroiclabs.com/u/tetsubo)\
**Replies:** 1\
**Last updated:** [October 31, 2022, 1:31pm UTC](https://forum.heroiclabs.com/t/creating-items-for-economy/3209 "2022-10-31T13:31:01Z")

</div>

So I am starting to make a checklist for Nakama if it fullfills all the basic requirements for a backend solution for my game. I am a Unity developer, so C# the language I understand, professionally Java is my native ch…

---

## [Time complexity of Storage operation in Nakama](https://forum.heroiclabs.com/t/time-complexity-of-storage-operation-in-nakama/3100)

<div class="topic-metadata">

**Author:** [@thealphadollar](https://forum.heroiclabs.com/u/thealphadollar)\
**Replies:** 0\
**Last updated:** [September 29, 2022, 6:20pm UTC](https://forum.heroiclabs.com/t/time-complexity-of-storage-operation-in-nakama/3100 "2022-09-29T18:20:09Z")

</div>

What is the expected complexity of Delete, Read & List operations for storage? Nakama provides the above-listed four APIs for the Storage object. As it uses CockroachDB on the database handling side, I’m not sure if th…

---

## [Server storage retrieval logic](https://forum.heroiclabs.com/t/server-storage-retrieval-logic/2669)

<div class="topic-metadata">

**Author:** [@luiscesjr](https://forum.heroiclabs.com/u/luiscesjr)\
**Replies:** 3\
**Last updated:** [June 1, 2022, 12:33pm UTC](https://forum.heroiclabs.com/t/server-storage-retrieval-logic/2669 "2022-06-01T12:33:04Z")

</div>

Hi all, I’d like your thoughts on how should I design this next part of my game, if: 1- Am I on the right path and what are the Nakama functions to it? 2- Or am I totally wrong and what should I be pursuing then? The…

---

## [What to do about "timeout: context canceled" in critical after-hook](https://forum.heroiclabs.com/t/what-to-do-about-timeout-context-canceled-in-critical-after-hook/2560)

<div class="topic-metadata">

**Author:** [@brianflakes](https://forum.heroiclabs.com/u/brianflakes)\
**Replies:** 1\
**Last updated:** [April 30, 2022, 7:18am UTC](https://forum.heroiclabs.com/t/what-to-do-about-timeout-context-canceled-in-critical-after-hook/2560 "2022-04-30T07:18:20Z")

</div>

We’ve found an error in production where critical code that sets up a user’s default metadata/wallet in the After hook for AuthenticateEmail/Apple/Custom produces the error “timeout: context canceled”. I’ve read other p…

---

## [Storage write rejected - version check failed](https://forum.heroiclabs.com/t/storage-write-rejected-version-check-failed/2496)

<div class="topic-metadata">

**Author:** [@lightning](https://forum.heroiclabs.com/u/lightning)\
**Replies:** 4\
**Last updated:** [April 16, 2022, 6:53am UTC](https://forum.heroiclabs.com/t/storage-write-rejected-version-check-failed/2496 "2022-04-16T06:53:36Z")

</div>

Hi there, I am trying to set up data on the Nakama runtime start up by following this tutorial, but I am getting the error Storage write rejected - version check failed when calling nk.storageWrite(\<writeObjects\>) M…

---

## [How to protect Storage Engine Permissions / How to store critical read only client data](https://forum.heroiclabs.com/t/how-to-protect-storage-engine-permissions-how-to-store-critical-read-only-client-data/2469)

<div class="topic-metadata">

**Author:** [@kiniber](https://forum.heroiclabs.com/u/kiniber)\
**Replies:** 3\
**Last updated:** [March 28, 2022, 10:21am UTC](https://forum.heroiclabs.com/t/how-to-protect-storage-engine-permissions-how-to-store-critical-read-only-client-data/2469 "2022-03-28T10:21:19Z")

</div>

I am trying to understand the permission system better and am unsure how to store critical user data in a way that the client can not maliciously modify the data. Example: I want to have a storage object that stores use…

---

## [How client subscribe update in storage engine?](https://forum.heroiclabs.com/t/how-client-subscribe-update-in-storage-engine/2441)

<div class="topic-metadata">

**Author:** [@jason88](https://forum.heroiclabs.com/u/jason88)\
**Replies:** 1\
**Last updated:** [March 9, 2022, 11:01am UTC](https://forum.heroiclabs.com/t/how-client-subscribe-update-in-storage-engine/2441 "2022-03-09T11:01:01Z")

</div>

I try am bulding an inventory system using the storage engine. {I follow this tutorial} Can the client subscribe updates from the server storage engine (no need poll the serv? E.g. Player B send a gift item to Player A…

---

## [Storage\_write(obj) vs pcall(storage\_write, {obj}](https://forum.heroiclabs.com/t/storage-write-obj-vs-pcall-storage-write-obj/2397)

<div class="topic-metadata">

**Author:** [@Omee](https://forum.heroiclabs.com/u/Omee)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 11:54pm UTC](https://forum.heroiclabs.com/t/storage-write-obj-vs-pcall-storage-write-obj/2397 "2022-02-23T23:54:18Z")

</div>

Hi, I’m new to Nakama, and I’m really impressed with it so far. I’m having a problem with a server side RPC written in Lua. I try to write some data to the object storage, it works fine if I use a pcall(nk.storage\_wri…

---

## [Where is session data stored?](https://forum.heroiclabs.com/t/where-is-session-data-stored/2186)

<div class="topic-metadata">

**Author:** [@TheWolfNL](https://forum.heroiclabs.com/u/TheWolfNL)\
**Replies:** 6\
**Last updated:** [February 6, 2022, 2:22pm UTC](https://forum.heroiclabs.com/t/where-is-session-data-stored/2186 "2022-02-06T14:22:00Z")

</div>

Whenever I update my nakama server, for example with new RPC functions etc. I get invalid auth token errors as my client is still using the stored token instead. I’d like to make the server a bit more resilient to this …

[Next page](https://forum.heroiclabs.com/tag/storage/31.md?match_all_tags=true&page=1&tags%5B%5D=storage)
