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 LiteSync.
First follow the instructions to compile and install LiteSync or use the pre-compiled binaries for your platform.
Then follow the instructions in the lua.sqlite.org site.
If the Lua lsqlite3 module is already installed then just installing LiteSync may be sufficient if the original SQLite files are overwritten at the installation.
To open the database we use a URI like this:
db = sqlite3.open('file:test.db?node=secondary&connect=tcp://server:port')