lc setup
Configure your LocalCloud project interactively or create a new project from a template.Usage
Arguments
template
(optional) - Template name to create project from
Flags
Flag | Description | Default |
---|---|---|
--name | Project name (for template creation) | template name |
--force | Overwrite existing directory | false |
Modes
1. Interactive Configuration (No Arguments)
When run without arguments in an existing project:lc init --interactive
, allowing you to:
- Select project type
- Choose components (Database, Vector Database, Cache, Storage)
- Pick AI models
- Configure services
Vector Database is presented as a separate option in the setup wizard, but uses the same PostgreSQL instance with pgvector extension for optimal performance.
The project must already be initialized with
lc init
before running lc setup
without arguments.2. Template Creation (With Template Name)
Create a new project from a template:Available Templates
Template | Description | Services |
---|---|---|
chat | ChatGPT-like interface with conversation history | Ollama, PostgreSQL, Redis |
code-assistant | AI-powered code editor and assistant | Ollama, PostgreSQL, Redis, MinIO |
transcribe | Audio/video transcription service | Whisper, PostgreSQL, MinIO |
image-gen | AI image generation interface | Stable Diffusion, PostgreSQL, MinIO |
api-only | REST API without frontend | Ollama, PostgreSQL, Redis |
Examples
Configure existing project
Create chat application
Create API with custom settings
Generate files without starting services
Overwrite existing directory
Template Creation Process
When creating from a template,setup
performs these steps:
- System Check
- Verifies Docker is installed
- Checks available RAM and disk space
- Validates system requirements
- Interactive Configuration (if needed)
- Project name (if not provided)
- AI model selection
- Port allocation
- File Generation
- Creates project structure
- Generates configuration files
- Copies template files
- Substitutes variables
- Service Startup (unless
--skip-docker
)
- Pulls required Docker images
- Starts all services
- Waits for health checks
- Success Summary
- Shows service URLs
- Displays next steps
- Provides example commands
Template Structure
Templates include:Model Selection
During setup, you can choose from recommended models based on your hardware:For Limited Resources (8GB RAM)
qwen2.5:3b
- Fast and efficientphi3
- Microsoft’s compact modelgemma2:2b
- Google’s tiny model
For Standard Systems (16GB RAM)
llama2
- Meta’s popular modelmistral
- Great for codingcodellama
- Specialized for code
For High-End Systems (32GB+ RAM)
mixtral:8x7b
- Powerful MoE modelllama3:70b
- Large language modelqwen2.5:32b
- Advanced reasoning
Port Management
LocalCloud automatically manages ports to avoid conflicts:- Default Ports:
- API: 3001
- Frontend: 3000
- AI: 11434
- PostgreSQL: 5432
- Redis: 6379
- MinIO: 9000/9001
- Automatic Assignment: If defaults are in use, finds next available port
- Manual Override: Use flags to specify custom ports
Error Handling
No project found
lc init
Template not found
lc templates list
to see available templates
Insufficient resources
Port already in use
--port
flag to specify a different port
Advanced Usage
Custom Template Variables
Templates can use these variables:{{.ProjectName}}
- Project name{{.APIPort}}
- API port number{{.FrontendPort}}
- Frontend port{{.ModelName}}
- Selected AI model{{.DatabaseURL}}
- PostgreSQL connection string{{.RedisURL}}
- Redis connection string
Environment Configuration
Generated.env
file includes:
Related Commands
lc init
- Initialize a projectlc templates
- List available templateslc start
- Start serviceslc component add
- Add components to existing project