diff --git a/package.json b/package.json
index 23bcced515f2c48dd2fca8dc810849a059dab744..e5eb6b81fc5ed8acac0510e881314d5bcb73802e 100644
--- a/package.json
+++ b/package.json
@@ -114,6 +114,7 @@
 		"cssnano": "4.1.10",
 		"dateformat": "3.0.3",
 		"deep-equal": "1.0.1",
+		"deepcopy": "0.6.3",
 		"diskusage": "1.0.0",
 		"double-ended-queue": "2.1.0-0",
 		"elasticsearch": "15.4.1",
diff --git a/src/@types/deepcopy.d.ts b/src/@types/deepcopy.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3eb08d57727ece0c8c35c059084da51c11ecb0ff
--- /dev/null
+++ b/src/@types/deepcopy.d.ts
@@ -0,0 +1,17 @@
+declare module 'deepcopy';
+
+declare namespace deepcopy {
+	type DeepcopyCustomizerValueType = 'Object';
+
+	type DeepcopyCustomizer<T> = (
+		value: T,
+		valueType: DeepcopyCustomizerValueType) => T;
+
+	interface DeepcopyOptions<T> {
+		customizer: DeepcopyCustomizer<T>;
+	}
+
+	export function deepcopy<T>(
+		value: T,
+		options?: DeepcopyOptions<T> | DeepcopyCustomizer<T>): T;
+}
diff --git a/src/misc/deepcopy.ts b/src/misc/deepcopy.ts
deleted file mode 100644
index b3bf09ddb205e325d458715859b2dfb0fd079c7b..0000000000000000000000000000000000000000
--- a/src/misc/deepcopy.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export function deepcopy(x: any) {
-	return JSON.parse(JSON.stringify(x));
-}
diff --git a/src/models/abuse-user-report.ts b/src/models/abuse-user-report.ts
index 5a1530deb3b2c2593e1729b4e7d9c20bdebcd735..f3900d348dc1d647d6af190a0af8d1255e9d38f1 100644
--- a/src/models/abuse-user-report.ts
+++ b/src/models/abuse-user-report.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
 import { pack as packUser } from './user';
diff --git a/src/models/app.ts b/src/models/app.ts
index f46995ea2f8935958d92a21254d9b672bfcd3e77..45d50bccda87b444b14830172b6eff537eff1f11 100644
--- a/src/models/app.ts
+++ b/src/models/app.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import AccessToken from './access-token';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
diff --git a/src/models/auth-session.ts b/src/models/auth-session.ts
index 66454d732e06b6a587889699a7bc8b728e70ddce..428c707470d1bd812024ca9828d110a9f293ca7d 100644
--- a/src/models/auth-session.ts
+++ b/src/models/auth-session.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
 import { pack as packApp } from './app';
diff --git a/src/models/blocking.ts b/src/models/blocking.ts
index a8025c0ca7daa56282897d1d80c93795a058dc16..4bdaa741e95828e872a0097ba4bf2f90f0e0e06b 100644
--- a/src/models/blocking.ts
+++ b/src/models/blocking.ts
@@ -1,7 +1,7 @@
 import * as mongo from 'mongodb';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import { pack as packUser, IUser } from './user';
 
 const Blocking = db.get<IBlocking>('blocking');
diff --git a/src/models/drive-file.ts b/src/models/drive-file.ts
index 626ab4ce4f2ccc1767c70aa397eb34000070f3e6..c31e9a709f2ceed94f042d71a42474d03982f877 100644
--- a/src/models/drive-file.ts
+++ b/src/models/drive-file.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import { pack as packFolder } from './drive-folder';
 import { pack as packUser } from './user';
 import monkDb, { nativeDbConn } from '../db/mongodb';
diff --git a/src/models/drive-folder.ts b/src/models/drive-folder.ts
index f9d599950ac3617f07f5d7f5572ac1b0862751a1..b0f6e4273e2c6372a03bfb9b7460fece32366439 100644
--- a/src/models/drive-folder.ts
+++ b/src/models/drive-folder.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
 import DriveFile from './drive-file';
diff --git a/src/models/favorite.ts b/src/models/favorite.ts
index a7504088fb20cb8e1b3728c032d8277ed697231f..2008edbfaf47625ccd38200fdd1ed272d07e8cd1 100644
--- a/src/models/favorite.ts
+++ b/src/models/favorite.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
 import { pack as packNote } from './note';
diff --git a/src/models/follow-request.ts b/src/models/follow-request.ts
index 8f7c2b0f609929ad931c9920341cdcbf13b27ed4..4f75c63a32285da131504c57b665441df5218680 100644
--- a/src/models/follow-request.ts
+++ b/src/models/follow-request.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
 import { pack as packUser } from './user';
diff --git a/src/models/games/reversi/game.ts b/src/models/games/reversi/game.ts
index 22710424de8c881f0a129ff6fbb85e05974ca9ae..57c493cff50687b9307f2b9a2faaf979dfa95955 100644
--- a/src/models/games/reversi/game.ts
+++ b/src/models/games/reversi/game.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../../../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../../../db/mongodb';
 import isObjectId from '../../../misc/is-objectid';
 import { IUser, pack as packUser } from '../../user';
diff --git a/src/models/games/reversi/matching.ts b/src/models/games/reversi/matching.ts
index 29a6f9a9abbf297611b8836c32a4b9e6ad82ab1d..ba2ac1bc051e55bd359a9f2c484cf700b1836894 100644
--- a/src/models/games/reversi/matching.ts
+++ b/src/models/games/reversi/matching.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../../../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../../../db/mongodb';
 import isObjectId from '../../../misc/is-objectid';
 import { IUser, pack as packUser } from '../../user';
diff --git a/src/models/messaging-message.ts b/src/models/messaging-message.ts
index e5ffba68b389b2e18297e32f2e2d6a2b0e4cfebf..67abb4d111f0ef7cfc00ab57e358dddaae37fe2e 100644
--- a/src/models/messaging-message.ts
+++ b/src/models/messaging-message.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import { pack as packUser } from './user';
 import { pack as packFile } from './drive-file';
 import db from '../db/mongodb';
diff --git a/src/models/mute.ts b/src/models/mute.ts
index 317beaf0b8536595e0590e7279d3a869844f1617..52775e13ca5fd5147861dcf352c8c8548c3fed06 100644
--- a/src/models/mute.ts
+++ b/src/models/mute.ts
@@ -1,7 +1,7 @@
 import * as mongo from 'mongodb';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import { pack as packUser, IUser } from './user';
 
 const Mute = db.get<IMute>('mute');
diff --git a/src/models/note-reaction.ts b/src/models/note-reaction.ts
index aaa0c48664fea2f09d5954f63d2b260359995e44..4e449b400c506dfb7d20def9b8460e38cb864009 100644
--- a/src/models/note-reaction.ts
+++ b/src/models/note-reaction.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
 import Reaction from './note-reaction';
diff --git a/src/models/note.ts b/src/models/note.ts
index 4eab0dd6b4aef9971aaacecb0b87bb28935f2f37..af45ff966de181cbfa2851c152b090de0d5db366 100644
--- a/src/models/note.ts
+++ b/src/models/note.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import rap from '@prezzemolo/rap';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
diff --git a/src/models/notification.ts b/src/models/notification.ts
index fc2b829cd3cbabd97f2f9f49b45f0439279e3f3b..75456af57b34036abad50d771a1e1216a8b81dcf 100644
--- a/src/models/notification.ts
+++ b/src/models/notification.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
 import { IUser, pack as packUser } from './user';
diff --git a/src/models/signin.ts b/src/models/signin.ts
index 2739f214db35e4a76a10f45a32638a92d22805f8..d8b05c0e3060dcc91ea16616c15e9dfb67a1f331 100644
--- a/src/models/signin.ts
+++ b/src/models/signin.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../db/mongodb';
 
 const Signin = db.get<ISignin>('signin');
diff --git a/src/models/user-list.ts b/src/models/user-list.ts
index b67a6e130b38c0744633ab8964f632c1b2c8a91b..e7dd74bdd176cfab1ce15e7c544384e2c3cb0331 100644
--- a/src/models/user-list.ts
+++ b/src/models/user-list.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
 
diff --git a/src/models/user.ts b/src/models/user.ts
index f09cf294a4b34489779ffe2a732913164058b87c..0c3f7b5508792e4282f3dffb6955875c2fb68f6c 100644
--- a/src/models/user.ts
+++ b/src/models/user.ts
@@ -1,5 +1,5 @@
 import * as mongo from 'mongodb';
-import { deepcopy } from '../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 import rap from '@prezzemolo/rap';
 import db from '../db/mongodb';
 import isObjectId from '../misc/is-objectid';
diff --git a/src/services/note/create.ts b/src/services/note/create.ts
index 933f5671ad8dba0fd97b9ed8b6e13585fd3d4232..5f69329a4e4043cbd7148ff5c5a1b0695e35a68a 100644
--- a/src/services/note/create.ts
+++ b/src/services/note/create.ts
@@ -25,7 +25,7 @@ import notesChart from '../../services/chart/notes';
 import perUserNotesChart from '../../services/chart/per-user-notes';
 import activeUsersChart from '../../services/chart/active-users';
 import instanceChart from '../../services/chart/instance';
-import { deepcopy } from '../../misc/deepcopy';
+import * as deepcopy from 'deepcopy';
 
 import { erase, concat } from '../../prelude/array';
 import insertNoteUnread from './unread';