We value your privacy

This site uses cookies to improve your browsing experience, analyze site traffic, and show personalized content. See our Privacy Policy.

  1. MooseStack
  2. Configuration
  3. Redis Configuration

Redis Configuration

Configure the caching and state management layer.

Configuration Precedence

If url is provided, it takes precedence over hostname, port, password, etc.

Security Warning

NEVER put production credentials in moose.config.toml. For production environments or when connecting to external infrastructure, ALWAYS use environment variables and/or secrets to securely inject credentials.

moose.config.toml
[redis_config]# Redis connection URL (Default: "redis://127.0.0.1:6379")url = "redis://127.0.0.1:6379"# Namespace prefix for all Redis keys (Default: "MS")key_prefix = "MS"
KeyEnv VariableDefaultDescription
urlMOOSE_REDIS_CONFIG__URL"redis://127.0.0.1:6379"Full connection URL.
key_prefixMOOSE_REDIS_CONFIG__KEY_PREFIX"MS"Prefix for keys used by Moose.

Docker Compose Port Binding

When running moose dev, Moose generates a docker-compose.yml that exposes Redis on the host. The host-side port is derived from the port in url:

moose.config.toml
[redis_config]url = "redis://127.0.0.1:6380"  # host port → 6380

This produces the following mapping in .moose/docker-compose.yml:

ports:  - "6380:6379"  # host:container

The container-side port is always 6379 (the Redis default). Only the host-side port changes based on your url.

On this page

Docker Compose Port Binding
FiveonefourFiveonefour
Fiveonefour Docs
MooseStackHostingTemplatesGuides
Release Notes
Source531
  • Overview
Build a New App
  • 5 Minute Quickstart
  • Browse Templates
  • Existing ClickHouse
Add to Existing App
  • Next.js
  • Fastify
Fundamentals
  • Moose Runtime
  • MooseDev MCP
  • Language Server
  • Data Modeling
Moose Modules
  • Moose OLAP
  • Moose Streaming
  • Moose Workflows
  • Moose APIs & Web Apps
Deployment & Lifecycle
  • Moose Dev
  • Moose Migrate
  • Moose Deploy
Reference
  • API Reference
  • Data Types
  • Table Engines
  • CLI
  • Configuration
    • Core Settings
    • Project Settings
    • TypeScript
    • Telemetry
    • Git
    • Features
    • Migrations
    • Docker
    • Infrastructure
    • ClickHouse
    • Redpanda
    • Redis
    • Temporal
    • HTTP Server
    • State Storage
    • Security
    • JWT
    • Admin API
    • Development
    • Dev Environment
  • Observability Metrics
  • Help
  • Release Notes
Contribution
  • Documentation
  • Framework