39 lines
1.2 KiB
Markdown
39 lines
1.2 KiB
Markdown
---
|
|
title: "Running Vikunja in a subdirectory"
|
|
date: 2022-09-23T12:15:04+02:00
|
|
draft: false
|
|
menu:
|
|
sidebar:
|
|
parent: "setup"
|
|
---
|
|
|
|
# Running Vikunja in a subdirectory
|
|
|
|
Running Vikunja in a subdirectory is not supported out of the box.
|
|
However, you can still run it in a subdirectory but need to build the frontend yourself.
|
|
|
|
## Frontend
|
|
|
|
First, make sure you're able to build the frontend from source.
|
|
Check [the guide about building from source]({{< ref "build-from-source.md">}}#frontend) about that.
|
|
|
|
Then, run
|
|
|
|
```
|
|
pnpm vite build --base=/SUBPATH
|
|
pnpm workbox copyLibraries dist/
|
|
```
|
|
|
|
Where `SUBPATH` is the subdirectory you want to run Vikunja on.
|
|
|
|
Once you have the build files you can deploy them as usual.
|
|
Note that when deploying in docker you'll need to put the files in a web container yourself, you
|
|
can't use the `Dockerfile` in the repo without modifications.
|
|
|
|
## API
|
|
|
|
If you're not using a reverse proxy you're good to go.
|
|
Simply configure the api url in the frontend as you normally would.
|
|
|
|
If you're using a reverse proxy you'll need to adjust the paths so that the api is available at `/SUBPATH/api/v1`.
|
|
You can check if everything is working correctly by opening `/SUBPATH/api/v1/info` in a browser.
|