FreeLingo: Open Source AI Language Learning Guide

Learn how to self-host FreeLingo, an open source AI language app. Covers Docker install, local or API models, voice setup, and best practices.

Illustration for the guide: FreeLingo: Open Source AI Language Learning Guide

Are you paying for a language app every month? There is an open source project that does something most apps do not. Instead of starting everyone at lesson one, it tests your level, builds a study plan for you, and gives you an AI tutor you can talk to in real time. It is called FreeLingo, and you can run it for free on your own server.

In short: FreeLingo is an open source AI language learning platform released under the AGPL-3.0 license and built by Arturo Carretero Calvo. You can self-host it for free with no feature limits, or use the managed service at freelingo.app. The basic install takes four commands with Docker Compose, and the main setup challenge is configuring voice for production.

Key takeaways

  • FreeLingo is licensed under AGPL-3.0 and was built by Arturo Carretero Calvo.
  • Self-hosting is free, and all Freemium limits do not exist in that mode.
  • The placement test sorts you into a CEFR level from A1 to C2, and you can choose a plan of 4, 8, 12, or 16 weeks.
  • Flashcards use the SM-2 algorithm, the same principle behind Anki.
  • The recommended local model is gemma4:e4b, and you can replace it in .env.
  • Kokoro local voices are English only, so non-English targets need TTS_PROVIDER=openai.

What is FreeLingo?

FreeLingo is an open source, AI-based language learning platform. It is built by developer Arturo Carretero Calvo and released under the AGPL-3.0 license. The project is available in two modes:

  • Self-Hosted: You run it on your own server or computer, for free and without limits.
  • Managed service: You use it at freelingo.app, with a limited free plan and paid subscriptions, for people who do not want to manage servers.

The important point: in self-hosted mode, all Freemium limits simply do not exist. Everything is open. You pay only for your own hardware, or for external API use if you choose that.

Repo: github.com/artcc/freelingo

What can the platform do?

FreeLingo covers placement, grammar, vocabulary, reading, listening, writing, conversation, and progress tracking in one app.

1. Level test and personal plan (CEFR)

Instead of "everyone starts at lesson 1," the system runs a placement assessment and sets your level on the CEFR scale, from A1 (beginner) to C2 (full mastery). Based on the result, it builds a weekly study plan. You choose the intensity: 4, 8, 12, or 16 weeks. Lessons unlock in this order: grammar, vocabulary, reading, writing, and review.

2. More than vocabulary

  • Grammar, vocabulary, reading comprehension, and writing lessons: The AI creates these within a structured curriculum, not random output from the model.
  • Flashcards with Spaced Repetition: Based on the SM-2 algorithm, the same principle behind Anki.
  • Listening exercises: The AI generates text at your level, converts it to audio with TTS, and you answer 5 comprehension questions before the transcript is shown.
  • Reading exercises: A reading passage with 5 comprehension questions, matched to your CEFR level.
  • Progress tracking: XP points, streaks, skill scores, and a final test for each level.
  • Explanations in your native language: During sign-up you set your native language. The system uses it for flashcard translations and lesson explanations.

3. Real-time conversation with an AI tutor

This is the most impressive part. You talk to the tutor, called Lingu, through your microphone and get feedback while you practice. Lingu also has memory. It saves useful facts about you between conversations, and you can manage those memories by hand in the settings.

4. Supported languages

As of now, you can learn English (British and American), Spanish, French, German, Italian, Portuguese, Japanese, Korean, and Chinese. You can study several languages at once and add languages from the settings.

The interface is translated into 10 languages, including English, Spanish, German, and French.

How is the architecture built?

Here is what runs under the hood:

  • Frontend: Next.js 16 with shadcn/ui and Tailwind
  • Backend: FastAPI (Python) with SQLAlchemy and Pydantic
  • Database: PostgreSQL 16
  • Cache: Redis 7
  • LLM: Local Ollama (recommended), or OpenAI, Anthropic, or DeepSeek through an API
  • TTS (text to speech): Local Kokoro or OpenAI TTS
  • STT (speech to text): Local faster-whisper or the OpenAI Whisper API
  • Deployment: Docker Compose

A key security point: the backend acts as a proxy for all external services. The frontend never talks directly to Ollama or the voice services.

How do you install FreeLingo step by step?

Install Docker with Docker Compose, Git, and Ollama if you plan to use a local model. Then clone the repo, set your environment, pull the model, and start the services. The first user to register becomes the Admin, so sign up yourself first.

Requirements

  • Docker and Docker Compose
  • Git
  • Ollama installed and running on the host machine, if you choose a local model. Download it from ollama.com.
# 1. Clone the repo
git clone https://github.com/artcc/freelingo.git
cd freelingo

# 2. Set up the environment
cp .env.example .env
# Edit .env: set OLLAMA_BASE_URL, choose a model, and review the other settings

# 3. Pull the recommended model (on the host machine, not inside Docker!)
ollama pull gemma4:e4b

# 4. Start all services (DB migrations run automatically)
docker compose up -d

Open http://localhost:3000, or http://<server-ip>:3000 if you run it on a server.

Important tip: The first user who signs up becomes the Admin automatically. So register yourself first.

Option B: Portainer (for home servers and NAS owners)

  1. Open Portainer, go to Stacks, and click Add stack.
  2. Choose Repository and paste the repo URL, or paste the contents of docker-compose.yml into the editor.
  3. Add environment variables from .env.example. The minimum is SECRET_KEY, OLLAMA_BASE_URL, and POSTGRES_PASSWORD.
  4. Click Deploy the stack.
  5. Open http://<server-ip>:3000.

Tip: If Ollama runs on the same host as Portainer, set OLLAMA_BASE_URL=http://host.docker.internal:11434.

How do you choose between a local model and an API?

Set LLM_PROVIDER in your .env file to choose the provider. Use ollama if you want full privacy and no ongoing cost. Use an API if you want higher quality without strong hardware.

ValueWhat it meansBest for
ollamaLocal model, full privacy, zero ongoing costYou have a reasonable computer or server and want everything on your own machine
openaiGPT through an APIYou want high quality without powerful hardware
anthropicClaude through an APISame as above, and strong for pedagogical explanations
deepseekSignificantly cheaper APIYou want an API but are cost-sensitive

The recommended local model is gemma4:e4b, and you can replace it in .env.

A practical note: a small local model will explain complex grammar less well than a large API model. If you study at higher levels (B2 and up) and do not have a strong GPU, consider an API, even if it costs a few dollars a month. It is still cheaper than Duolingo Max.

How do you set up voice (TTS and STT)?

Voice is optional, but it is the heart of the conversation experience. Most people get stuck here. You can choose local or OpenAI voice, and you set each service separately.

TTS_PROVIDER=local
STT_PROVIDER=local
  • TTS: The Kokoro service, running as a container.
  • STT: faster-whisper, running as a container.
  • For STT, the recommended model is large-v3-turbo. It offers the best balance of speed and accuracy, and it needs about 6GB VRAM.
  • No GPU? There are CPU images, but use ASR_MODEL=base or small. Large models are very slow on CPU.

OpenAI route (no GPU needed)

TTS_PROVIDER=openai
STT_PROVIDER=openai
OPENAI_API_KEY=sk-...

You can also remove the kokoro and whisper containers from the stack.

The trap to know about

Kokoro voices are English only. If you study Spanish, Japanese, French, or any language other than English, local TTS will not generate correct audio in your target language. The fix is to switch to TTS_PROVIDER=openai for non-English languages. This is in the documentation, but it is easy to miss, and people often wonder why the listening sounds strange.

What are the best practices before you run FreeLingo?

These tips save hours of debugging. Most of them come from problems you only see after a real setup.

1. On Linux servers, set up Redis correctly first

Redis needs vm.overcommit_memory=1 on the host to save data in the background safely. Without it, you can lose data on restart. Run this once on the server:

sudo sysctl vm.overcommit_memory=1
echo "vm.overcommit_memory = 1" | sudo tee -a /etc/sysctl.conf

2. Production voice conversation needs a reverse proxy and HTTPS

This is technically required, for two reasons:

  • Real-time conversation runs over WebSocket on the path /ws/conversation. Next.js does not pass WebSocket traffic by itself, so you need a reverse proxy such as Nginx, Caddy, or Traefik to route /ws/* to the backend.
  • The browser allows microphone access (getUserMedia) only in a Secure Context, meaning HTTPS or localhost. Without TLS, the microphone button will not work.

On localhost, everything works without this. The problem starts when you move to a real server.

3. Know the quota variables

Even in self-hosted mode, there are default settings for new users: DEFAULT_CONVERSATION_* and DEFAULT_MONTHLY_TOKENS_LIMIT. A value of 0 means no limit. If you are the only user, set 0 and forget about it. If you open it to family or a class, these quotas are how you control API costs.

4. Start small with the model, then upgrade as needed

Run gemma4:e4b first and see how the explanations feel at your level. If the grammar feels shallow, move to a larger model in Ollama or switch to an API. Do not start with the heaviest model you can find. You probably will not need it at A2.

5. Hardware: what you actually need

  • No voice, LLM through an API: Any computer that runs Docker. A Raspberry Pi will work.
  • Local Ollama: Depends on the model. gemma4:e4b works on a machine with 8 to 16GB RAM.
  • Full local voice (Kokoro and Whisper): An NVIDIA GPU is the easiest route. The stack is preconfigured for NVIDIA, including older cards from the GTX 10xx series up to RTX 50.

6. Back up your data

All your progress lives in PostgreSQL. docker compose down does not delete data, since it is stored in a volume. Still, back up the DB volume before version updates. The project moves fast, with over 900 commits.

7. Do not expose it to the internet without thinking

This is a system with open registration. The first user is the Admin, but anyone who reaches the address can sign up. If you expose it, use HTTPS, a strong database password, a long random SECRET_KEY, and ideally restricted access. A VPN such as Tailscale is an excellent option for personal use.

How does self-hosting compare to the managed service?

Self-hosting is free, but you handle the hardware, API costs, and maintenance. The managed service at freelingo.app has a limited free plan and paid subscriptions, with no setup on your side.

Self-Hostedfreelingo.app
CostFree (you pay for hardware or API)Limited free plan + subscription
Freemium limitsDo not existExist on the free plan
MaintenanceYouThem
PrivacyData stays with youData is with them
Skills neededBasic DockerNone

There is also a business track: on-premise deployment for schools and organizations, and a commercial license for people who want a branded version without the AGPL obligations.

Bottom line

FreeLingo is a complete system, not a small open source toy. It includes a level test, a personal plan, four skills, flashcards with Spaced Repetition, listening, reading, and an AI tutor you can speak with. The basic install is four commands, and the one real challenge is setting up voice in production.

Questions people ask

How do I install FreeLingo?

Clone the repo from github.com/artcc/freelingo, copy .env.example to .env, and set OLLAMA_BASE_URL and a model. Run ollama pull gemma4:e4b on the host machine, then run docker compose up -d and open http://localhost:3000. The first user to sign up becomes the Admin.

Do I need a GPU to run FreeLingo?

Not always. Without local voice and with an LLM through an API, any machine that runs Docker is enough, including a Raspberry Pi. For full local voice with Kokoro and faster-whisper, an NVIDIA GPU is the easiest option, and large-v3-turbo needs about 6GB VRAM.

Why doesn't local TTS work in the language I am studying?

Kokoro voices are English only. For any language other than English, switch to TTS_PROVIDER=openai, or the audio will not be generated correctly in the target language. This is the most common setup mistake.

What is the difference between self-hosting FreeLingo and the managed service?

Self-hosting has no Freemium limits, your data stays with you, and you pay only for hardware or API use. The managed service at freelingo.app has a limited free plan and paid subscriptions, with no maintenance and no Docker knowledge needed.

freelingoopen sourcelanguage learningdockerself-hosted
I rest. The agents work. A relaxed panda on a beanbag while a small robot carries its paperwork

One email a week. One agent you can copy.

Every week I send the setup I actually used: the tools, the prompts and the steps. Short enough to read on your phone.

No spam. Unsubscribe with one click.