There are different ways to do this.
-) You could store values in a database (see test/page.lua)
-) You could use websockets sharing a common state (see test/websocket.lua)
-) If you have some const data to share between states, you could use a preload file (see docs/UserManual.md)
-) Indeed, you could do it manually and "store it in some kind of file", but depending on the use case, there are easier / better options
-) You could use a library to share the data
What data do you want to store?
Data type?
Read/write?