1. Support arrow-right
  2. Can I allow ItemPath to use HTTPS on-premise?

Can I allow ItemPath to use HTTPS on-premise?

ItemPath can use TLS connections locally, but this does take some extra steps to get working. This guide will show you how.

Getting a Certificate and Key and Storing It

We will need ItemPath installed and working correctly before we begin. We will also need a valid certificate and key for the server.

Usually the files look like filename.key and filename.crt. The key file should be the private key and the crt file should be the public certificate.

Once you have those keys, you'll want to store them in the ~/ItemPath/data/certs folder in the user directory. You'll want to double-check that the files have the right permissions (ItemPath and Docker should be able to access these files and folder).

Configuring ItemPath

We will need to change the docker-compose.yml file to allow ItemPath to use TLS. We will need to add the following lines to the docker-compose.yml file as a replacement service for the proxy item:

proxy-local-ssl:
    container_name: itempath-nginx-local-ssl
    privileged: true
    image: ppgsupport/nginx-proxy-local-ssl
    restart: always
    environment:
      - SERVER_NAME=localhost
      - SSL_CERT=filename.crt
      - SSL_KEY=filename.key
    ports:
      - "80:80"
      - "443:443"
    expose:
      - 443
      - 80
    volumes:
      - ~/ItemPath/data/certs:/etc/nginx/certs
    depends_on:
      - ui
      - api
    logging:
      driver: "json-file"
      options:
        max-size: "50m"

This should replace the proxy service in the docker-compose.yml file (you shouldn't run both services at the same time).

Starting ItemPath

Once the key and certificate are uploaded, and the docker-compose.yml file is updated, you can start ItemPath as normal. You should be able to access ItemPath on port 443 (https://localhost:443) and ItemPath should be using TLS.

Note that http:// connections will not work, so you will need to use https:// to connect to ItemPath.