Skip to content

Commit 1ce979e

Browse files
Add BASE_PATH environment variable for subfolder hosting support
Co-authored-by: nickshanks347 <11299982+nickshanks347@users.noreply.github.com>
1 parent 14cb611 commit 1ce979e

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
SONARR_URL=
22
RADARR_URL=
33
SONARR_API_KEY=
4-
RADARR_API_KEY=
4+
RADARR_API_KEY=
5+
BASE_PATH=

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ The logic for the download speed is extremely inaccurate.
2525
SONARR_API_KEY=your-sonarr-api-key
2626
RADARR_URL=http://localhost:7878
2727
RADARR_API_KEY=your-radarr-api-key
28+
BASE_PATH=
2829
```
2930
31+
**Optional**: Set `BASE_PATH` to host monitarr on a subfolder (e.g., `BASE_PATH=/monitarr` to access at `http://localhost:3000/monitarr`). This is useful for reverse proxy setups where you want to host monitarr at `yourdomain.com/monitarr` instead of a subdomain.
32+
3033
4. Run `yarn build`
3134
5. Run `yarn start`
3235
6. Visit `http://localhost:3000` in your browser
@@ -47,6 +50,7 @@ services:
4750
- SONARR_API_KEY=YOUR_SONARR_API_KEY
4851
- RADARR_URL=http://radarr:7878
4952
- RADARR_API_KEY=YOUR_RADARR_API_KEY
53+
- BASE_PATH=/monitarr # Optional: for subfolder hosting
5054
restart: unless-stopped
5155
```
5256

next.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
output: 'standalone',
4+
basePath: process.env.BASE_PATH || '',
45
};
56

67
export default nextConfig;

0 commit comments

Comments
 (0)