Index: src/routes/activitypub.js
===================================================================
--- src/routes/activitypub.js	(revision 2a17f0a714ea476a1c6090cbbad470e9a2d46104)
+++ src/routes/activitypub.js	(revision e2c3d09c54bd06c4a04e4c72e4ff59aa9374b705)
@@ -23,6 +23,6 @@
 import path from 'path';
 import fs from 'fs';
-import { fileURLToPath } from 'url';
 import { randomUUID } from 'crypto';
+import { mediaDir } from '../config/paths.js';
 
 const router = express.Router();
@@ -422,8 +422,5 @@
 // AP convention) into the same store the reply editor uses, and gets back
 // { url, mediaType, name } to attach on a note (e.g. the help-buoy capture).
-const AP_MEDIA_DIR = path.resolve(
-  process.env.REPLY_MEDIA_PATH ||
-  path.join(path.dirname(fileURLToPath(import.meta.url)), '..', '..', 'storage', 'media', 'reply-media')
-);
+const AP_MEDIA_DIR = mediaDir('REPLY_MEDIA_PATH', 'reply-media');
 fs.mkdirSync(AP_MEDIA_DIR, { recursive: true });
 const AP_MEDIA_EXT = new Set(['.jpg', '.jpeg', '.png', '.webp', '.gif', '.mp3', '.m4a', '.ogg', '.opus', '.flac', '.wav', '.mp4', '.webm', '.mov']);
