Package Details: anki-sync-server-git r425.ef41934-1

Git Clone URL: (read-only, click to copy)
Package Base: anki-sync-server-git
Description: A sync server for anki using a forked version from (orig:dsnopek)
Upstream URL:
Keywords: anki
Licenses: GPL
Conflicts: anki-sync-server
Provides: anki-sync-server
Submitter: None
Maintainer: s7hoang
Last Packager: s7hoang
Votes: 0
Popularity: 0.000000
First Submitted: 2016-03-13 20:03 (UTC)
Last Updated: 2022-02-05 01:33 (UTC)

Latest Comments

cable commented on 2022-06-29 00:35 (UTC)

I appreciate the work, but I can't get this to work at all. The manual says that running "sudo -u anki-sync-server ./ adduser <username>" inside "/opt/anki-sync-server" should create a username and allow to set a password, but "" isn't in that directory. After copying it from the "_cli" directory to the main directory, running it still doesn't work because the python libraries need to be found. After making the python path accessible, and creating a username and password, and copying the file to the appropriate location, anki still complains of an incorrect username/password pair. Don't know how to get this working.

Any advice would be appreciated.

s7hoang commented on 2022-02-05 01:35 (UTC)

added, thanks!

clarfonthey commented on 2022-01-30 23:15 (UTC) (edited on 2022-02-03 04:32 (UTC) by clarfonthey)

Even though the files are included in the git repo, you should still include them in the source array since tools like mkchrootpkg will only copy over the listed sources and not every file.

At least for me, I need to patch those in for it to work.

Here's the full patch I made in case anyone wants it / the maintainer wants to incorporate it:

diff --git a/PKGBUILD b/PKGBUILD
index 2ede655..a0101e6 100644
@@ -13,35 +13,52 @@ depends=('python' 'python-pip' 'nginx')
 makedepends=('git' 'portaudio')
+        ''
+        ''
+        ''
+        'anki-sync-server.groff'
+        'anki-sync-server.install'
+        'anki-sync-server.service'
+        'nginx_append_config.awk'
+        'nginx_http'
+        'nginx_https')
+            '5f6c65418841bd638065b7c874a267898f8abb1c5c56dfd47c5908a4f9a83465'
+            'df3efb08711b0ef9be3a2e264cd54bd8d50d77576f538f499dcbfce1c4b4d9df'
+            'cc2ec96b2ec18d8b161f0c8233c1ddff58cddb59bfd05e1c5910eb7ef0ce9c93'
+            '48ed322539cff276909d8eb6d81c17c776e1f2ec6353ce6aef1b8a559271b0ad'
+            '09704f72e1d8a804d0a2de6443adbbec98431564538c95c28fed713ce219ecfb'
+            'eb6b4f2682290e341a377bee12246c076816789d8f716fdd26c7367a47408e91'
+            'e8b0bc5a03fd39423c64fc804199b258d53f2ad5327954d74d3a3be0dfe7924a'
+            '9a48034fabdf487502663149d7cfd4a59bdf0e116e681c790e0c39b23267d7cb'
+            '7638620d532a55e3423cee9ee7905941ef81fae1b024bf7960bee1b9dcd65efe')
 backup=(etc/nginx/sites-available/{anki-sync-server-http,anki-sync-server-https} usr/lib/systemd/system/anki-sync-server.service)

-_repo_dir_="$(basename ${source} | cut -f 1 -d '.')"

 pkgver() {
-  cd "${_repo_dir_}"
+  cd "${srcdir}/anki-sync-server"
   printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

 prepare() {
   # move plugins and systemd file to src package
-  local _plugins_="${_anki_dir_}/plugins/"
+  local _anki_dir_="${srcdir}/anki-sync-server/src"
+  local _plugins_="${_anki_dir_}/plugins"
   mkdir -p "${_plugins_}"
   mkdir -p "${_plugins_}/anki2.0/"
   mkdir -p "${_plugins_}/anki2.1/anki-sync-server"
   mkdir -p "${_plugins_}/anki2.1.28/anki-sync-server"
   mkdir -p "${_plugins_}/nginx/"
   mkdir -p "${_plugins_}/systemd/"
-  cp "../" "${_plugins_}/anki2.0/"
-  cp "../" "${_plugins_}/anki2.1/anki-sync-server/"
-  cp "../" "${_plugins_}/anki2.1.28//anki-sync-server/"
-  cp "../anki-sync-server.service" "${_plugins_}/systemd/"
-  cp "../nginx_http" "${_plugins_}/nginx/anki-sync-server-http"
-  cp "../nginx_https" "${_plugins_}/nginx/anki-sync-server-https"
-  cp "../nginx_append_config.awk" "${_plugins_}/nginx/append.awk"
+  cp "${srcdir}/" "${_plugins_}/anki2.0/"
+  cp "${srcdir}/" "${_plugins_}/anki2.1/anki-sync-server/"
+  cp "${srcdir}/" "${_plugins_}/anki2.1.28//anki-sync-server/"
+  cp "${srcdir}/anki-sync-server.service" "${_plugins_}/systemd/"
+  cp "${srcdir}/nginx_http" "${_plugins_}/nginx/anki-sync-server-http"
+  cp "${srcdir}/nginx_https" "${_plugins_}/nginx/anki-sync-server-https"
+  cp "${srcdir}/nginx_append_config.awk" "${_plugins_}/nginx/append.awk"

   # set plugins to use current ip address as plugins' target address
   cd "${_anki_dir_}"
@@ -68,22 +85,24 @@ prepare() {

 package() {
+  local _anki_dir_="${srcdir}/anki-sync-server/src"
   # anki-sync-server package
   mkdir -p "${pkgdir}${_install_dir_}"
-  cp -R "${srcdir}/${_anki_dir_}/." "${pkgdir}${_install_dir_}"
+  cp -R "${_anki_dir_}/." "${pkgdir}${_install_dir_}"

   # manpage
   mkdir -p "${pkgdir}/usr/share/man/man1"
-  cp "${srcdir}/${_anki_dir_}/plugins/man/man1/anki-sync-server.1.gz" \
+  cp "${_anki_dir_}/plugins/man/man1/anki-sync-server.1.gz" \

   # nginx
   mkdir -p "${pkgdir}/etc/nginx/sites-available"
   mkdir -p "${pkgdir}/etc/nginx/sites-enabled"
-  cp "${srcdir}/${_anki_dir_}/plugins/nginx/anki-sync-server-http" "${pkgdir}/etc/nginx/sites-available"
-  cp "${srcdir}/${_anki_dir_}/plugins/nginx/anki-sync-server-https" "${pkgdir}/etc/nginx/sites-available"
+  cp "${_anki_dir_}/plugins/nginx/anki-sync-server-http" "${pkgdir}/etc/nginx/sites-available"
+  cp "${_anki_dir_}/plugins/nginx/anki-sync-server-https" "${pkgdir}/etc/nginx/sites-available"

   # systemd service
   mkdir -p "${pkgdir}/usr/lib/systemd/system/"
-  cp "${srcdir}/${_anki_dir_}/plugins/systemd/anki-sync-server.service" "${pkgdir}/usr/lib/systemd/system/"
+  cp "${_anki_dir_}/plugins/systemd/anki-sync-server.service" "${pkgdir}/usr/lib/systemd/system/"

s7hoang commented on 2022-01-23 07:32 (UTC) (edited on 2022-01-23 07:32 (UTC) by s7hoang)

rats! I was just finishing up work on it and hoping no one would've noticed :P

yeah during testing at that time I was using 27701-27703 for testing the http, https and anki servers and forgot to update those files.

but, I made some changes to this package and it now has:

  • 2 server files (http & https) : https is needed for AnkiDroid in particular

  • a manpage with instructions for setting up the https server

  • the ports are now properly set to 27701 for the client plugins :P

give it a spin!

goffi commented on 2022-01-19 19:59 (UTC)


I could not do any sync from Anki desktop (anki-bin package) to Anki Sync Server installed with this package, while download was working fine. The issue is the same as and I found that the file of the plugin was incorrectly using 27702 (Anki Sync Server port directly) instead of 27701 (NGINX proxy), see my comment at After changing the port for 27701, it's working fine.

Thanks for maintaining this package, once this little issue fixed, it's working well.

s7hoang commented on 2020-07-14 23:06 (UTC) (edited on 2020-07-18 00:15 (UTC) by s7hoang)

I didn't even know that was a thing :P

I'll have to look into that.

edit: it's switched now.

cl0ne commented on 2020-07-08 23:46 (UTC)

What about switching this package to

s7hoang commented on 2020-03-03 04:31 (UTC)


lvsv commented on 2020-02-28 22:57 (UTC)

Please add 'git' into makedepends,

'Cannot find the git package needed to handle git sources'

s7hoang commented on 2019-10-25 20:57 (UTC)

Ok, so I'm guessing you probably followed my instructions in the post-install to run python -m ankisyncd which then gave you webob and decorator missing dependency issues.

The command should've been sudo -u anki-sync-server python -m ankisyncd because the packages were installed to that user specifically so as to not pollute your userspace. I didn't catch the decorator dependency though as my testing distro already had it installed so thanks for that.

I've updated the post-install text and added some extra lines to (hopefully) clarify that issue.


s7hoang commented on 2019-10-22 16:42 (UTC)

Changing out my hardware at the moment, I'll add those packages to the required list in a couple of days.

leuko commented on 2019-10-22 08:40 (UTC)

I had to additionally install the following packages: python-webob python-decorator