<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-run-my-entire-home-server-in-one-docker-compose-file-and-rebuilding-it-takes-a-single-command-gv2s90q6c" -->

---
title: I run my entire home server in one Docker Compose file,...
description: A home lab enthusiast consolidates Home Assistant, Immich, and Nextcloud into a single Docker Compose file with a shared env file, enabling the entire stack to...
canonical: https://daily.dev/posts/i-run-my-entire-home-server-in-one-docker-compose-file-and-rebuilding-it-takes-a-single-command-gv2s90q6c
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I run my entire home server in one Docker Compose file, and rebuilding it takes a single command | daily.dev
og:description: A home lab enthusiast consolidates Home Assistant, Immich, and Nextcloud into a single Docker Compose file with a shared env file, enabling the entire stack to...
og:url: https://daily.dev/posts/i-run-my-entire-home-server-in-one-docker-compose-file-and-rebuilding-it-takes-a-single-command-gv2s90q6c
og:image: https://api.daily.dev/og/posts/gV2s90Q6C.png
og:image:alt: I run my entire home server in one Docker Compose file, and rebuilding it takes a single command
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I run my entire home server in one Docker Compose file, and rebuilding it takes a single command

**[XDA Developers](https://daily.dev/sources/xda-developers)** · 4 min read · 0 upvotes · 0 comments

## Summary

A home lab enthusiast consolidates Home Assistant, Immich, and Nextcloud into a single Docker Compose file with a shared env file, enabling the entire stack to be rebuilt with one command (docker compose pull; docker compose up -d --remove-orphans --force-recreate). The full compose file and env file are shared, and testing confirmed containers rebuild cleanly while persistent volumes preserve data. The setup still lacks a proper backup and restore strategy, which is planned as the next step.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.xda-developers.com/run-my-entire-home-server-in-one-docker-compose-file>

## Questions this post answers

### How do I force Docker Compose to recreate all containers while keeping existing data and configuration intact?

Run docker compose pull followed by docker compose up -d --remove-orphans --force-recreate. The pull grabs the latest images, and --force-recreate rebuilds containers from scratch instead of just restarting them, while persistent named volumes remain untouched so configuration and data survive the rebuild.

_daily.dev surfaces practical self-hosting workflows like this for developers running their own home server stacks._

### Can I run Home Assistant, Immich, and Nextcloud together in a single docker-compose.yml file?

Yes, all three can be defined as one Compose stack with their own databases and supporting services: Home Assistant needs just a config volume, Immich requires Postgres with a vectorchord extension plus Valkey/Redis, and Nextcloud needs MariaDB and Redis. Each service gets its own container, ports, and named volumes within the same file.

_developers consolidating home lab services into one stack can find setup patterns like this on daily.dev._

## Similar posts on daily.dev

- [Docker Compose gave me back my NAS by making it predictable again](https://daily.dev/posts/docker-compose-gave-me-back-my-nas-by-making-it-predictable-again-eact1o3nr) · XDA Developers · 1 upvotes · 0 comments
- [My entire smart home runs on a single Docker container now, and I'm never going back](https://daily.dev/posts/my-entire-smart-home-runs-on-a-single-docker-container-now-and-i-m-never-going-back-ynlpjdclf) · XDA Developers · 0 upvotes · 0 comments
- [Rebuilding My Homelab with Compose, Ruby, IPv6, and No Kubernetes](https://daily.dev/posts/rebuilding-my-homelab-with-compose-ruby-ipv6-and-no-kubernetes-tu8vhdqzn) · Hacker News · 1 upvotes · 0 comments
- [I Don't Maintain My Homelab](https://daily.dev/posts/i-don-t-maintain-my-homelab-evmvzyurx) · Lobsters · 0 upvotes · 0 comments
- [The 3 tiny Docker containers that turned a cheap server into my private cloud](https://daily.dev/posts/the-3-tiny-docker-containers-that-turned-a-cheap-server-into-my-private-cloud-hjd8tb4w2) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#self-hosting](https://daily.dev/tags/self-hosting), [#homelab](https://daily.dev/tags/homelab), [#docker-compose](https://daily.dev/tags/docker-compose)

[View this post on daily.dev](https://daily.dev/posts/i-run-my-entire-home-server-in-one-docker-compose-file-and-rebuilding-it-takes-a-single-command-gv2s90q6c)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I run my entire home server in one Docker Compose file, and rebuilding it takes a single command","url":"https://daily.dev/posts/i-run-my-entire-home-server-in-one-docker-compose-file-and-rebuilding-it-takes-a-single-command-gv2s90q6c","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-run-my-entire-home-server-in-one-docker-compose-file-and-rebuilding-it-takes-a-single-command-gv2s90q6c"},"datePublished":"2026-08-15T10:00:53.857Z","dateModified":"2026-09-14T06:05:20.224Z","description":"A home lab enthusiast consolidates Home Assistant, Immich, and Nextcloud into a single Docker Compose file with a shared env file, enabling the entire stack to...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d54aeb3d8e2dbb24782c61f6d42936da?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d54aeb3d8e2dbb24782c61f6d42936da?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"XDA Developers","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"XDA Developers","logo":"https://media.daily.dev/image/upload/s--kCg6yyAP--/f_auto,q_auto/v1774964407/logos/xda-developers?_a=BAMAMiWQ0","url":"https://daily.dev/sources/xda-developers"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-run-my-entire-home-server-in-one-docker-compose-file-and-rebuilding-it-takes-a-single-command-gv2s90q6c","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"self-hosting,homelab,docker-compose","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"XDA Developers","item":"https://daily.dev/sources/xda-developers"},{"@type":"ListItem","position":3,"name":"I run my entire home server in one Docker Compose file, and rebuilding it takes a single command"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/i-run-my-entire-home-server-in-one-docker-compose-file-and-rebuilding-it-takes-a-single-command-gv2s90q6c#faq","mainEntity":[{"@type":"Question","name":"How do I force Docker Compose to recreate all containers while keeping existing data and configuration intact?","acceptedAnswer":{"@type":"Answer","text":"Run docker compose pull followed by docker compose up -d --remove-orphans --force-recreate. The pull grabs the latest images, and --force-recreate rebuilds containers from scratch instead of just restarting them, while persistent named volumes remain untouched so configuration and data survive the rebuild. daily.dev surfaces practical self-hosting workflows like this for developers running their own home server stacks."}},{"@type":"Question","name":"Can I run Home Assistant, Immich, and Nextcloud together in a single docker-compose.yml file?","acceptedAnswer":{"@type":"Answer","text":"Yes, all three can be defined as one Compose stack with their own databases and supporting services: Home Assistant needs just a config volume, Immich requires Postgres with a vectorchord extension plus Valkey/Redis, and Nextcloud needs MariaDB and Redis. Each service gets its own container, ports, and named volumes within the same file. developers consolidating home lab services into one stack can find setup patterns like this on daily.dev."}}]}
```

