Skip to main content

Configuration

You can modify the configuration by setting values in the storage/config.env file.

warning

The config.env file is not created automatically because the server uses default values. After editing config.env, restart the container for the changes to take effect.

tip

Setting environment variable in docker-compose.yml also work. e.g.

environment:
REGISTER_ENABLE: "false"
tip

You can edit the settings directly through the web interface.

General

Image default size

By default, images are resized to 500px for places and 600px for trips. You can override these default values by setting them in the config.env:

warning

Higher numbers will lead to higher disk usage.

storage/config.env
PLACE_IMAGE_SIZE=500
TRIP_IMAGE_SIZE=600

Map defaults

You can configure the default values for new users with the following settings: DEFAULT_TILE, DEFAULT_CURRENCY, DEFAULT_MAP_LAT, DEFAULT_MAP_LNG.

  • DEFAULT_TILE: default map tile layer URL
  • DEFAULT_CURRENCY: default currency symbol
  • DEFAULT_MAP_LAT: default latitude when opening TRIP
  • DEFAULT_MAP_LNG: default longitude when opening TRIP
warning

Changing these values does not update settings for existing users, it only affects new users.

Attachment max size

Trips hold attachments, the default maximum size for each is 10 MB.

warning

You might need to change your webserver maximum body size as well (e.g. Nginx: client_max_body_size, Caddy: request_body, etc.)

storage/config.env
ATTACHMENT_MAX_SIZE=10485760 # 10 MB

Import max sizes

Uploads are bounded to prevent excessive disk/memory usage during import. You can tune these limits:

  • BACKUP_IMPORT_MAX_ENTRY_SIZE: max size of a single file inside an uploaded backup archive (default 100 MB)
  • BACKUP_IMPORT_MAX_TOTAL_SIZE: max total (declared) size of an uploaded backup archive (default 500 MB)
  • KML_MAX_ENTRY_SIZE: max size of the KML file inside an uploaded KMZ archive (default 50 MB)
  • PROVIDER_IMPORT_MAX_SIZE: max size of a provider import file (default 20 MB)
storage/config.env
BACKUP_IMPORT_MAX_ENTRY_SIZE=104857600 # 100 MB
BACKUP_IMPORT_MAX_TOTAL_SIZE=524288000 # 500 MB
KML_MAX_ENTRY_SIZE=52428800 # 50 MB
PROVIDER_IMPORT_MAX_SIZE=20971520 # 20 MB

Files and folders

Inside your storage directory, TRIP uses 4 folders: attachments, backups, assets, frontend and one file trip.sqlite. Their path can be changed if needed:

storage/config.env
ATTACHMENTS_FOLDER="storage/attachments"
BACKUPS_FOLDER="storage/backups"
ASSETS_FOLDER="storage/assets"
FRONTEND_FOLDER="frontend"
SQLITE_FILE="storage/trip.sqlite"

The URL path assets are served from can also be changed:

storage/config.env
ASSETS_URL="/api/assets"

Authentication

Token duration

To modify the token lifespan, edit ACCESS_TOKEN_EXPIRE_MINUTES for the Access Token and REFRESH_TOKEN_EXPIRE_MINUTES for the Refresh Token. By default, the Refresh Token expires after 1440 minutes (24 hours), and the Access Token after 30 minutes.

storage/config.env
ACCESS_TOKEN_EXPIRE_MINUTES=30
REFRESH_TOKEN_EXPIRE_MINUTES=1440

OIDC Auth

storage/config.env
OIDC_DISCOVERY_URL="https://sso.yourdomain.lan/.well-known/openid-configuration"
OIDC_CLIENT_ID="your-client-id"
OIDC_CLIENT_SECRET="your-client-secret"
OIDC_REDIRECT_URI="https://trip.yourdomain.lan/auth"
warning

OIDC_CLIENT_SECRET cannot contain #, $, \ or ". If your secret contains any of these characters, wrap the value in single quotes, e.g. OIDC_CLIENT_SECRET='your_secret_here'.

warning

If you have an error, please check the Troubleshooting section

Disable registration

The key REGISTER_ENABLE can be configured to false to disable registration.

Bootstrap an admin user

If your instance has no admin yet, you can promote an existing user to admin on the next restart by setting BOOTSTRAP_ADMIN_USERNAME to their username.

storage/config.env
BOOTSTRAP_ADMIN_USERNAME="your-username"
tip

This only takes effect if the instance has no admin user yet, and the username must match an existing user.

Troubleshooting

SSL Error / Certificate

One way to check if you're concerned by this is simply doing the following and checking the result:

$ docker run --rm -it ghcr.io/itskovacs/trip:1 /bin/bash
$ python3
>>> import httpx
>>> httpx.get("https://sso.yourdomain.lan/")

In case you're facing this issue, it's likely due to the fact that the container does not trust your custom certificate.

To fix this, I recommend you to build your own image with the certificate, based on the latest package.

Pull the latest TRIP image.

docker pull ghcr.io/itskovacs/trip:1

Create a file named Dockerfile in your TRIP directory to copy your CA certificate in a custom TRIP image.

# Use latest TRIP image
FROM ghcr.io/itskovacs/trip:1

# Copy your CA certificate file in the image. Replace myCA.crt with your certificate name.
COPY myCA.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates

Then, simply build the image:

docker build -t trip-custom-cert .

When you want to run TRIP, you just have to use your newly created image trip-custom-cert:

docker run -p 8080:8000 -v ./storage:/app/storage trip-custom-cert
note

On TRIP update, simply re-create your custom image:

docker pull ghcr.io/itskovacs/trip:1
docker build -t trip-custom-cert .