# Local development

Create a repeatable local ParticleDB environment with disposable data and explicit connection settings.

Source: https://particledb.ai/guides/local-development/

## Keep local data separate

Use a dedicated directory for development:

```bash
particledb start \
  --data-dir ./pdb-dev \
  --http-addr 127.0.0.1:7173 \
  --pg-addr 127.0.0.1:5432 \
  --redis-addr 127.0.0.1:6379 \
  --grpc-addr 127.0.0.1:26257 \
  --mysql-addr 127.0.0.1:3307 \
  --pdb-addr 127.0.0.1:5440 \
  --metrics-addr 127.0.0.1:7175 \
  --no-unix-sockets \
  --no-auth
```

`--no-auth` disables authentication on enabled listeners. Use a trusted local machine and review [connection settings](/installation/ports/). Never point a test suite at production data.

## Make setup repeatable

Keep schema creation and seed data in source control. Choose a separate database directory and ports for each test environment. Keep application credentials in environment variables rather than committed source.

## Run tests

Create a fresh table or isolated schema for each test case. Check returned values and expected errors. For transaction tests, use separate client connections when the scenario requires concurrent sessions.

## Stop and restart

Stop the foreground server with Ctrl-C. Restart with the same data directory to retain the database. A new directory gives a fresh database. Do not remove a directory while a server is using it.

## Move toward production

Replace authentication bypass with configured credentials and TLS. Set resource limits and monitoring before opening access. [Deployment](/guides/deployment/) describes the next steps.

## Related

[Documentation home](/docs/) · [Troubleshooting](/guides/troubleshooting/)
