Discourse slave instance with offline access

We have cloud hosted discourse instance for the Australian Ruby community (I’ll refer to it as Master). Twice a year we host RailsCamp events. That’s when we spend a full weekend together at a remote location (50-150 people per event). Often there is little to no cell reception, which makes it challenging to coordinate.

I was thinking that discourse instance hosted on the local network at the event would be ideal (I’ll refer to it as Slave). We could use it to post announcements, schedule, share photos etc.

Since we already have growing community on Master, it would be great to leverage that. E.g. your profile is already setup when you get to the event, and you have a copy of all of the content.

How to have the Slave discourse instance running along the Master when the Slave is offline for three days.

Proposed solution
I understand discourse is not designed for that. But I think there is a way to fit to our needs. I’m interested in your ideas on this

The plan

  • We setup a Slave discourse instance on the local network at the event
  • Right before the event we backup the Master and restore it on Slave
  • On Slave:
    • all categories will be marked as read-only
    • we create a new read/write category for the event
  • After the event we use a ruby script to transfer information from Slave to Master
    • Newly created users
    • All topics and posts from the created category for the event
  • Profit


  • Do you see any issues with the proposed solution?
  • Can you see a better approach?

Would be great to allow write access to all categories on Slave, but I feel the synchronisation process could be very complicated. Also that could be confusing as some people could still access Master if they have reception.


Hello from a fellow Australian Rubyist… :wave:

This all sounds fine to me. To sync stuff up after the event I would recommend writing a small script that zooms through your read write categories and then makes API requests using our JSON API to create the topics / posts on the master.

I definitely recommend strongly against having any kind of merge topic scenario, it will be full of dragons and not worth the effort.



Did you try anything for the same ?
I am into a similar thing where I need to take discourse offline with sync.
I have a master server and I will be having more than 100-200 slave instance. Slave instance can be online/offline but will be used by users. But whenever an offline instance comes online it should be able to sync with master server without creating conflicts and all update all the latest data. I do not want to create any code related changes as discourse keeps updating itself quite often and don’t want to break instance due to code changes.

I am thinking of tweaking postgresql to some extent. Other files related data can be synced using syncthing. But updating postgresql data is something which worries me because if i directly sync master data then the work done by offline user will get erased after the sync. How was your experience writing scripts for the same ?

1 Like

We didn’t do it yet as we had internet access at all event locations.