---
title: "Tdarr Server Setup"
description: "Tdarr server container setup guide covering directory structure, hybrid local/network storage strategy, major version upgrade process, and common operational issues."
type: guide
domain: docker
tags: [tdarr, docker, compose, storage, upgrade, server]
---

# Tdarr Server Setup Example

## Directory Structure
```
~/container-data/tdarr/
├── docker-compose.yml
├── stonefish-tdarr-plugins/     # Custom plugins
├── tdarr/
│   ├── server/                  # Local storage
│   ├── configs/
│   └── logs/
└── temp/                        # Local temp if needed
```

## Storage Strategy

### Local Storage (Fast Access)
- **Database**: SQLite requires local filesystem for WAL mode
- **Configs**: Frequently accessed during startup
- **Logs**: Regular writes during operation

### Network Storage (Capacity)
- **Backups**: Infrequent access, large files
- **Media**: Read-only during transcoding
- **Cache**: Temporary transcoding files

## Upgrade Process

### Major Version Upgrades
1. **Backup current state**
   ```bash
   docker-compose down
   cp docker-compose.yml docker-compose.yml.backup
   ```

2. **For clean start** (recommended for major versions):
   ```bash
   # Remove old database
   sudo rm -rf ./tdarr/server
   mkdir -p ./tdarr/server
   
   # Pull latest image
   docker-compose pull
   
   # Start fresh
   docker-compose up -d
   ```

3. **Monitor initialization**
   ```bash
   docker-compose logs -f
   ```

## Common Issues

### Disk Space
- Monitor local database growth
- Regular cleanup of old backups
- Use network storage for large static data

### Permissions
- Container runs as PUID/PGID (usually 0/0)
- Ensure proper ownership of mounted directories
- Use `sudo rm -rf` for root-owned container files

### Network Filesystem Issues
- SQLite incompatible with NFS/SMB for database
- Keep database local, only backups on network
- Monitor transcoding cache disk usage