Common Ignore Patterns
This is a curated reference of ready-to-use .stignore patterns for the most common Syncthing deployment scenarios. Copy and adapt these into your folder's .stignore file.
A good .stignore reduces unnecessary file churn (fewer network operations), prevents syncing sensitive credentials or runtime state, and stops Syncthing from wasting CPU on files that change constantly and never need to be replicated.
Why Ignoring Files Matters
Without ignores, Syncthing syncs everything — including:
- Application caches (change constantly, waste bandwidth)
- Temp files and lock files (invalid on remote nodes)
- Environment secrets like
.envfiles (security risk) - Build artifacts already reproducible on the remote
Adding a thoughtful .stignore makes your sync faster, cheaper, and safer.
Web Server: WordPress
// === WordPress: ignore runtime state ===
// WP cache dirs (cache plugins: W3TC, LiteSpeed, WP Rocket)
/wp-content/cache/
/wp-content/litespeed/
/wp-content/wpo-cache/
// Uploads subdirectory caches (if using CDN)
/wp-content/uploads/cache/
// WordPress debug log
/wp-content/debug.log
// Upgrade working directory
/wp-content/upgrade/
// Session files
/wp-content/sessions/
// SQLite (if using WP SQLite DB plugin)
*.db-wal
*.db-shm
// PHP-generated temp
*.tmp
General Web Application
// === App runtime state ===
*.log
*.tmp
*.pid
// Storage caches
/storage/framework/cache/
/storage/framework/sessions/
/storage/framework/views/
// Laravel / Symfony
/bootstrap/cache/
/.env ← NEVER sync credentials
/.env.local
/.env.production
// Python
__pycache__/
*.pyc
.venv/
// Node
node_modules/
npm-debug.log
yarn-error.log
Never sync .env files that contain production database passwords, API keys, or secret tokens. If your .env contains credentials, add .env to .stignore on all production devices.
Development Projects
// === Build artifacts ===
dist/
build/
out/
target/ // Rust, Java Maven
.next/ // Next.js
.nuxt/ // Nuxt.js
.svelte-kit/
// === Dependencies ===
node_modules/
vendor/ // PHP Composer
.venv/ // Python virtualenv
// === IDE ===
.idea/
.vscode/
*.iml
// === OS artifacts ===
.DS_Store
Thumbs.db
desktop.ini
// === Editor temp ===
*.swp
*.swo
.~lock.*
~$*
Media Library (Photos / Videos)
// Thumbnail caches (generated by Plex, Jellyfin, etc.)
/metadata/
/@eaDir/ // Synology NAS thumbnail directory
.@__thumb/ // QNAP thumbnail directory
// Adobe Lightroom catalog lock
*.lrcat-lock
*.lrdata/
// Darktable exports (if keeping masters only)
/export/
// macOS resource forks
._*
.Spotlight-V100
.Trashes
Database and Secrets
// === Credentials (NEVER sync these) ===
.env
.env.*
*.pem
*.key
id_rsa
id_ed25519
*_rsa
credentials.json
// === Live database files (sync dumps instead) ===
*.db-wal
*.db-shm
*.db-journal
/mysql/
/data/ // PostgreSQL data directory
// === Certificate files ===
*.crt
*.csr
systemd / Config Management
// Never sync runtime state
/run/
/proc/
/sys/
// Machine-specific files
/etc/hostname
/etc/machine-id
/etc/network/interfaces
// SSH host keys (machine-specific, never replicate)
/etc/ssh/ssh_host_*_key
/etc/ssh/ssh_host_*_key.pub
Applying and Testing Ignore Patterns
After editing .stignore, trigger a rescan:
# Force Syncthing to rescan and re-apply ignore rules
curl -s -X POST "http://127.0.0.1:8384/rest/db/scan?folder=FOLDER_ID" \
-H "X-API-Key: YOUR_API_KEY"
Check which files are currently ignored by looking at the folder status in the GUI
(Folder → Edit → Ignored Items or Local State → count of ignored files).