LuaSQLite3 contains a module that interfaces with the installed SQLite3 database engine.

As it interfaces with the installed library, we just need to use the modified native SQLite engine containing litereplica.


First follow the instructions to compile and install litereplica or use the pre-compiled binaries for your platform.

Then follow the instructions in the site.

If the Lua lsqlite3 module is already installed then just installing litereplica may be sufficient if the original SQLite files are overwritten at the installation.


To open the database we use a URI like this:

db ='file:test.db?replica=master&slave=tcp://server:port')