> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended**:
> ```bash
> npx @scalekit-inc/cli setup
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for 40+ agents.
> Features: full-stack-auth, agent-auth, mcp-auth, modular-sso, modular-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Manage environments

Configure development, staging, and production environments, and choose a US or EU region for data residency.
Scalekit supports multiple environments to help you manage your application development lifecycle. Keep your development, staging, and production configurations separate while maintaining consistent authentication behavior. Environments live inside a workspace, and the workspace region (US or EU) is fixed at signup.

## Environment types

Scalekit provides three default environments:

| Environment | Purpose |
| ----------- | ------- |
| **Development** | Local development and testing with relaxed security policies |
| **Staging** | Pre-production testing that mirrors production configuration |
| **Production** | Live environment with strict security policies and monitoring |

> tip: Use separate environments
>
> Keep your development and production environments separate to prevent accidental
> configuration changes from affecting your live users.

## Choose a region (US or EU)

Scalekit runs two fully isolated regional deployments: **United States (US)** and **European Union (EU)**. Choose the region when you create the workspace. You cannot change the region later or migrate data between regions.

### How regional isolation works

The EU deployment is a separate infrastructure stack: dedicated GCP capacity in `europe-west3` (Frankfurt), separate databases, and separate authentication data. Customer data does not cross regional boundaries. Use the EU region when you need EU customer data hosted natively in the EU for GDPR data residency.

> caution: Region is a one-time choice
>
> A US workspace cannot become an EU workspace, and the reverse is also true. If you signed up in the wrong region, create a new workspace in the correct region and reconfigure your integration there. Scalekit can delete the incorrect workspace on request after you migrate.

### Create an EU workspace

Sign up on the EU cluster:

1. Go to [auth.eu.scalekit.com/a/auth/signup](https://auth.eu.scalekit.com/a/auth/signup)
2. Create your workspace as usual

The EU workspace includes its own **Development** and **Production** environments, the same layout as a US workspace.

> note: Point your integration at the EU environment
>
> Use the API base URL, client credentials, and redirect URLs from your EU environment. Credentials from a US workspace do not work against the EU deployment.

### Billing for EU environments

EU data residency is a **$99/month add-on per production environment**, billed separately from any US workspace. The add-on applies to Auth for SaaS (Modular SSO, MCP Auth) and AgentKit.

Other per-environment add-ons, such as **Customization Pro** (custom domain, branding removal, custom email templates), are also billed per region. Running Customization Pro on both a US and an EU production environment bills the add-on twice.

Add a payment method under **Workspace Settings → Billing** in the EU workspace so the add-on and usage-based charges succeed. See [Billing and usage](/saaskit/how-to/billing/) for payment methods and plan details.

## Access environment settings

Navigate to **Dashboard > Settings > Environments** to view and manage your environments.

Each environment has its own:
- Environment ID and URL
- API credentials (client ID and secret)
- Redirect URLs
- Webhook endpoints
- Authentication method configurations

## Switch between environments

Use the environment selector in the top-right corner of the dashboard to switch between environments.

> caution: Verify your environment
>
> Always confirm you're working in the correct environment before making configuration changes.
> The dashboard displays the current environment name in the header.

## Configure environment-specific settings

### Redirect URLs

Each environment requires its own set of redirect URLs. Configure the appropriate URLs for your application in each environment:

- **Development**: `http://localhost:3000/auth/callback`
- **Staging**: `https://staging.yourapp.com/auth/callback`
- **Production**: `https://yourapp.com/auth/callback`

### API credentials

Each environment uses unique API credentials. Store credentials securely using environment variables:

```bash
# Development
SCALEKIT_ENVIRONMENT_ID=dev_env_123
SCALEKIT_CLIENT_ID=dev_client_abc
SCALEKIT_CLIENT_SECRET=dev_secret_xyz

# Production
SCALEKIT_ENVIRONMENT_ID=prod_env_456
SCALEKIT_CLIENT_ID=prod_client_def
SCALEKIT_CLIENT_SECRET=prod_secret_uvw
```

### Webhook endpoints

Configure different webhook endpoints for each environment to test webhook delivery in staging before enabling in production.

## Environment best practices

- **Never use production credentials in development**
- **Test all changes in staging before deploying to production**
- **Use environment-specific API endpoints**
- **Monitor logs separately for each environment**
- **Keep webhook configurations synchronized across environments**


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
