2.2 KiB
2.2 KiB
Anki Sync Server
This project sets up an Anki synchronization server in a Docker environment, making it easy to host your own Anki synchronization service.
Features
- Dockerized Anki Sync Server.
- Entry point script for the server to facilitate user configuration.
- systemd service file for ease of management and auto-start of the Anki sync service.
- Installation script for automated setup.
- Sample environment file to set configurations.
Prerequisites
- Docker
- Docker Compose
- Git
Installation
-
Clone this repository:
git clone https://git.rudefox.io/bj/anki-sync-server.git /var/lib/anki-server cd /var/lib/anki-server
-
Run the installation script (with root privileges):
sudo ./install.sh
-
Remember to set up the necessary environment variables in the
.env
file.- For a quick start, a
sample.env
file has been provided.
- For a quick start, a
-
Ensure that the
data
directory is created and has the appropriate permissions:mkdir data
-
Start the service:
systemctl start anki-sync-server
To enable auto-start on boot:
systemctl enable anki-sync-server
Configuration
Most of the server's configurations are managed through the .env
file. After the initial setup, ensure to modify this file according to your requirements.
Here are some key environment variables:
ANKISYNCD_DATA_ROOT
: Path to the data root directory inside the container.ANKISYNCD_AUTH_DB_PATH
: Path to the authentication database.ANKISYNCD_SESSION_DB_PATH
: Path to the session database.SYNC_USERS
: Users for the synchronization server.ANKI_PORT
: Port on which the Anki server should run.ANKI_VOLUME_PATH
: Local path for the volume storage.
Username and Password Configuration
- Inside the
.env
file, locate theSYNC_USERS
variable. - Enter the desired usernames and passwords in the format:
username:password
.- For multiple users, separate them with a comma:
user1:pass1,user2:pass2
.
- For multiple users, separate them with a comma:
- Save the changes and restart the Anki sync service.
Maintenance
- Backup: Ensure to backup your
data
directory regularly. - Updates: To update the service, pull the latest changes from the repository and restart the service.