This is a rust (still sqlite c library backed) take on anki sync server ,which keep track of the official sync server.
If you would like to use the sync server bundled with the Anki client or run the server via python,go to guide for more.
- 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 ) ,enter the decompressed folder. - Add user
For linux users or macOS users,run,
./ankisyncd user --add username password
for Windows users,open a terminal in the folder and run,
./ankisyncd.exe user --add username password
If you want to perform other operations ,such as deleting users or changing the password of one user,run with the --help
flag 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 the binary from source code Install or build a docker image from the source DockerBuild.
Due to the software update,Now Anki supports sync custom server settings inside the client.
- Go to
Tools ->Preferences--<Syncing
- see below and enter your server address in the blank labled
self-hosted sync server
. Here is an example.If your server address is192.0.0.1
,then the content to fill in ishttp://192.0.0.1:27701/
- Restart Anki
- Go to
Tools -> Add-ons
- click on the button labeled
Get Add-ons
and enter the code358444159
. - You get add-on
custom sync server redirector
, choose it. Then click on theconfig
button in the bottom right corner. - Apply your server IP address
- Restart Anki
Go to Advanced -> Custom sync server
(Go to Settings
-> Sync
-> Custom sync server
in 2.16 and newer versions)
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 2.16 and newer versions).
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 2.16 and newer versions,
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 newer versions,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 setting environment variables to add accounts,ANKISYNCD_USERNAME
,ANKISYNCD_PASSWORD
.
Key | Value |
---|---|
ANKISYNCD_USERNAME | username,non-empty if set |
ANKISYNCD_PASSWORD | password,non-empty if set |
If you want to change the location where sync data is stored, 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.We almost replicated the media synchronization implementation logic in anki-sync-server
.And 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.
SInce 2.1.57,this project keeps track of the process of Anki sync server.