KOsync is a progress sync server for KOReader written in Go.
The official KOReader progress sync server is written in Lua using OpenResty.
For deployment it needs Nginx with OpenResty as well as Redis as database.
KOsync wants to be simpler by not having any dependencies besides the OS itself.
(If you need TLS, a reverse proxy is also required, I recommend Caddy)
In addition to requiring Nginx, OpenResty and Redis, the official server is not very maintained.
The last feature adding commits was around 2016.
KOsync vs KOReader Sync Server
You may choose KOsync over KORSS due to the following differences:
- Actively maintained and open for feature requests
- Simple Web Interface (Prototype)
- Written in Go and deploys as a single executable
- Simple SQLite database and ENV configuration instead of Redis
Additional differences that should be known:
- KOsync is licensed under
EUPL-1.2 or latercompared to KORSS, which isAGPL-3.0 or later - Simple deployment via Docker
- Requires a Reverse Proxy for TLS
Simple Code
KOsync is written in Go with no external dependencies.
All you need to run KOsync is bundled into a single executable.
See docs/build.md for build and deployment instructions.
Simple Datastore
KOsync stores all user data in an SQLite database while configuration is stored in an environment file.
Users can, after entering the custom URL, use the KOReader registration to signup.
After that, they push and pull progress states.
Documents are uploaded by KOReader during progress push.
The push must be triggered by hand or configured to be done automatically when switching pages.
Consult the KOReader documentation for the configuration options.
See docs/config.md
See docs/database.md
Backup and Restore can be done manually or with automation tools made for SQLite.
Stop KOsync and copy the database file to create a backup or replace the database to restore.
In the future KOsync will provide a backup and restore mechanism.
KOsync uses modernc sqlite which supports backup and restore natively.
(Code Example of the API for later reference)
type SQLiteBackuper interface {
NewBackup(string) (*sqlite.Backup, error)
NewRestore(string) (*sqlite.Backup, error)
}
c, _ := db.Conn(context.Background())
c.Raw(func(driverConn any) error {
bak, err := driverConn.(SQLiteBackuper).NewBackup("pathToBackupTo.db")
bakCon, err := bak.Commit()
err = bak.Finish()
})See docs/api.md
See webui/README.md
KOsync is licensed under the European Union Public License v1.2 or later