diff --git a/src/plugins/webmanifest.js b/src/plugins/webmanifest.js
index 67fd5ad3879a2664f15969f8d9f8420763f621c9..495121399ab11a19938b6652de2a4a93f8565f74 100644
--- a/src/plugins/webmanifest.js
+++ b/src/plugins/webmanifest.js
@@ -2,13 +2,15 @@ import { get } from '../cache.js'
 import Validator from '../validator.js'
 import { getRedisKey } from '../util.js'
 
+const appRoot = process.env.APP_ROOT
+
 const template = {
   // custom values
   name: 'OX App Suite',
   short_name: 'OX App Suite',
   icons: [
     {
-      src: '/themes/default/logo_512.png',
+      src: `${appRoot}themes/default/logo_512.png`,
       type: 'image/png',
       sizes: '512x512',
       purpose: 'any'
@@ -17,15 +19,15 @@ const template = {
   // fixed values
   // theme_color is taken from index.html and is changed by the theme
   theme_color: 'white',
-  start_url: '/#pwa=true',
+  start_url: `${appRoot}#pwa=true`,
   display: 'standalone',
   background_color: 'white',
-  scope: '/',
-  id: '/#pwa=true',
+  scope: `${appRoot}`,
+  id: `${appRoot}#pwa=true`,
   protocol_handlers: [
     {
       protocol: 'mailto',
-      url: '/#app=io.ox/mail&mailto=%s'
+      url: `${appRoot}#app=io.ox/mail&mailto=%s`
     }
   ]
 }
@@ -47,7 +49,7 @@ export default async function serveWebmanifest (fastify) {
 }
 
 async function fetchWebManifest (url) {
-  const serverConfigURL = new URL('/api/apps/manifests?action=config', url)
+  const serverConfigURL = new URL('api/apps/manifests?action=config', url)
   const conf = await fetch(serverConfigURL)
 
   if (conf.ok) {