I'm trying to set up Syncthing to upload files to my JellyFin server. Both Syncthing and JellyFin are running in Docker containers on the same LXC, but I'm having trouble sharing files between them. I updated my docker-compose.yml file to add the necessary volume for Syncthing, but it's still not working. Here's a snippet of my docker-compose configuration:
```yaml
services:
nginxproxymanager:
image: 'jc21/nginx-proxy-manager:latest'
container_name: nginxproxymanager
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./nginx/data:/data
- ./nginx/letsencrypt:/etc/letsencrypt
jellyfin:
image: 'lscr.io/linuxserver/jellyfin:latest'
container_name: jellyfin
environment:
- PUID=1000
- PGID=1000
volumes:
- ./jellyfin/config:/config
- ./jellyfin/tvshows:/data/tvshows
- ./jellyfin/movies:/data/movies
- ./jellyfin/music:/data/music
restart: unless-stopped
syncthing:
image: 'lscr.io/linuxserver/syncthing:latest'
container_name: syncthing
environment:
- PUID=1000
- PGID=1000
volumes:
- ./syncthing/config:/config
- ./jellyfin/music:/data/music
- ./jellyfin/movies:/data/movies
- ./jellyfin/tvshows:/data/tvshows
ports:
- 8384:8384
- 22000:22000/tcp
- 22000:22000/udp
- 21027:21027/udp
restart: unless-stopped
```
Can anyone help me understand what I'm doing wrong?
2 Answers
Have you tried defining your volume as an external resource in your docker-compose file? That could help with the permissions issue. Also, consider using a file transfer platform to move files between the services. It might simplify things.
Mixing all your services in one docker-compose file isn't the best approach. It locks you into needing to take everything down just to modify one part. Consider separating your services into individual docker-compose files. You should also create a custom Docker network for them to communicate more effectively. For the volume issue, ensure you're using absolute paths rather than relative paths to avoid confusion.
I agree! It’s smart to separate unrelated services. This will keep your configurations cleaner and easier to manage.