blob: ff053426ba5f577308ac1fb35b9e6ce776722f43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
.ds server anki-sync-server
.ds server-dir /opt/anki-sync-server
.TH \*[server] 1 "" "" "Post Installation Guide"
.SH Adding a user
.PP
You'll need to go to:
.EX
\*[server-dir]
.EE
and run:
.EX
sudo -u \*[server] ./ankisyncctl.py adduser <username>
.EE
to add a new user to the \*[server] database.
.SH Plugin Installation
.PP
To have your anki client interface with the server, you'll need to copy the plugin
from \fI\*[server-dir]/plugins\fR to the relevant directory.
.ds anki-2.1.28 ~/.local/share/Anki2/addons21
.ds anki-2.1 ~/.local/share/Anki2/addons21
.ds anki-2 ~/Anki/addons
.ds anki-plugins \*[server-dir]/plugins
\fIAnki 2.1.28 (and up):\fR \*[anki-2.1.28]
.EX
ln -s \\
\*[anki-plugins]/anki2.1.28/\*[server] \\
\*[anki-2.1.28]/\*[server]
.EE
\fIAnki 2.1:\fR \*[anki-2.1]
.EX
ln -s \\
\*[anki-plugins]/anki2.1/\*[server] \\
\*[anki-2.1]/\*[server]
.EE
\fIAnki 2.0:\fR \*[anki-2]
.EX
ln -s \\
\*[anki-plugins]/anki2.0/\*[server].py \\
\*[anki-2]/\*[server].py
.EE
or your OS equivalent.
.SH Running The Server
.PP
The server should be set to auto start via \fIsystemctl\fR and should be already running.
See:
.EX
systemctl status \*[server]
systemctl status nginx
.EE
for details.
Otherwise, to run the server go to:
.EX
\*[server-dir]/
.EE
then run:
.EX
sudo -u \*[server] python -m ankisyncd
.EE
.B NOTE: if you run it as another user you may have to install the python dependencies again:
.EX
pip install -r \*[server-dir]/requirements.txt [--user]
.EE
.B Be aware you may have trouble with permissions on your auth.db and
.B other files if you run as different users!
.SH NGINX
.PP
\fI/etc/nginx/nginx.conf\fR may have been modified. If the installation modifed
the \fInginx.conf\fR file, a backup has been saved to
\fI/etc/nginx/nginx.conf.pacsave\fR. It would be a good idea to to see if
anything has gone awry.
|