diff --git a/.env.template b/.env.template
index a51a08256bb473621bbdbde229c0d9f9c829966d..9c263e4c2e9f4de7084ebf93a7e854aa627a3d5b 100644
--- a/.env.template
+++ b/.env.template
@@ -29,6 +29,8 @@ ANNOTOT_LISTEN_IP=0.0.0.0
 ANNOTOT_HOST=localhost
 # For production only
 ANNOTOT_SECRET_KEY_BASE=insert-a-random-key-here
+# http or https
+ANNOTOT_PROTO=http
 # For traefik (optionnal)
 NAME=IIIF
 HOST=IIIF.tetras-lab.io
diff --git a/src/index.js b/src/index.js
index e6ea0a1fdfdd068eb612e6236f41d8dd263066a7..b1b987d7963a0b6cb3eeb67d6737e004292dcfa0 100644
--- a/src/index.js
+++ b/src/index.js
@@ -5,7 +5,7 @@ import annotationPlugins from 'mirador-annotations/es/index';
 import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter';
 import AnnototAdapter from 'mirador-annotations/es/AnnototAdapter';
 
-const endpointUrl = `http://${process.env.ANNOTOT_HOST}:${process.env.ANNOTOT_PORT}/annotations`;
+const endpointUrl = `${process.env.ANNOTOT_PROTO}://${process.env.ANNOTOT_HOST}:${process.env.ANNOTOT_PORT}/annotations`;
 const config = {
   annotation: {
     adapter: (canvasId) => new AnnototAdapter(canvasId, endpointUrl),