
Mealie is an open-source, self-hosted recipe manager and meal planner designed to simplify family dining. Unlike commercial apps like Paprika or Yummly, Mealie places your data entirely under your control, eliminating subscription fees, privacy concerns, and feature limitations. This article provides a comprehensive, step-by-step guide to self-hosting Mealie on a Linux server, focusing on practical deployment, configuration, and advanced features for busy households.
Understanding the Mealie Advantage for Families
Mealie distinguishes itself through several family-centric features. Its recipe import tool can scrape ingredients and instructions from nearly any website, converting them into a standardized, searchable format. The meal planner allows you to assign recipes to specific days, generate shopping lists automatically, and even schedule meals based on dietary preferences or leftover ingredients. Multi-user support means each family member can have their own profile, meal preferences, and calendar. With self-hosting, all data resides on your hardware, accessible via a web browser or mobile app, without reliance on third-party servers.
Prerequisites and System Requirements
Before deploying Mealie, ensure your environment meets these minimum specifications:
- Hardware: A system with 2GB RAM, 2 CPU cores, and 20GB free disk space (recipes and images accumulate storage). A Raspberry Pi 4 or an old laptop works well.
- Operating System: Ubuntu 22.04 LTS or Debian 11/12 are recommended for stability. Mealie also runs on Docker, so any Linux distribution with Docker support is viable.
- Software: Docker Engine (version 20.10+) and Docker Compose (version 2.x+). A reverse proxy like Nginx or Caddy is optional but recommended for SSL and custom domains.
- Network: A static IP address for your server (via DHCP reservation) or a dynamic DNS service if accessing externally.
Step 1: Installing Docker and Docker Compose
Mealie is distributed as a Docker image, making deployment consistent across environments. Begin by installing Docker:
sudo apt update && sudo apt upgrade -y
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
Verify installation with sudo docker --version and sudo docker compose version. Add your user to the Docker group to avoid sudo prefix: sudo usermod -aG docker $USER. Log out and back in for changes to take effect.
Step 2: Configuring the Mealie Deployment with Docker Compose
Create a dedicated directory for Mealie:
mkdir ~/mealie && cd ~/mealie
Create a docker-compose.yml file with the following content, adjusting paths and environment variables as needed:
version: '3.7'
services:
mealie:
image: ghcr.io/mealie-recipes/mealie:latest
container_name: mealie
ports:
- "9925:9000"
volumes:
- ./data:/app/data
- ./backups:/app/backups
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- BASE_URL=http://192.168.1.100:9925 # Change to your server IP
restart: unless-stopped
Explanation of key arguments:
ports: "9925:9000"maps host port 9925 to container port 9000. Choose an unused port.volumes: ./data:/app/datapersists recipes, settings, and images../backups:/app/backupsstores database backups.PUIDandPGIDshould match your user’s ID (check withidcommand). This ensures file permissions align with your host user.BASE_URLis critical for generating correct email links and OAuth redirects. Set it to your server’s local IP or domain.TZsets the timezone; use a value from the tz database (e.g.,America/Chicago).
For production, consider adding a database service (PostgreSQL) instead of SQLite. Mealie supports both, but PostgreSQL offers better concurrency for multi-user scenarios. An extended compose file with PostgreSQL is available in the official Mealie documentation.
Step 3: Launching and Initializing Mealie
Start the container:
docker compose up -d
Wait 30–60 seconds for the initial migration. Access Mealie by navigating to http://your-server-ip:9925 in a browser. You’ll see a login screen. The default credentials are:
- Username:
changeme@example.com - Password:
MyPassword
Immediately after logging in, go to Settings > Users and change the email/password. Create additional family members with User role (not Admin) for safety.
Step 4: Securing Mealie with a Reverse Proxy and SSL
Exposing Mealie directly over the internet is insecure. Use a reverse proxy with Let’s Encrypt certificates. Here’s a minimal Nginx configuration for a subdomain like mealie.yourdomain.com:
server {
listen 443 ssl;
server_name mealie.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
location / {
proxy_pass http://localhost:9925;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
If using Caddy, simply add to your Caddyfile:
mealie.yourdomain.com {
reverse_proxy localhost:9925
}
Caddy automatically obtains and renews SSL certificates. Update Mealie’s BASE_URL to https://mealie.yourdomain.com and restart: docker compose restart.
Step 5: Populating Your Recipe Database
Mealie’s true power lies in its import capabilities. To add recipes:
- Manual Entry: Click Create Recipe and fill in fields. Use markdown for instructions and leverage the nutrition calculator.
- URL Import: Click Import from URL, paste a recipe link (e.g., from AllRecipes or Serious Eats), and Mealie automatically parses ingredients and steps.
- Bulk Import: In Settings > Recipes > Import, you can upload a collection of recipes in JSON or Markdown format. Third-party browser extensions like “Recipe to Mealie” can also batch import.
- OCR Scanning: Use the mobile-friendly web interface to photograph a physical recipe card; Mealie can extract text via integrated Tesseract OCR (requires additional configuration).
Organize recipes using categories (e.g., “Dinner,” “Dessert”), tags (e.g., “Quick,” “Vegetarian”), and tools (e.g., “Instant Pot”). This taxonomy drives the meal planner’s filtering system.
Step 6: Mastering the Meal Planner for Weekly Success
The meal planner is Mealie’s core family feature. Navigate to Meal Plan and click Create Plan. You can:
- Select a date range (e.g., Monday to Sunday).
- Assign recipes from your database. Use filters like “Category = Dinner” and “Tags = Quick” to narrow choices.
- Set servings per recipe. Mealie scales ingredient quantities automatically.
- Add notes (e.g., “Prep broccoli night before”).
- Schedule leftovers by marking an existing meal as a “leftover” day.
For repetitive planning, schedule Recipe Styles like “Pizza Friday” or “Taco Tuesday” to auto-populate weekly. The Random Meal button can generate a week’s plan from your entire collection—useful for overcoming decision fatigue.
Step 7: Automating Shopping Lists and Grocery Management
Once meals are planned, generate a comprehensive shopping list:
- Click Meal Plan > Generate Shopping List.
- Mealie aggregates all ingredients from the selected meals, removing duplicates and combining quantities (e.g., two recipes calling for “1 cup flour” become “2 cups flour”).
- Organize the list by category (e.g., Produce, Dairy) or aisle (customizable in Settings > Shopping List).
- Share the list via a unique link, email, or print it. Family members can check off items as they shop.
Advanced users can integrate with grocery delivery APIs via Mealie’s webhook system (requires middleware). For in-store shopping, the mobile-responsive web app works well on smartphones.
Step 8: Enabling Multi-User Access and Permissions
To turn meal planning into a collaborative family activity:
- Settings > Users > Add User.
- Assign roles: Admin (full control), User (can manage their own recipes and plans), or Viewer (read-only access).
- Each user can set dietary restrictions in their profile—Mealie will flag recipes that conflict (e.g., gluten-free, nut-free).
- Enable Households to create separate meal plans for different groups (e.g., one for parents, one for kids). This requires enabling the feature in Settings > General > Enable Households.
Step 9: Backup and Disaster Recovery
Data loss protection is non-negotiable. Mealie automatically creates daily SQLite or PostgreSQL backups in the backups/ directory. For additional safety:
- Add a cron job to copy backups to a remote location:
0 2 * * * rsync -avz ~/mealie/backups/ user@remote-server:/path/to/backups/ - Use
docker exec mealie mealie db backupto trigger a manual backup before major changes. - To restore, stop Mealie, replace the
data/directory with your backup, and restart. Test restoration periodically.
Step 10: Optimizing Performance and Storage
As your recipe library grows, consider these performance tweaks:
- Enable PostgreSQL: Edit
docker-compose.ymlto add a Postgres service. This improves query speed for large databases. - Reduce image sizes: Mealie compresses uploaded images on-the-fly; ensure your server has at least 1GB RAM for image processing.
- Use a CDN: For external access, serve static assets (images, CSS) via Cloudflare or a similar CDN to reduce server load.
- Disable unused features: In Settings > General, disable OCR, OpenAPI docs, or webhooks if not needed.
Monitor resource usage with docker stats mealie. Typical idle consumption is ~150MB RAM and minimal CPU.
Troubleshooting Common Issues
- Cannot log in: Clear browser cookies or use an incognito window. Ensure
BASE_URLis correct. - Import fails: Check that the source URL is accessible. Some sites block automated scraping; try importing the raw HTML or Markdown.
- Docker container exits immediately: Run
docker logs mealieto see errors. Common causes include permission issues (wrong PUID/PGID) or port conflicts (change the host port). - Slow performance: Upgrade to PostgreSQL, increase RAM, or prune unused recipes via Settings > Recipes > Manage Recipes.
Extending Mealie with Integrations
Mealie’s API allows integration with smart home systems. For example:
- Home Assistant: Add Mealie to your dashboard via the built-in webhook or REST API.
- Calendar apps: Export meal plans as an iCal feed (found at
https://your-URL/api/meal-plans/ical). - IoT grocery lists: Use a Raspberry Pi with a screen to display the shopping list via Mealie’s public share links.
The developer community also maintains plugins for Nextcloud, Obsidian, and Tandoor (another recipe manager), though these require manual setup.
Maintaining Your Mealie Instance
Regular maintenance ensures longevity:
- Update Mealie: Check for new releases monthly. Run
docker compose pull && docker compose up -dto upgrade. - Purge unused data: Delete orphaned images and unused recipes quarterly via the admin panel.
- Monitor logs: Use
journalctl -u dockeror a log aggregator like Loki for centralized logging. - Review security: Keep your server OS patched, limit SSH access to key-only, and use a firewall (UFW) to block all ports except 22, 80, 443, and 9925.