# Synology with Portainer or Dockhand

Maintainer: <https://github.com/doctorjz>

{% hint style="warning" %}
Community pages and scripts are **not maintained, reviewed, or supported by CrossWatch**.

Read them before you run them.

Fixes, updates, and support depend on the original author.
{% endhint %}

### Overview

This setup runs CrossWatch on Synology with Container Manager, Portainer, or Dockhand.

It uses a persistent bind mount for `/config`.

It also aligns container file ownership with your Synology user.

### Why this setup is needed

Synology bind mounts can fail when the container user cannot write to the shared folder.

Set the container user to your Synology `UID:GID`.

If you use `PUID` and `PGID` variables in your stack, keep them aligned with that same `UID:GID`.

### Prerequisites

1. A Synology NAS with Container Manager, Portainer, or Dockhand working
2. A folder for CrossWatch config data
   * Example: `/volume1/docker/crosswatch`
3. Your Synology user ID and group ID
4. A free port for the web UI
   * Default: `8787`

### Installation

1. Create a folder for CrossWatch data on your NAS.
2. Find your Synology `UID` and `GID`.
3. Create a new stack in Portainer or Dockhand.
4. Use the official CrossWatch image.
5. Mount your Synology folder to `/config`.
6. Set the container user to your Synology `UID:GID`.
7. Expose port `8787`.
8. Deploy the stack.

Use a stack like this as the baseline:

```yaml
services:
  crosswatch:
    image: cenodude/crosswatch:latest
    container_name: crosswatch
    user: "1000:100"  # This forces the container to start as this user, change to your values
    environment:
      - TZ=America/Los_Angeles
      - PUID=1000 # changeme
      - PGID=100 # changeme
    volumes:
      - /volume1/docker/crosswatch:/config:rw # Added :rw for explicit Read/Write
    ports:
      - 8787:8787 
    restart: unless-stopped
```

After deployment completes, open CrossWatch in your browser:

```
http://<synology-ip>:8787
```

### Recommended container settings

Use these values unless you have a reason to change them:

1. Network port, `8787`
2. Persistent config path, `/config`
3. Restart policy, `unless-stopped`
4. Container user, your Synology `UID:GID`

### Important paths

1. Synology config folder, `/volume1/docker/crosswatch` example
2. Container config path, `/config`

### Notes

This is a container deployment, not a native Synology package.

Permission issues are the most common problem on Synology.

If CrossWatch cannot write to `/config`, check the folder owner, ACLs, and the container user.

Use [Docker setup](https://wiki.crosswatch.app/getting-started/docker-setup) if you want the official baseline first.
