Self-host Mealie
Self-hosted recipe manager, meal planner and shopping list with a web interface and a REST API. Run your own Mealie on an always-on EnvHaven workspace by asking its coding agent: one request installs it, puts it on an HTTPS address and locks it down. What the agent takes care of, and the manual route.
Updated November 23, 2026
Running your own Mealie usually means a list of server chores: a machine that stays on, Docker or a runtime, a reverse proxy with certificates, a domain, and the settings that make Mealie behave behind all of it. On an EnvHaven workspace you skip the list. You ask the coding agent, and it does the work while you watch.
Just ask your agent
Open a Plus workspace (Mealie runs in Docker, which Plus and Pro include), tap Launch to start any coding agent (Claude Code, Codex, OpenCode or another), and ask it:
Set up Mealie on this workspace and give me the link. Follow https://envhaven.com/self-host/mealie.md
Then open the link it sends and create your Mealie account straight away, before anyone else finds the address. That is the whole request: the address in it is this page’s Markdown copy, and the agent follows the instructions for it further down, with every setting Mealie’s docs require.
Or keep it private with Tailscale
The preview URL puts Mealie on the public internet, which suits something other people need to reach. For an app only you and your household use, your tailnet is the better home: Tailscale gives Mealie an HTTPS address that only your own devices, signed in to your Tailscale account, can open. Save a Tailscale auth key in the workspace’s Vars pane as TS_AUTHKEY, and ask the agent:
Set up Mealie on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/mealie.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
- A Tailscale container runs beside Mealie, so it keeps its private address through workspace restarts and updates, and every app you set up this way gets an address of its own.
- Anything other services have to reach, such as a webhook, still needs a public address. Keep self-hosted apps private with Tailscale covers both, and what Tailscale’s free plan includes.
| At a glance | |
|---|---|
| What it is | Home, money and everyday life |
| License | AGPL-3.0 |
| Runs as | Docker (ghcr.io/mealie-recipes/mealie) |
| Memory | Not documented |
| Plan that fits | Plus or larger |
| Web port | 9000 |
| Documentation | docs.mealie.io/documentation/getting-started/installation/installation-checklist/ |
What your agent takes care of
- Installing it. Mealie runs from the official image,
ghcr.io/mealie-recipes/mealie, with its data in folders under~/apps/mealie. - Putting it on an HTTPS address. The workspace’s preview URL serves it, and your own domain can too.
- Locking it down first. What Mealie’s docs say to set before it faces the internet, below.
- Telling you what to back up: /app/data in the container (volume mealie-data): SQLite database, recipe images and backup zip files and PostgreSQL data volume (mealie-pgdata) when the Postgres variant is used (docs).
The settings it needs behind a proxy
BASE_URL(default http://localhost:8080): The public address of the instance, used for notification links and the OIDC callback URL. (docs)HOST_IP(default *): Proxy IP addresses or CIDR ranges trusted for X-Forwarded-For and X-Forwarded-Proto; the default trusts every source, so set it when the proxy address is known. (docs)MAX_UPLOAD_SIZE_MB(default 1024): Largest upload the API accepts, in MiB; the proxy or tunnel in front needs a matching limit. (docs)ALLOW_SIGNUP(default false): Whether new users can sign up without an invitation token. (docs)API_PORT(default 9000): The port the backend listens on; leave it alone in Docker and map the host port instead. (docs)
Before it faces the internet
- A default admin account exists; change its email and password immediately after the first login. (docs)
- Sign-ups are off by default. (docs)
- The API has no rate limiting by default. (docs)
- Login lockout after repeated failures is configurable. (docs)
- Forwarded headers are trusted from every source by default; restrict HOST_IP when the proxy is known. (docs)
Things to ask next
Everything after the install is one more sentence to the agent. Some that come up:
- “Import last year’s data from the CSV I dropped into the workspace.”
- “Set up a second account for the household.”
- “Move Mealie to app.example.com.” Add the domain on the dashboard’s Domains page with a CNAME to
domains.envhaven.app, and the agent changes Mealie’s address settings to match. - “Update Mealie to the latest release.” It pulls the new image and recreates the container, data kept.
Instructions for the agent
The agent reads these from the page’s Markdown copy. They also work pasted on their own, if you would rather give them in your own words.
Set up Mealie on this workspace and serve it at my preview URL.
- Use Docker Compose with the official image, ghcr.io/mealie-recipes/mealie, starting from the docs' compose file: https://docs.mealie.io/documentation/getting-started/installation/sqlite/. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- Keep the compose file in ~/apps/mealie and all of its data in folders there (bind mounts, not named volumes), with restart: unless-stopped on every service.
- This server has no firewall, so publish no port on its public IP, and drop host networking and privileged mode from the docs' compose file. Docker runs on the host: connect this workspace to the compose network and relay my preview URL's port to Mealie's port 9000.
- The preview URL terminates HTTPS in front of Mealie: serve plain HTTP on its port, and trust the forwarded headers the relay passes on.
- Set what "The settings it needs behind a proxy" lists on https://envhaven.com/self-host/mealie.md for the preview URL, as Mealie's docs describe for running behind a proxy; skip any that apply only when Mealie serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/mealie.md.
- When it answers at the preview URL, send me the link and tell me what to back up.
- If I asked for my tailnet instead of the preview URL, set Mealie up the same way but follow https://envhaven.com/guides/self-host-privately-with-tailscale.md for the network: no preview URL, no relay.
What to know
- In Docker, Mealie’s containers keep running when the workspace restarts or updates. The relay from the preview URL is a process in the workspace, so after a restart or an update, ask the agent to restore it.
- Uploads above the proxy’s own limit fail before reaching Mealie, so a tunnel body cap lower than MAX_UPLOAD_SIZE_MB (default 1024 MiB) wins. (docs)
- Recipe import fetches pages from the server’s own IP; sites can block by IP, and the backend config offers an outbound proxy setting (SCRAPER_PROXY_URL) for that. (docs)
- Email (invitations, password resets) needs SMTP settings; it is off until configured. (docs)
- SQLite should not sit on network-attached storage; use PostgreSQL there. (docs)
- Mealie expects its own host rather than a path under one, so it takes the workspace’s preview URL or a domain of its own.
- A workspace has one preview URL and one custom domain, both serving the same port, so it puts one app on a public address at a time.
Without a workspace
The manual route, on a server you run:
- Rent a Linux VPS, secure SSH, and create a user for the app.
- Install Docker and write a compose file from the official image.
- Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
- Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
- Keep the firewall closed except for the proxy, and schedule backups and updates.
Mealie’s own documentation covers each step for its install methods.
Sources
Facts about Mealie come from its own documentation, checked on 2026-11-23:
- docs.mealie.io/documentation/getting-started/installation/installation-checklist
- docs.mealie.io/documentation/getting-started/installation/backend-config
- docs.mealie.io/documentation/getting-started/faq
- docs.mealie.io/documentation/getting-started/installation/sqlite
- docs.mealie.io/documentation/getting-started/installation/security