Skip to main content
The init command creates your deployment directory with all necessary configuration files.

Usage

2501-infra init [options]
For all available options:
2501-infra init -h

What Gets Created

The init command creates different directory structures depending on the installation mode.

System Mode (Default)

When using system mode (requires sudo), files are created in standard system directories:
/etc/2501/default/
├── 2501.yaml              # Main configuration (documented inline)
├── env.engine             # Engine environment variables
├── env.command-center     # Command Center environment variables
└── generated/             # Generated deployment files

/var/lib/2501/default/
└── data/                  # (only with --postgres)
    └── postgres/

/var/log/2501/default/
├── engine/
└── command-center/

User Mode

When using user mode (--user flag, no sudo required), files are created in ~/.2501/default/:
~/.2501/default/
├── 2501.yaml              # Main configuration (documented inline)
├── env.engine             # Engine environment variables
├── env.command-center     # Command Center environment variables
├── logs/
│   ├── engine/
│   └── command-center/
├── generated/             # Generated deployment files
└── data/                  # (only with --postgres)
    └── postgres/

Auto-Generated Secrets

The init command automatically generates all required secrets:
  • CREDENTIAL_DECRYPTION_KEY / CREDENTIAL_ENCRYPTION_KEY
  • ENGINE_API_KEY
  • AUTH_SECRET
  • LOG_ENCRYPTION_KEY
These secrets are generated once and must be preserved. Never regenerate them after initial deployment as this will break existing credentials.

Quick Start

# Production setup with external database
2501-infra init --no-postgres

# Experiment with managed PostgreSQL
2501-infra init --postgres

# Custom directory
2501-infra init -d /etc/2501 -t swarm --no-postgres