This is a rust (still sqlite c library backed) take on anki sync server (for a mature python one see ankicommunity/anki-sync-server).
- Grab binary from github releases and unpack it, each platform has its corresponding tag (e.g.
windows_x86_64
for Windows 64bit,details see support platform ) . - Add user For linux users or macOS users,run,
./ankisyncd user --add username password
for Windows users,open a terminal in the same folder where the binary is in and run,
./ankisyncd.exe user --add username password
If you want to perform other operations ,such as deleting users or changing password of one user,run with help argument for more details,
./ankisyncd user --help
- Run server
./ankisyncd
(for Windows users,you can just double click the binary for a quick start). - Enjoy!
details see Docker
You can also build from source code Install or build docker image from source DockerBuild.
- Go to
Tools -> Add-ons
- On the add-on window, click on
Get Add-ons
and fill in the textbox with the code358444159
- You get add-on
custom sync server redirector
, choose it. Then clickconfig
on the bottom right - Apply your server IP address
- Restart Anki
Go to Advanced -> Custom sync server
(Go to Settings
-> Sync
-> Custom sync server
in 2.16 and above)
Unless you have set up a reverse proxy to handle encrypted connections, use http
as the protocol. The port will be either the default 27701
, or whatever you have specified in ankisyncd.toml
(if using a reverse proxy, whatever port you configured to accept the front-end connection).
Use the same base url for both the Sync url
and the Media sync url
, but append /msync
to the Media sync url
. Do not append /sync
to the Sync url
(Note: This is not the case any more in above version 2.16,include 2.16).
Take IP address 192.0.0.0
for example and use default port 27701
with http
protocol,the corresponsding urls are,
Sync url:http://192.0.0.0:27701
Media sync url: http://192.0.0.0:27701/msync
In above version 2.16,
Sync url:http://192.0.0.0:27701/sync/
Media sync url: http://192.0.0.0:27701/msync/
Even though the AnkiDroid login interface will request an email address, this is not actually required; it can simply be the username you configured with ankisyncd user -a
.
For https setup and support see certificate setup (Note: in 2.16 and above,Ankidroid could supprt http connection once more). See reverse proxy setup for setting up a reverse proxy in front of the sync server.
See CONTRIBUTING.md.
All contributions must be licensed under AGLP-v3.0 to comply with the license of the anki code used as the base of this project.
See LICENSE
When the server made its first appearance,we have done some tests,details see TEST
Ankidyncd supports two Env variables to add users,ANKISYNCD_USERNAME
,ANKISYNCD_PASSWORD
.
Key | Value |
---|---|
ANKISYNCD_USERNAME | username,non-empty |
ANKISYNCD_PASSWORD | password,non-empty |
If you want to change the folder where sync data reside or change the listening port,you can modify the configuration file ankisyncd.toml
,and then run server,
./ankisyncd --config /path/to/ankisyncd.toml
ankisyncd architecture or apis depend on ankicommunity/anki-sync-server and
ankitects/anki.
Sync APIs are initially based on anki/rslib 2.1.46.Note: This project is heavily dependent on upstream project Anki
,that is,if the project Anki is no longer accessible,this project might be malfunctional and abandoned.