Initializing SFP server
Last updated
Last updated
sfp-pro | sfp (community) | |
---|---|---|
The sfp server init
command initializes a new SFP server tenant with all necessary configurations, services, and secret management. This command sets up the complete infrastructure required for running an SFP server instance.
Flag | Required | Description |
---|---|---|
The command supports multiple secret management providers, each with its own configuration flags:
--infisical-token
: Authentication token for Infisical
--keyvault-url
: URL of the Azure Key Vault
--keyvault-tenant-id
: Azure tenant ID
--keyvault-client-id
: Azure client ID
--keyvault-client-secret
: Azure client secret
--aws-region
: AWS region
--aws-access-key-id
: AWS access key ID
--aws-secret-access-key
: AWS secret access key
--vault-url
: URL of the HashiCorp Vault
--vault-token
: Authentication token for Vault
Initialize a development server:
Initialize a production server with Infisical:
Initialize with Azure Key Vault:
Initialize with custom worker configuration:
Directory Structure: Creates a structured directory layout under ./sfp-server/tenants/<tenant-name>
containing:
Configuration files
Secret management setup
Docker compose files
Service configurations
Environment Setup:
Development Mode: Sets up local development environment with default configurations
Production Mode: Configures production-ready setup with specified domain and secret management
Services Configuration:
Configures Docker services
Sets up database schema and migrations
Initializes worker processes
Configures reverse proxy (Caddy)
Secret Management:
Integrates with specified secrets provider
Sets up secure storage and access patterns
Configures necessary authentication
The command will fail with appropriate error messages in the following scenarios:
Invalid tenant name format
Missing required provider-specific configuration
Existing tenant without force flag
Invalid worker count format
Failed service initialization
After successful initialization, the command outputs:
Tenant URL and access details
Available management commands
Service status information
You can manage the initialized server using other sfp server
commands:
Note: For production deployments, ensure you have configured your domain DNS settings and have necessary SSL certificates before initialization.
Warning: The
--force
flag will overwrite existing configurations. Use with caution in production environments.
Availability
✅
❌
From
December 24
-t, --tenant
Yes
Name of the tenant. Must contain only lowercase letters, numbers, and hyphens
-m, --mode
No
Environment mode: dev
or prod
(default: dev
)
-f, --force
No
Force initialization even if tenant already exists
-i, --interactive
No
Enable/disable interactive mode for configuration (default: true)
-d, --domain
No
Custom domain for the server. Required in prod mode
--worker-counts
No
Comma-separated worker counts for critical,normal,batch (default: "1,1,1")
--secrets-provider
No
Secret management provider to use (default: "infisical")