---
title: Operating Shopware on Shopware PaaS | Shopware Community Hub
description: >-
  Learn how to effectively operate Shopware on Shopware PaaS, including
  infrastructure setup and basic configuration.
canonical_url: 'https://hub.shopware.com/learn/unit/paas-operating'
---

# Operating Shopware on Shopware PaaS

<LearningObjectives>

- Configure Shopware PaaS infrastructure for Shopware.
- Set up essential services and components
- Implement basic performance optimization
- Configure proper environment settings

</LearningObjectives>

# Operating Shopware on Shopware PaaS: Building a Reliable Foundation

Now that you understand how to configure, deploy, and automate your Shopware applications, it's time to learn how to operate them effectively in production. Operating Shopware on Shopware PaaS is about more than just running code—it's about creating a stable, secure, and high-performing environment for your shop.

In this unit, you'll learn how to configure your PaaS infrastructure, set up essential services, and implement performance optimization techniques. Whether you're launching a new project or managing a live shop, understanding the operational essentials will help you avoid surprises and keep your shop running smoothly.

<Callout title="Why Operations Matter" type="info">
  
A well-operated Shopware environment means less downtime, better performance, and fewer late-night emergencies. Shopware PaaS takes care of the infrastructure, but you control how your shop is configured and optimized.

</Callout>

## Understanding the Shopware PaaS Infrastructure

Shopware PaaS provides a managed environment for Shopware, handling the heavy lifting of servers, databases, and core services. But you still need to know how these pieces fit together and how to configure them for your needs.

**Key components include:**

- **Web Server**: Managed NGINX/Apache
- **Database**: MariaDB 10.11+
- **Caching**: Redis 7.0+ for sessions and caching
- **Search**: OpenSearch 1.0+ or Elasticsearch 7.8+
- **CDN**: Fastly (for global performance)

<Callout title="Advanced Service Configuration" type="info">

For detailed service configuration options, refer to the Platform.sh documentation:

- [Elasticsearch configuration](https://fixed.docs.upsun.com/add-services/elasticsearch.html) for advanced search features
- [RabbitMQ setup](https://fixed.docs.upsun.com/add-services/rabbitmq.html) for message queuing
- [Fastly CDN integration](https://fixed.docs.upsun.com/domains/cdn/fastly.html) for global performance

</Callout>

## Setting Up: Essential Configuration Files

When you start a new Shopware project on Shopware PaaS, three files are your foundation:

1. `.platform/applications.yaml` — Defines your application, build, and deploy hooks
2. `.platform/services.yaml` — Configures your database, Redis, and other services
3. `.platform/routes.yaml` — Sets up routing and domains

**Typical Resource Allocation for Shopware:**

- **Development**: Size `M` (0.5 CPU, 512 MB RAM), 1 GB disk
- **Staging**: Size `L` (1 CPU, 1024 MB RAM), 2 GB disk  
- **Production**: Size `XL` (2 CPU, 2048 MB RAM), 4+ GB disk

**Example:**

```yaml
# .platform.app.yaml
hooks:
  build: |
    set -e
    php bin/console assets:install --no-debug
  deploy: |
    set -e
    php bin/console cache:clear
    php bin/console doctrine:migrations:migrate --no-interaction
```

```yaml
# .platform/services.yaml
db:
  type: mariadb:10.11
  disk: 2048
  configuration:
    properties:
      optimizer_switch: "rowid_filter=off"
      optimizer_use_condition_selectivity: 1
```

```yaml
# .platform/routes.yaml
"https://{default}/":
    type: upstream
    upstream: "app:http"
```

## Performance Optimization: Caching and Beyond

A fast shop is a successful shop. Shopware PaaS and Shopware support multi-level caching and database optimization to keep your shop responsive, even during peak times.

**Scenario:**
Your shop is running slow during a sale. By enabling Redis caching and optimizing your database, you can handle more traffic without upgrading your plan.

### Multi-Level Caching

- **CDN Layer (Fastly)**: Caches static assets and speeds up global delivery.
- **Application Cache (Redis)**: Handles sessions, object, and page caching.
- **Database Optimization**: Indexes, query tuning, and buffer pools.

**Example Redis Configuration:**

```yaml
cache:
    type: redis:7.0
    configuration:
        maxmemory_policy: "volatile-lfu"
```

<Callout title="Performance Tip" type="info">
  
Enable Redis for caching and Fastly as CDN in production for optimal performance. Monitor cache hit rates and fine-tune configuration as needed.

</Callout>

## Real-World Exercise: Setting Up Your Environment

1. Clone the Shopware repository and create a Shopware PaaS project:

    ```bash
    git clone https://github.com/shopware/platform.git
    shopware project:create
    shopware push
    ```

2. Add and configure essential services:

    ```bash
    shopware service:add redis
    shopware service:add elasticsearch
    ```

## Common Pitfalls and How to Avoid Them

- **Missing services**: Double-check that Redis and search are enabled for production.
- **Default configs**: Always review and customize the default Platform.sh configs for your shop's needs.
- **Ignoring performance**: Monitor your shop's performance and optimize before issues arise.

## Additional Resources

- [Platform.sh Documentation](https://fixed.docs.upsun.com/)
- [Shopware PaaS Guide](https://developer.shopware.com/docs/products/paas/shopware-paas/#getting-started-with-shopware-paas-how-to-deploy-your-first-project)
- [Blackfire Performance Monitoring](https://fixed.docs.upsun.com/increase-observability/integrate-observability/blackfire.html)
- [Shopware Documentation](https://docs.shopware.com/en)
- [Platform.sh CLI Reference](https://fixed.docs.upsun.com/administration/cli.html)

## Key Takeaways

- **Infrastructure Understanding**: Know how Shopware PaaS components work together.
- **Configuration Management**: Master the essential configuration files for production environments.
- **Performance Optimization**: Implement caching and optimization strategies.
- **Service Integration**: Understand how to configure and use essential services like Redis and Elasticsearch.

## Next Steps

Now that you understand how to operate your Shopware environment effectively, it's time to learn how to scale it to handle growth.

In the next learning unit, we'll explore scaling strategies and how to configure your application to handle increased traffic and performance demands.
