How to store cloud data local to one internet modem

how do i store data local to one modem?

What do you mean?

I want to store data that only people connected to the same internet could get and set cloud data.

Do you mean people connected to the same Local Area Network (LAN)? e.g. people in same house or people in the same school?

yes.

Assuming you've got a repl cloud server running that you can store data to, then you could run your own copy of that on your own server (say on a little Raspberry Pi) in your house

It would then only be accessible from computers in the same house

Sorry, I'm a teacher; I can't help teaching:

The device you're thinking of isn't a modem (stands for modulator/demodulator, converts between digital signals and audio signals that can be sent over the dialup telephone network), but rather a router, which is all-digital. Unless you're my age, you've probably never seen a modem, except maybe in old movies.

And as cymplecy suggests, there's only one (worldwide) Internet, and it's worth taking a moment just to appreciate how amazing that is, considering all the enmity between countries, the rivalries between businesses, and so on.

Lots of people have modems.

Really? They have dialup connections to the net? Who's the ISP?

I do not know but I have heard of lots of people who have them. Plus there are probably millions of modems (I would say accurately) because of the whole world, there not that outdated.

Ah, yes, you're right, I was thinking of the US. Sorry!

It depends on your connection settings. Quite typical is NAT configuration. Every computer in LAN is sharing single external IP. So your cloud server can limit services to a given "remote peer address".
You can check external IP (look at search engine "check my ip")
E.g.
https://www.myip.com/

Also, as cymplecy said, you can host own cloud server on LAN.

I seem to remember, that last year, I (and others) tried to get a repl server to determine the ip address of the connecting machine but we were unsuccessful

Yes, it seems that Google load balancers eats client IP...

I asked the team about it and they said that not all people store IPs correctly, which leads to privacy issues

glitch.com has proper values for

request.headers['x-forwarded-for']

E.g.

const path = require("path");
const fastify = require("fastify")({logger: false});

fastify.get("/", function(request, reply) {
  reply.send( request.headers['x-forwarded-for']);
});

fastify.listen(process.env.PORT, function(err, address) {});

https://remoteip.glitch.me/

censored
ok

Referer
(did you just give away your Ip address?)

('Referer', 'https://replit.com/')
That didn't work (I was requesting on new tab not an iframe)