lc setup
Initialize and configure LocalCloud projects. Supports both interactive setup for humans and non-interactive setup perfect for AI coding assistants.Usage
Arguments
project-name(optional) - Name for new project directory
Flags
| Flag | Description | Default |
|---|---|---|
--add | Components to add to existing project | |
--remove | Components to remove from existing project | |
--components | Components to configure (llm,database,cache,storage,etc) | |
--models | AI models to download (llama3.2:3b,nomic-embed-text) | |
--preset | Preset configuration (ai-dev,full-stack,minimal) | |
-y, --yes | Accept all defaults (non-interactive mode) | false |
Modes
1. Interactive Setup (Human Developers)
For human developers who want to choose components step by step:- Select project type (Chat Assistant, RAG System, Custom)
- Choose components (AI, Database, Vector Search, Cache, Storage, etc.)
- Pick AI models based on your hardware
- Configure services
2. Non-Interactive Setup (AI Assistants)
Perfect for AI coding assistants like Claude Code, Cursor, Gemini CLI:- ✅ No interactive prompts (no arrow keys/space bar needed)
- ✅ Predictable command structure
- ✅ Auto-generates
CLAUDE.mdguidance file - ✅ Clear preset options
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