diff --git a/messages/en-US.json b/messages/en-US.json
index c7964f8be..388e34015 100644
--- a/messages/en-US.json
+++ b/messages/en-US.json
@@ -123,6 +123,16 @@
"siteUpdated": "Site updated",
"siteUpdatedDescription": "The site has been updated.",
"siteGeneralDescription": "Configure the general settings for this site",
+ "siteRestartTitle": "Restart Site",
+ "siteRestartDescription": "Restart the WireGuard tunnel for this site. This will briefly interrupt connectivity.",
+ "siteRestartBody": "Use this if the site tunnel is not functioning correctly and you want to force a reconnect without restarting the host.",
+ "siteRestartButton": "Restart Site",
+ "siteRestartDialogMessage": "Are you sure you want to restart the WireGuard tunnel for {name}? The site will briefly lose connectivity.",
+ "siteRestartWarning": "The site will briefly disconnect while the tunnel restarts.",
+ "siteRestarted": "Site restarted",
+ "siteRestartedDescription": "The WireGuard tunnel has been restarted.",
+ "siteErrorRestart": "Failed to restart site",
+ "siteErrorRestartDescription": "An error occurred while restarting the site.",
"siteSettingDescription": "Configure the settings on the site",
"siteResourcesTab": "Resources",
"siteResourcesNoneOnSite": "This site has no public or private resources yet.",
diff --git a/server/routers/external.ts b/server/routers/external.ts
index a64162e6a..326e555a8 100644
--- a/server/routers/external.ts
+++ b/server/routers/external.ts
@@ -254,6 +254,14 @@ authenticated.delete(
site.deleteSite
);
+authenticated.post(
+ "/site/:siteId/restart",
+ verifySiteAccess,
+ verifyUserHasAction(ActionsEnum.updateSite),
+ logActionAudit(ActionsEnum.updateSite),
+ site.restartSite
+);
+
// TODO: BREAK OUT THESE ACTIONS SO THEY ARE NOT ALL "getSite"
authenticated.get(
"/site/:siteId/docker/status",
diff --git a/server/routers/site/index.ts b/server/routers/site/index.ts
index 00fdeda91..292c57971 100644
--- a/server/routers/site/index.ts
+++ b/server/routers/site/index.ts
@@ -7,3 +7,4 @@ export * from "./listSites";
export * from "./listSiteRoles";
export * from "./pickSiteDefaults";
export * from "./socketIntegration";
+export * from "./restartSite";
diff --git a/server/routers/site/restartSite.ts b/server/routers/site/restartSite.ts
new file mode 100644
index 000000000..705b65db8
--- /dev/null
+++ b/server/routers/site/restartSite.ts
@@ -0,0 +1,116 @@
+import { Request, Response, NextFunction } from "express";
+import { z } from "zod";
+import { db, newts } from "@server/db";
+import { sites } from "@server/db";
+import { eq } from "drizzle-orm";
+import response from "@server/lib/response";
+import HttpCode from "@server/types/HttpCode";
+import createHttpError from "http-errors";
+import logger from "@server/logger";
+import { fromError } from "zod-validation-error";
+import { OpenAPITags, registry } from "@server/openApi";
+import { sendToClient } from "../ws";
+
+const updateSiteParamsSchema = z.strictObject({
+ siteId: z.coerce.number().int().positive()
+});
+
+registry.registerPath({
+ method: "post",
+ path: "/site/{siteId}/restart",
+ description: "Restart a site.",
+ tags: [OpenAPITags.Site],
+ request: {
+ params: updateSiteParamsSchema
+ },
+ responses: {
+ 200: {
+ description: "Successful response",
+ content: {
+ "application/json": {
+ schema: z.object({
+ data: z.record(z.string(), z.any()).nullable(),
+ success: z.boolean(),
+ error: z.boolean(),
+ message: z.string(),
+ status: z.number()
+ })
+ }
+ }
+ }
+ }
+});
+
+export async function restartSite(
+ req: Request,
+ res: Response,
+ next: NextFunction
+): Promise
+ {t("siteRestartBody")} +
+