# Installation

The service can be installed through the Portainer web interface.

<p class="callout info">Learn about [creating a new stack](https://hub.subspace.services/books/portainer/page/creating-a-new-stack "Creating a New Stack").</p>

## Docker Compose

Use the following code to install the service:

```yaml
---
services:
  sonarr:
    image: lscr.io/linuxserver/sonarr:latest
    container_name: sonarr
    network_mode: bridge
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Vancouver
    volumes:
      # Persistent Data
      - /srv/sonarr:/config

      # Media Folders
      - /mnt/television:/mmt/television

      # Downloads Folder
      - /mnt/downloads:/mnt/downloads
    ports:
      - 8989:8989
    restart: unless-stopped
```