# 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 1. Clone this repository: ```bash git clone https://git.rudefox.io/bj/anki-sync-server.git /var/lib/anki-server cd /var/lib/anki-server ``` 2. Run the installation script (with root privileges): ```bash sudo ./install.sh ``` 3. Remember to set up the necessary environment variables in the `.env` file. - For a quick start, a `sample.env` file has been provided. 4. Ensure that the `data` directory is created and has the appropriate permissions: ```bash mkdir data ``` 5. Start the service: ```bash systemctl start anki-sync-server ``` To enable auto-start on boot: ```bash 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. ## Usage You can interact with the Anki sync server using the provided `ankictl.sh` script: ```bash ./ankictl.sh [options] ``` ## 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.