Back

Running Appwrite + several clients in a completely local network

  • 0
  • Web
  • Databases
  • React Native
  • Realtime
  • Self Hosted
LeanderM
6 Nov, 2024, 15:31

Hi all 👋

My next project is a bit of a special one. Before I start diving into development, I need to make sure that I will be able to achieve this with Appwrite.

I'm building a portable "game" set-up consisting of several pieces of hardware. Portable, as in, I'll be driving it around to various locations so I can use it on the spot. Some locations might not be able to provide internet access. Using Appwrite in the cloud is not an option. It must be locally hosted and accept connections from client devices on the same local network. This really is a strict requirement, which also eliminates the risk of 4G/5G or the remote instance of AppWrite being down for any reason.

I simply need realtime functionality and file storage on the spot. That is why I decided to try Appwrite!

This is the set-up:

1. Wi-Fi Router

  • Connected with devices listed next;

2. Server - MacBook Pro (M1 Pro 32gb)

  • Runs AppWrite in Docker
  • Runs a NodeJS server (which has some endpoints that control other media devices in the network)
  • Runs a React app (uses the Appwrite SDK) that serves as a frontend for the event host (me)

3. Clients - Multiple tablets (up to 10)

  • Run a React Native app (built with Appwrite React Native SDK)

4. Some other media devices that have exposed API's

The tablets should be able to connect to AppWrite using the Realtime functionality. About 10 simultaneously.

It seems quite simple. Instead of connecting to a cloud instance of AppWrite, my clients would just connect to a local instance of Appwrite on the same network, like https://<mac ip>/v1 But i'm worried about port settings, SSL certificates, etc. Networking really is my weak spot. Also, the docs state using "client.setSelfSigned()" which seems to be removed from the Client SDK causing errors.

Could anyone advise me about any pitfalls when using Appwrite locally in docker or provide me with other tips? Getting all devices connected and communicating is what i'm worried about.

Thanks!

TL;DR
Developers building a portable game set-up want to run AppWrite locally on a network without internet. They have a MacBook Pro running AppWrite in Docker and want tablets (up to 10) to connect for Realtime functionality. Worried about port settings, SSL certificates, and errors in the Client SDK. Solution: Consider setting up port forwarding on the router, generating self-signed SSL certificates, and adapting code for changes in the Client SDK regarding "client.setSelfSigned()". Test the connection thoroughly before your event to ensure all devices communicate properly.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more