Settings

Turtle is configured with environment variables. With Docker Compose, they go under environment: in compose.yml:

services:
  turtle:
    image: ghcr.io/turtle-wiki/turtle:latest
    environment:
      TURTLE_PUBLIC_URL: https://turtle.example.org

With docker run, give each one with -e, such as -e TURTLE_PUBLIC_URL=https://turtle.example.org. With the binary, set them before the command:

TURTLE_DATA=/var/lib/turtle TURTLE_PORT=8080 TURTLE_PUBLIC_URL=https://turtle.example.org ./turtle

Turtle reads its settings when it starts. After changing one, restart Turtle. When a setting cannot work as given, such as TURTLE_SMTP_URL without TURTLE_MAIL_FROM, Turtle does not start and says what is missing.

The full reference, kept in step with the code, is docs/settings.md in Turtle's repository.

Every setting

SettingDefaultWhat it does
TURTLE_DATAturtle-data in the directory Turtle is started from; /data in the container imageThe data directory. Turtle creates it on the first start. It holds the database, turtle.db, and the Attachments, in attachments/.
TURTLE_HOST127.0.0.1; 0.0.0.0 in the container imageThe IP address Turtle listens on. 127.0.0.1 lets in only connections from the same machine, 0.0.0.0 every IPv4 address, :: every address.
TURTLE_PORT4100The port Turtle listens on.
TURTLE_PUBLIC_URLunsetThe address people open Turtle at, such as https://turtle.example.org, at the root of its host. It lets Claude and other AI clients connect with OAuth, and it is needed for mail. Without it, only Tokens created by hand work at the MCP address.
TURTLE_CLIENT_ADDRESS_HEADERunsetBehind a reverse proxy, the header that carries the client's address, such as X-Forwarded-For. See Running behind a reverse proxy. Leave it unset without a proxy.
TURTLE_SMTP_URLunsetThe SMTP server Turtle sends mail through. See Mail.
TURTLE_MAIL_FROMunsetThe address Turtle's mail comes from, such as Turtle <turtle@example.org>. Needed with TURTLE_SMTP_URL.
TURTLE_MAX_ATTACHMENT_MB25The largest file, in MB, that can be attached to a Page. A larger file in an import is left out and reported.
TURTLE_MAX_IMPORT_MB2048; 200 for a demoThe largest ZIP, in MB, that can be imported at once. Since 0.3 the default is 2048; it was 200. See below.
TURTLE_PUBLICfalseSince 0.3. true makes this a Public Turtle that anyone can read without an account. See Public mode.
TURTLE_DEMO_EMAILunsetWith TURTLE_DEMO_PASSWORD, makes Turtle a demo: the email address of the demo Member, whom anyone may sign in as. See Demo mode.
TURTLE_DEMO_PASSWORDunsetThe demo Member's password. It is shown to everyone.
TURTLE_DEMO_RESET_HOURSunsetHow many hours pass between resets of the demo, a whole number, for the notice on every screen. Only in demo mode.
TURTLE_LOG_SAVESunsetWhen set, Turtle prints a line for each save of changed Pages and how long it took, to see whether saving keeps up.

How large an import can be

TURTLE_MAX_IMPORT_MB needs some care:

  • The web app uploads the ZIP as a file before the import reads it. It lies in uploads/ in the data directory until it is imported, an hour at most. So the data directory needs room for the ZIP besides what the import brings in.
  • Memory does not limit an import. It reads the ZIP from its file, holds one Attachment at a time, and needs about 25 MB for every 1,000 Pages.
  • A reverse proxy in front of Turtle must accept requests this large.
  • Each file in the ZIP is still held to TURTLE_MAX_ATTACHMENT_MB.
  • A ZIP sent with the request in base64, over the HTTP API or through MCP, may be 200 MB at most.
  • Anyone who can sign in can upload a ZIP this large. That is why a demo takes 200 MB unless this is set. Set it lower on any Turtle open to people you do not trust with that much disk.