Feature: watcher based bulk uploads (#886)

* initial commit

* fix watcher.js for docker

* Update docs

* update healthcheck

* update docs

---------

Co-authored-by: Christian Beutel <>
This commit is contained in:
Flomp
2026-04-20 13:46:32 +02:00
committed by GitHub
parent 1f17a8784b
commit 871bf38112
8 changed files with 155 additions and 126 deletions

View File

@@ -47,6 +47,21 @@ If your instance offers OAuth logins, the enabled providers appear in <span clas
For instructions on enabling OAuth2 providers for your own instance, see the [OAuth2 setup guide](/run/backend-configuration/oauth2/).
## API Tokens
API tokens allow external tools and automated processes to interact with your <span class="-tracking-[0.075em]">wanderer</span> account without requiring your login credentials.
:::danger
API tokens grant full access to your account. Do not share them with untrusted parties.
:::
To manage your tokens:
1. Log in to your <span class="-tracking-[0.075em]">wanderer</span> instance.
2. Navigate to **Settings** > **Account** > **API Tokens**.
3. Click **Generate new token**, provide a descriptive name and optionally an expiration date and click "Save".
4. **Copy the token immediately.** For security, it will not be shown again.
## Forgot your password?
<span class="-tracking-[0.075em]">wanderer</span> offers the option to send password reset emails in case a user forgets his password.
You can click the "Forgot password" link in the login form. After requesting the reset the user will receive an email with a unique link to reset their password.

View File

@@ -5,37 +5,43 @@ description: How to import and export trails in wanderer
## Import
<span class="-tracking-[0.075em]">wanderer</span> supports bulk uploading of trails via an auto-upload folder. A cronjob fetches all files from this folder and uploads them automatically every 15 minutes. This feature is currently only available for docker installations. If you want to replicate it in a bare metal installation you will need to create your own cronjob using the `web/cron.sh` script.
<span class="-tracking-[0.075em]">wanderer</span> supports bulk uploading of trails via an auto-upload folder. A file watcher automatically detects new files added to this directory and imports them into your library.
:::note
This feature is currently only available for Docker installations. Files added to the folder while the container is not running are ignored.
:::
:::caution
Successfully uploaded files will be deleted from the auto-upload folder.
:::
:::note
Currently only GPX files are supported.
:::
### Configuration
The following environment variables must be present in the `<span class="-tracking-[0.075em]">wanderer</span>-web` docker container and set to valid values.
#### Environment variables
| Environment Variable | Description | Default |
|----------------------|------------------------------------------------------------------------|--------------|
| UPLOAD_FOLDER | Path to the auto-upload folder | /app/uploads |
| UPLOAD_USER | Username of the account that will be the author of the uploaded trails | |
| UPLOAD_PASSWORD | Password of the account that will be the author of the uploaded trails | |
The following environment variable must be present in the `wanderer-web` docker container and set to a valid volume path (see below).
### Volume
| Environment Variable | Description | Default |
| -------------------- | ------------------------------ | ------------ |
| UPLOAD_FOLDER | Path to the auto-upload folder | /app/uploads |
#### Volume
Make sure to mount the upload folder as a volume to your host system. The default `docker-compose.yml` already includes this volume. Ensure that the mapped value matches the one in the `UPLOAD_FOLDER` environment variable.
### Manually run the upload job
In case you do not want to wait until the next scheduled execution you can also run the job manually:
#### API token
The bulk upload process uses API tokens to authenticate requests and determine which user account the uploaded trails should be assigned to.
1. Create an API token: Follow the steps in the [Authentication section](/use/authentication/#api-tokens) to generate a new API token.
2. Prepare the folder structure: Create the folder: Inside your UPLOAD_FOLDER, create a sub-folder named exactly after your API token.
3. Upload: Move your trail files (e.g., .gpx, .fit, or .kml) into that sub-folder.
**Example structure**:
`/app/uploads/wanderer_key_<...>/my_trail.gpx`
```bash
docker exec -it wanderer-web run-parts /etc/periodic/15min
```
## Export
To export a single trail head over to `/trails` and select the trail you want to export. From the <span class="inline-block w-8 h-8 bg-primary rounded-full text-center text-white"></span> menu select "Export". You can export the route data either in GPX or in GeoJSON format. Furthermore, you can choose whether you want to include the photos and the summit book of the trail. In any case, <span class="-tracking-[0.075em]">wanderer</span> will create a ZIP archive with all the data that is then downloaded.
To export selected trails head over to `/trails` and select the trails you want to export. From the <span class="inline-block w-8 h-8 bg-primary rounded-full text-center text-white"></span> menu select "Export". You can export the route data either in GPX or in GeoJSON format. Furthermore, you can choose whether you want to include the photos and the summit book of the trail. In any case, <span class="-tracking-[0.075em]">wanderer</span> will create a ZIP archive with all the data that is then downloaded.
You can also export all of your trails at once. To do so, head over to `/settings/export` and click "Export all trails". The other steps remain analogous to exporting a single trail.