Getting Started#
This guide will help you get up and running with lanup in just a few minutes.
Step 1: Initialize Your Project#
Navigate to your project directory and initialize lanup:
cd your-project
lanup initThis creates a .lanup.yaml configuration file in your project root.
Step 2: Configure Your Services#
Edit the .lanup.yaml file to define which services you want to expose:
vars:
SUPABASE_URL: "http://localhost:54321"
API_URL: "http://localhost:8000"
DASHBOARD_URL: "http://localhost:3000"
output: ".env.local"
auto_detect:
docker: true
supabase: trueConfiguration Options#
- vars: Environment variables to expose (localhost URLs will be transformed)
- output: Path to the generated environment file (default:
.env.local) - auto_detect: Enable automatic detection of Docker containers and Supabase services
Step 3: Start Your Services#
Make sure your local services are running:
# Example: Start your backend
npm run dev
# Or start Docker containers
docker-compose up
# Or start Supabase
supabase startStep 4: Expose on Your Network#
Run lanup to expose your services:
lanup startYou’ll see output like:
✓ Successfully exposed services on your LAN!
✓ Environment file updated: .env.local
✓ Local IP: 192.168.1.100
=== Your services are now accessible at ===
SUPABASE_URL: http://192.168.1.100:54321
API_URL: http://192.168.1.100:8000
DASHBOARD_URL: http://192.168.1.100:3000
ℹ Tip: Use 'lanup start --watch' to automatically update when your network changesStep 5: Access from Other Devices#
Your services are now accessible from any device on the same network:
- Mobile phone: Open your browser and navigate to
http://192.168.1.100:3000 - Tablet: Use the exposed URLs in your app configuration
- Another computer: Access the services using the network IP
Using Watch Mode#
To automatically update when your network changes (e.g., switching from Wi-Fi to Ethernet):
lanup start --watchlanup will monitor your network and update the environment file whenever your IP address changes.
Generated Environment File#
lanup creates a .env.local file with your transformed URLs:
# Generated by lanup on 2025-10-27 23:50:12
# Do not edit the managed variables manually
# lanup:managed
SUPABASE_URL=http://192.168.1.100:54321
# lanup:managed
API_URL=http://192.168.1.100:8000
# lanup:managed
DASHBOARD_URL=http://192.168.1.100:3000
# User variables (preserved)
DATABASE_URL=postgresql://localhost:5432/mydb
SECRET_KEY=my-secretVariables marked with # lanup:managed are updated by lanup. Other variables are preserved.
Next Steps#
- Commands Reference - Learn about all available commands
- Configuration - Detailed configuration options
- Use Cases - Common usage scenarios
- Troubleshooting - Solutions to common problems