# Local development environment for Baserow # Copy this file to .env.local and adjust as needed # # This file is for running Baserow OUTSIDE of Docker (native Python/Node). # For Docker development, use .env.dev.example instead. # # ============================================================================= # Django Settings # ============================================================================= DJANGO_SETTINGS_MODULE=baserow.config.settings.dev # For running tests: # DJANGO_SETTINGS_MODULE=baserow.config.settings.test # ============================================================================= # Security (use same values as in env.docker-dev for local dev only!) # ============================================================================= SECRET_KEY=baserow # CHANGE THIS IN PRODUCTION! # Allow OAuth/OIDC over HTTP for local identity-provider testing. OAUTHLIB_INSECURE_TRANSPORT=1 # ============================================================================= # Database (local PostgreSQL) # ============================================================================= DATABASE_HOST=localhost # speed up operations and tests (must be single line, quoted for bash sourcing) POSTGRES_DEV_EXTRA_ARGS="-c shared_buffers=512MB -c fsync=off -c full_page_writes=off -c synchronous_commit=off -c max_locks_per_transaction=512 -c logging_collector=off -c log_statement=none -c log_duration=off -c log_min_duration_statement=-1 -c log_checkpoints=off -c log_connections=off -c log_disconnections=off -c log_lock_waits=off -c log_temp_files=-1 -c checkpoint_timeout=1h -c max_wal_size=10GB -c min_wal_size=1GB -c wal_level=minimal -c max_wal_senders=0 -c autovacuum=off -c random_page_cost=1.0 -c effective_io_concurrency=200 -c work_mem=256MB -c maintenance_work_mem=512MB" # Or use a connection URL: # DATABASE_URL=postgresql://baserow:baserow@localhost:5432/baserow # ============================================================================= # Redis (local Redis) # ============================================================================= REDIS_HOST=localhost REDIS_PASSWORD=baserow # ============================================================================= # URLs # ============================================================================= BASEROW_PUBLIC_URL= PUBLIC_BACKEND_URL=http://localhost:8000 PUBLIC_WEB_FRONTEND_URL=http://localhost:3000 # If the preview URL differs from PUBLIC_BACKEND_URL, don't mix localhost with a # *.localhost hostname. Preview authentication can fail in browsers such as Safari. # Use the same hostname or sibling non-localhost domains with a shared base domain. # BASEROW_BUILDER_PREVIEW_URL=http://localhost:3000 PRIVATE_BACKEND_URL=http://localhost:8000 # ============================================================================= # Local Development Ports and Runtime Files # ============================================================================= # Change these when running multiple native local dev instances at the same time. # If you change a port, update the matching PUBLIC_* URL above as well. # Set this to a unique value per same-host instance so auth cookies do not collide. # BASEROW_FRONTEND_COOKIE_PREFIX=baserow_3000_ # BASEROW_RUNSERVER_BIND=0.0.0.0:8000 # BASEROW_NUXT_HOST=0.0.0.0 # BASEROW_NUXT_PORT=3000 # BASEROW_STORYBOOK_HOST=0.0.0.0 # BASEROW_STORYBOOK_PORT=6006 # BASEROW_POSTGRES_PORT=5432 # BASEROW_DEBUG_REDIS_PORT=6379 # BASEROW_MAILHOG_SMTP_PORT=1025 # BASEROW_MAILHOG_WEB_PORT=8025 # The e2e suite reads sent mail from this MailHog, so its URL follows the port # above. Set it only when the catcher is somewhere else entirely. # E2E_MAIL_API_URL=http://localhost:8025 # BASEROW_CELERY_FLOWER_PORT=5555 # BASEROW_OTEL_COLLECTOR_PORT=4318 # BASEROW_EMBEDDINGS_PORT=7999 # BASEROW_PHOENIX_PORT=6060 # BASEROW_EVAL_RUNNER_PORT=8090 # BASEROW_ASSISTANT_PHOENIX_URL=http://localhost:6060 # BASEROW_KEYCLOAK_PORT=8081 # BASEROW_BACKEND_DEBUGGER_PORT=5678 # BASEROW_LOCAL_DEV_PREFIX=/tmp/baserow # BASEROW_LOCAL_TMUX_SESSION=baserow-dev # # To run two native local dev instances at the same time, copy one of the # following blocks into each instance's .env.local file. # # Alternate instance A: # DATABASE_PORT=15432 # REDIS_PORT=16379 # EMAIL_PORT=1035 # BASEROW_PUBLIC_URL= # PRIVATE_BACKEND_URL=http://localhost:8010 # PUBLIC_BACKEND_URL=http://localhost:8010 # PUBLIC_WEB_FRONTEND_URL=http://localhost:3010 # BASEROW_EMBEDDINGS_API_URL=http://localhost:8009 # MEDIA_URL=http://localhost:8010/media/ # WEB_FRONTEND_PORT=4010 # WEB_FRONTEND_SSL_PORT=4453 # BASEROW_FRONTEND_COOKIE_PREFIX=baserow_3010_ # BASEROW_RUNSERVER_BIND=0.0.0.0:8010 # BASEROW_NUXT_PORT=3010 # BASEROW_STORYBOOK_PORT=6016 # BASEROW_POSTGRES_PORT=15432 # BASEROW_DEBUG_REDIS_PORT=16379 # BASEROW_MAILHOG_SMTP_PORT=1035 # BASEROW_MAILHOG_WEB_PORT=8035 # E2E_MAIL_API_URL=http://localhost:8035 # BASEROW_CELERY_FLOWER_PORT=5565 # BASEROW_OTEL_COLLECTOR_PORT=4328 # BASEROW_EMBEDDINGS_PORT=8009 # BASEROW_PHOENIX_PORT=6070 # BASEROW_EVAL_RUNNER_PORT=8100 # BASEROW_ASSISTANT_PHOENIX_URL=http://localhost:6070 # BASEROW_KEYCLOAK_PORT=8091 # BASEROW_BACKEND_DEBUGGER_PORT=5679 # BASEROW_LOCAL_DEV_PREFIX=/tmp/baserow-second # BASEROW_LOCAL_TMUX_SESSION=baserow-dev-second # # Alternate instance B: # DATABASE_PORT=25432 # REDIS_PORT=26379 # EMAIL_PORT=1045 # BASEROW_PUBLIC_URL= # PUBLIC_BACKEND_URL=http://localhost:8020 # PUBLIC_WEB_FRONTEND_URL=http://localhost:3020 # PRIVATE_BACKEND_URL=http://localhost:8020 # MEDIA_URL=http://localhost:8020/media/ # WEB_FRONTEND_PORT=4020 # WEB_FRONTEND_SSL_PORT=4463 # BASEROW_FRONTEND_COOKIE_PREFIX=baserow_3020_ # BASEROW_RUNSERVER_BIND=0.0.0.0:8020 # BASEROW_NUXT_PORT=3020 # BASEROW_STORYBOOK_PORT=6026 # BASEROW_POSTGRES_PORT=25432 # BASEROW_DEBUG_REDIS_PORT=26379 # BASEROW_MAILHOG_SMTP_PORT=1045 # BASEROW_MAILHOG_WEB_PORT=8045 # E2E_MAIL_API_URL=http://localhost:8045 # BASEROW_CELERY_FLOWER_PORT=5575 # BASEROW_OTEL_COLLECTOR_PORT=4338 # BASEROW_EMBEDDINGS_PORT=8019 # BASEROW_PHOENIX_PORT=6080 # BASEROW_EVAL_RUNNER_PORT=8110 # BASEROW_ASSISTANT_PHOENIX_URL=http://localhost:6080 # BASEROW_KEYCLOAK_PORT=8101 # BASEROW_BACKEND_DEBUGGER_PORT=5680 # BASEROW_LOCAL_DEV_PREFIX=/tmp/baserow-third # BASEROW_LOCAL_TMUX_SESSION=baserow-dev-third # ============================================================================= # Backend Development Settings # ============================================================================= BASEROW_BACKEND_DEBUG=on BASEROW_BACKEND_LOG_LEVEL=INFO # BASEROW_OTEL_LOG_LEVEL= # BASEROW_OTEL_SLOW_REQUEST_THRESHOLD_SECONDS= # BASEROW_OTEL_SLOW_CELERY_TASK_THRESHOLD_SECONDS= # BASEROW_OTEL_TAIL_SAMPLING_DECISION_WAIT= # BASEROW_OTEL_TAIL_SAMPLING_DECISION_WAIT_AFTER_ROOT_RECEIVED= # BASEROW_OTEL_TAIL_SAMPLING_MAX_SPANS_PER_SECOND= # BASEROW_OTEL_USER_METRICS_CARDINALITY_LIMIT= # BASEROW_OTEL_USER_METRICS_FLUSH_INTERVAL= # BASEROW_OTEL_USER_METRICS_SERIES_EXPIRATION= # OTEL_SEMCONV_STABILITY_OPT_IN=http # Disable template sync on startup for faster boot SYNC_TEMPLATES_ON_STARTUP=false MIGRATE_ON_STARTUP=false # ============================================================================= # Email (mailhog via Docker - intercepts all emails) # ============================================================================= # Mailhog web UI: http://localhost:8025 EMAIL_HOST=localhost EMAIL_PORT=1025 # ============================================================================= # Optional: Celery # ============================================================================= # Run celery tasks synchronously (no separate worker needed) # CELERY_TASK_ALWAYS_EAGER=true # ============================================================================= # Optional: AI providers created by populate_test_data # ============================================================================= # Absolute paths to untracked files that contain only the API key. Each provider # is created once, when absent, without any network call. See settings/dev.py. # backend/.local/ is gitignored and also visible to the Docker dev backend. # BASEROW_DEV_POPULATE_OPENAI_API_KEY_FILE=/absolute/path/to/backend/.local/openai-key # BASEROW_DEV_POPULATE_ANTHROPIC_API_KEY_FILE=/absolute/path/to/backend/.local/anthropic-key # ============================================================================= # Media files (path relative to the backend folder) # ============================================================================= MEDIA_ROOT=media MEDIA_URL=http://localhost:8000/media/ # For local dev to customize the code runner runtime # BASEROW_ENTERPRISE_CODE_RUNNER_DEFAULT_TYPE=wasmtime_quickjs # BASEROW_ENTERPRISE_CODE_RUNNER_WASMTIME_EXECUTABLE=.local/code-runtime/bin/wasmtime # BASEROW_ENTERPRISE_CODE_RUNNER_QUICKJS_WASM_PATH=.local/code-runtime/lib/baserow/qjs.wasm # BASEROW_ENTERPRISE_CODE_RUNNER_TIMEOUT_SECONDS=5 # BASEROW_ENTERPRISE_CODE_RUNNER_MEMORY_LIMIT_BYTES=16777216 # BASEROW_ENTERPRISE_CODE_RUNNER_FUEL_LIMIT=100000000