Sign inSign up

lawryder/ankidock

By lawryder

Updated over 5 years ago

Meine Bearbeitung von ankicommunity/anki-sync-server. https://github.com/lawryder/ankidock

Image
0

10K+

lawryder/ankidock repository overview

ankidock

For your information:

This Container is built for use with Unraid.
It should be possible to use it with every other Docker, too.

Tested with AnkiDroid, Anki 2.1.28 (PC) and Anki 2.1.42 (PC + Mac).
Works with VPN, DynDNS and behind a reverse Proxy.


01. Setup in Unraid

Update:
-- Repository and Template added to CA
-- Information on 1. is just for backup purposes.


This is the data to be filled in the template:

1) WEBUI:
http://[Your private IP]:[Port], i.e. http://192.168.xxx.xxx:27701

2) Extra Parameters:
--mount type=volume,dst=/anki-sync-server,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=/mnt/user/appdata/ankidock/anki-server --mount type=volume,dst=/etc/nginx,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=/mnt/user/appdata/ankidock/nginx -it

3) Post Arguments:
bash


Now click on "Add another path, port, [...]" and choose "Port".
Give it a name and insert the following:
Container Port: 27701
Host Port: [whatever Port you like*], recommended: 27701

* = if you change it, think about chanking nginx.conf ('listen [PORT]'), too. (see 2.)


02. Setup the container


In order to use the container, there is still a little work needed.
As base directory for every folder in the following, I use '/mnt/user/appdata/ankidock/'.

1) /anki-sync-server/src/ankisyncd.conf
-- If IP is 0.0.0.0 - leave it like that. Else: change it to 0.0.0.0
-- Choose a port as you wish, EXCEPT 27701 [Standard: 27702]

2) /nginx/sites-enabled/default
-- On "proxy_pass", also enter 0.0.0.0 as IP.
Set the same Port that you used under 1)
-- It should now look like: http://0.0.0.0:[Port]/


Now start the container and open the console.

Change to directory /anki-sync-server/src

Add a new user.
Use the command: "python3 ankisyncctl.py adduser [username]"
Confirm with Enter and set a password.
You can use "python3 ankisyncctl.py lsuser" to see if your new user has been created.
If everything went right, it should show you a list of all users, including your new user.

Use "python3 ankisyncctl.py" to show more commands.


Now you can run the server itself
Go back to base directory ('cd /') and run './run.sh'.


If you get a message that contains sth. like
"Running HTTP on 0.0.0.0 on Port 27702" (or whatever you have chosen), then the server is running.

To test connectivity from outside, open a browser and open
"http://[Private Network IP]:27701" (i.e. http://192.168.xxx.xxx:27701).
You could also use the 'WebUI' button in Unraid.
You are connected if you see a white page with text "Anki Sync Server".

Your server is running :-)

PS: Please think about running "./run.sh" on every restart of the container :-)

03. Setup apps


For this, I refer to ankicommunity/anki-sync-server.
https://github.com/ankicommunity/anki-sync-server

Tag summary

Content type

Image

Digest

Size

199.1 MB

Last updated

over 5 years ago

docker pull lawryder/ankidock:latest_stable