> For the complete documentation index, see [llms.txt](https://docs.hivel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hivel.ai/self-managed-hivel-deployment/on-premises-generic/hivel-on-premises-deployment-guide-generic/deployment/method-2-docker-compose-directly.md).

# Method 2 - Docker Compose Directly

Use this method only if you require direct container management for custom orchestration or staged rollouts. You must manage the shared Docker network and per-service startup ordering yourself.

***

#### Prerequisites

* Registry authentication configured in [Registry Access Configuration](https://docs.hivel.ai/self-managed-hivel-deployment/on-premises/registry-access-configuration)
* `.env` file created in [Environment Configuration](https://docs.hivel.ai/self-managed-hivel-deployment/on-premises/environment-configuration)

### Steps:

<pre><code># 1. Authenticate with your registry - see <a data-footnote-ref href="#user-content-fn-1">Registry Access Configuration</a>

# 2. Create the shared network
docker network create microservices_network

# 3. Deploy the Host 
cd /opt/hivel-onprem/services/vm
docker-compose --env-file ../../config/.env pull
docker-compose --env-file ../../config/.env up -d
docker-compose --env-file ../../config/.env up -d auth-svc   # or a single service
</code></pre>

**Success:** All services show as `Up`\
**Failure:** One or more services show as `Exited` or `Restarting`<br>

{% columns %}
{% column %} <a href="/self-managed-hivel-deployment/on-premises-generic/hivel-on-premises-deployment-guide-generic/deployment/method-1-deploy.sh-recommended.md" class="button primary" data-icon="backward">Back to Method 1 - deploy.sh (Recommended)</a>
{% endcolumn %}

{% column %}

{% endcolumn %}

{% column %} <a href="/self-managed-hivel-deployment/on-premises-generic/hivel-on-premises-deployment-guide-generic/log-rotation-setup.md" class="button primary" data-icon="forward">Log Rotation Setup</a>
{% endcolumn %}
{% endcolumns %}

[^1]:
