Configuration#

lanup uses two configuration files: a project-level configuration and a global configuration.

Project Configuration#

The .lanup.yaml file is created in your project directory with lanup init.

Basic Structure#

# Environment variables to expose
vars:
  SUPABASE_URL: "http://localhost:54321"
  SUPABASE_ANON_KEY: "your-anon-key"
  API_URL: "http://localhost:8000"
  DASHBOARD_URL: "http://localhost:3000"

# Output file path
output: ".env.local"

# Auto-detection settings
auto_detect:
  docker: true
  supabase: true

Configuration Options#

vars#

Map of environment variable names to their localhost URLs or values.

  • URLs containing localhost or 127.0.0.1 will be automatically transformed to use your network IP
  • Other values are passed through unchanged

Example:

vars:
  API_URL: "http://localhost:8000"           # Transformed
  WS_URL: "ws://localhost:8080"              # Transformed
  DATABASE_URL: "postgresql://localhost:5432" # Transformed
  APP_NAME: "My App"                         # Not transformed

output#

Path to the generated environment file (relative to project root).

Default: .env.local

Examples:

output: ".env.local"        # Next.js, Vite
output: ".env.development"  # Create React App
output: "config/.env"       # Custom location

auto_detect#

Enable automatic detection of services.

docker#

Automatically detect running Docker containers and add their ports.

Default: true

When enabled, lanup will:

  • Detect all running Docker containers
  • Extract port mappings
  • Add environment variables like DOCKER_CONTAINER_NAME_PORT

Example:

auto_detect:
  docker: true

If you have a container named my-api exposing port 8080, lanup will add:

DOCKER_MY_API_PORT=http://192.168.1.100:8080
supabase#

Automatically detect Supabase local development services.

Default: true

When enabled, lanup will:

  • Detect Supabase services via supabase status
  • Extract service ports
  • Add environment variables for each service

Example:

auto_detect:
  supabase: true

Detected services include:

  • SUPABASE_API_URL_PORT
  • SUPABASE_DB_URL_PORT
  • SUPABASE_STUDIO_URL_PORT
  • SUPABASE_INBUCKET_URL_PORT

Global Configuration#

The ~/.lanup/config.yaml file is created automatically on first run.

Structure#

# Log file path
log_path: "~/.lanup/logs/lanup.log"

# Log level (debug, info, warn, error)
log_level: "info"

# Default port for services
default_port: 8080

# Check interval for watch mode (seconds)
check_interval: 5

Configuration Options#

log_path#

Path to the log file.

Default: ~/.lanup/logs/lanup.log

log_level#

Logging verbosity level.

Options: debug, info, warn, error

Default: info

default_port#

Default port to use when exposing services without a specified port.

Default: 8080

check_interval#

Interval (in seconds) for checking network changes in watch mode.

Default: 5

Range: 1-60 seconds

Environment File Format#

lanup generates environment files with the following structure:

# Generated by lanup on 2025-10-27 23:50:12
# Do not edit the managed variables manually

# lanup:managed
SUPABASE_URL=http://192.168.1.100:54321
# lanup:managed
API_URL=http://192.168.1.100:8000

# User variables (preserved)
DATABASE_URL=postgresql://localhost:5432/mydb
SECRET_KEY=my-secret

Managed Variables#

Variables marked with # lanup:managed are controlled by lanup and will be updated on each run.

User Variables#

Variables without the # lanup:managed marker are preserved and never modified by lanup.

File Permissions#

lanup sets appropriate file permissions for security:

  • Global config: 0600 (read/write for owner only)
  • Environment files: 0644 (read for all, write for owner)
  • Log directory: 0755 (accessible by owner)

Configuration Examples#

Next.js Project#

vars:
  NEXT_PUBLIC_API_URL: "http://localhost:8000"
  NEXT_PUBLIC_WS_URL: "ws://localhost:8080"

output: ".env.local"

auto_detect:
  docker: true
  supabase: false

Supabase + React#

vars:
  REACT_APP_SUPABASE_URL: "http://localhost:54321"
  REACT_APP_SUPABASE_ANON_KEY: "your-anon-key"

output: ".env.development"

auto_detect:
  docker: false
  supabase: true

Full Stack with Docker#

vars:
  API_URL: "http://localhost:8000"
  FRONTEND_URL: "http://localhost:3000"
  WEBSOCKET_URL: "ws://localhost:8080"

output: ".env.local"

auto_detect:
  docker: true
  supabase: true