LinguaCafe logo

LinguaCafe

Self-hosted software that helps language learners read foreign languages

Alternative to: lingq, readlang, duolingo


LinguaCafe is a free, self-hosted platform that helps language learners acquire vocabulary through reading. It lets you import texts from articles, books, subtitles or Jellyfin/streaming sources, click any word to look it up in a built-in dictionary, save it to your personal vocabulary list, and review saved words with spaced-repetition flashcards. It supports 27 languages, including dedicated Japanese/Chinese tokenization.

LinguaCafe Docker Compose example

Self-host LinguaCafe on your own server, homelab, or VPS starting from this Docker Compose example. It runs LinguaCafe in Docker containers using the official ghcr.io/simjanos-dev/linguacafe-webserver:latest, mysql:8.0, redis:7.2-alpine, ghcr.io/simjanos-dev/linguacafe-python-service:latest images, with persistent volumes and automatic restarts preconfigured. Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.

services:
  webserver:
    image: ghcr.io/simjanos-dev/linguacafe-webserver:latest
    restart: unless-stopped
    depends_on:
      mysql:
        condition: service_healthy
    volumes:
      - storage:/var/www/html/storage
    environment:
      # Name of the MySQL database.
      DB_DATABASE: "linguacafe"
      # MySQL username.
      DB_USERNAME: "linguacafe"
      # MySQL password.
      DB_PASSWORD: "linguacafe"
      DB_CONNECTION: "mysql"
      DB_HOST: "mysql"
      DB_PORT: "3306"
      REDIS_HOST: "redis"
      REDIS_PORT: "6379"
      REDIS_PASSWORD: "null"
      # Cron expression for the automatic nightly database backup.
      BACKUP_INTERVAL: "59 23 * * *"
      # How many dated backups to keep before pruning the oldest.
      MAX_SAVED_BACKUPS: "14"

  mysql:
    image: mysql:8.0
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-plinguacafe"]
      interval: 10s
      timeout: 5s
      retries: 10
    volumes:
      - database:/var/lib/mysql
    environment:
      # Name of the MySQL database.
      MYSQL_DATABASE: "linguacafe"
      # MySQL username.
      MYSQL_USER: "linguacafe"
      # MySQL password.
      MYSQL_PASSWORD: "linguacafe"
      # MySQL root password (used internally, e.g. by the health check).
      MYSQL_ROOT_PASSWORD: "linguacafe"

  redis:
    image: redis:7.2-alpine
    restart: unless-stopped
    volumes:
      - cache:/data

  python:
    image: ghcr.io/simjanos-dev/linguacafe-python-service:latest
    restart: unless-stopped
    tty: true
    command: "python3 /app/tokenizer.py"
    environment:
      PYTHONPATH: "/var/www/html/storage/app/model"
    volumes:
      - storage:/var/www/html/storage

volumes:
  storage:
  database:
  cache:

Prefer a managed setup? WinterFlow installs, configures, and updates LinguaCafe for you using this same Docker Compose configuration.