# Best practices for users when deploying Shopware 6

**URL:** <https://forum.shopware.com/t/best-practices-for-users-when-deploying-shopware-6/107150>\
**Category:** Installation / Getting Started (EN)\
**Created:** [5. Mai 2025 um 09:36 UTC](https://forum.shopware.com/t/best-practices-for-users-when-deploying-shopware-6/107150 "2025-05-05T09:36:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wienhoefer](https://avatars.discourse-cdn.com/v4/letter/w/a3d4f5/32.png) [@wienhoefer](https://forum.shopware.com/u/wienhoefer)\
**Post date:** [5. Mai 2025 um 09:36 UTC](https://forum.shopware.com/t/best-practices-for-users-when-deploying-shopware-6/107150/1 "2025-05-05T09:36:32Z")

</div>

Hi,

we are currently trying to implement a workflow for deploying our Shopware 6 instance to a Ubuntu server from a Gitlab repo using Deployer.

The deployment seems to work fine, problems still arise with the users that we are using:

The deployment is done via a user „deployer“ that can login via SSH key and is able to sudo. The nginx webserver uses „www-data“ for the vhost. Adter deployment all files belong to „deployer“, which is a problem, since Shopware needs to write files etc. during operation. Assuming the directory „current“ needs to belong to „www-data“, we saw that Deployer is already able to chmod the files to the local user after deployment. This would need an elevation of rights though, which in turn would need a password (instead of the SSH key) and couldn’t be done automatically.

What would be the best practice approach here? Running nginx with a different user? Adjusting any group memberships/rights/etc.?

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [5. Mai 2025 um 09:46 UTC](https://forum.shopware.com/t/best-practices-for-users-when-deploying-shopware-6/107150/2 "2025-05-05T09:46:10Z")

</div>

> **[Deployment with Deployer | Shopware Documentation](https://developer.shopware.com/docs/guides/hosting/installation-updates/deployments/deployment-with-deployer.html)**
>
> Documentation for Shopware developers

See the part with `->set('http_user', 'www-data') // Not needed, if the `user` is the same user, the webserver is running with`

---

<div class="post-metadata">

**Author:** ![wienhoefer](https://avatars.discourse-cdn.com/v4/letter/w/a3d4f5/32.png) [@wienhoefer](https://forum.shopware.com/u/wienhoefer)\
**Post date:** [5. Mai 2025 um 12:47 UTC](https://forum.shopware.com/t/best-practices-for-users-when-deploying-shopware-6/107150/3 "2025-05-05T12:47:35Z")

</div>

Hi @Max_Shop ,

I have seen the article but am wondering, what exactly this setting does. Also does „deployer“ need to be in the „www-data“ group?

What else ist needed (in terms of user rights) to correctly deploy as „deployer“ but running nginx as „www-data“?

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [5. Mai 2025 um 12:59 UTC](https://forum.shopware.com/t/best-practices-for-users-when-deploying-shopware-6/107150/4 "2025-05-05T12:59:04Z")

</div>

I have never used Deployer, thus I cannot tell you what is needed. I guess that manual/code contains all necessary steps.

Looking at that line of code it changes the file permissions to www-data. So you should be fine running Deployer with any user.

---

<div class="post-metadata">

**Author:** ![marco.steinhaeuser](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/marco.steinhaeuser/32/14512_2.png) [@marco.steinhaeuser](https://forum.shopware.com/u/marco.steinhaeuser)\
**Post date:** [8. Mai 2025 um 10:36 UTC](https://forum.shopware.com/t/best-practices-for-users-when-deploying-shopware-6/107150/5 "2025-05-08T10:36:00Z")

</div>

You could try adding the user ‚deployer‘ to the ‚www-data‘ group 😉
