Unable to setup instance as readonly

Hi

I’m trying to setup an existing DHIS2 instance as readonly
From the documentation I found that adding system.read_only_mode = on to dhis.conf file would set the instance as readonly
But I’m still able to open tracker and add/modify data

Is there other way to setup an instance as readonly?

Best regards

1 Like

Hi @joao.machiana

If you’d like to enforce a Tracker program to be a ‘read only’ mode, you can change the Access configuration in the Maintenance app. Make sure all the groups only have the ‘view only’ option and not capture.

It’s quite interesting you are doing this, mind sharing more why you want to make it read only? :grin::pray:

As for the setting in dhis.conf, it’s a system configuration and doesn’t affect the Metadata directly. The documentation mentions:

Sets the system in read-only mode. This is useful when you run DHIS 2 on a read-only replica database, to avoid DHIS 2 performing database write operations. Can be on or off . Default is off . (source)

You can read more about creating a replica here: Read replica database configuration - PostgreSQL.

I hope this helps… looking forward to hearing more about your use case as well.

Thanks!

Thanks @Gassim
It worked. We created a new tracker program, but we wanted to give users access to the previous tracker program for temporary reporting purposes (which will be completely shutdown in a few months), and they should not be allowed to make modifications on the existing data unless on specific cases.

Best regards

1 Like

Thank you for the clarification. I’m happy the proposed solution worked, and thanks for marking the post as a solution. :heart: