# Running label studio on https with nginx; error when connecting local storage

**URL:** <https://community.labelstud.io/t/running-label-studio-on-https-with-nginx-error-when-connecting-local-storage/518>\
**Category:** Label Studio Support\
**Created:** [March 19, 2025, 3:14pm UTC](https://community.labelstud.io/t/running-label-studio-on-https-with-nginx-error-when-connecting-local-storage/518 "2025-03-19T15:14:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WernerT](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@WernerT](https://community.labelstud.io/u/WernerT)\
**Post date:** [March 19, 2025, 3:14pm UTC](https://community.labelstud.io/t/running-label-studio-on-https-with-nginx-error-when-connecting-local-storage/518/1 "2025-03-19T15:14:47Z")

</div>

I use Label Studio on a server. To serve label studio on https I use nginx. The server has a hard drive on which the data is stored. The connection with local storage has worked, but I get the following error when I try to load the images in the labeling interface

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/labelstudio/original/1X/6a5fc2e2351709d8b222abf10a4c4502a7b09de7.png)

The image does not appear to be available at https://ip\_adress/data/local-files/?d=Image\_Storage/compressed\_image\_12\_2025-01-22.png, but when I manually change the URL to https://ip\_adress/data/local-files/compressed\_image\_12\_2025-01-22.png, the image loads.

How do I get the image to load correctly in my labeling interface?

**version of Label Studio**  
Label Studio version: 1.16.0 installed by pip

**labeling configuration.**

```
<View className="image-container">
  <Image name="image" value="$image_url" zoom="true" zoomControl="true"/>
</View>

```

**Nginx Configuration**

```
server {

listen 443 ssl;
server_name ip_adress;

ssl_certificate /etc/ssl/certs/labelstudio.crt;
ssl_certificate_key /etc/ssl/private/labelstudio.key;

# Label Studio als Proxy weiterleiten
location / {
    proxy_pass http://127.0.0.1:xxxx;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

# Zugriff auf lokale Dateien für Label Studio erlauben
location /data/local-files/ {
    alias /DATA1_VOL_D/teresa.w/Image_Storage/; #Path to images
    autoindex on;

    # CORS-Header 
    add_header 'Access-Control-Allow-Origin' '*';
    add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
    add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
    add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';

    
    if ($request_method = 'OPTIONS') {
        add_header 'Access-Control-Allow-Origin' '*';
        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
        add_header 'Access-Control-Max-Age' 1728000;
        add_header 'Content-Type' 'text/plain; charset=utf-8';
        add_header 'Content-Length' 0;
        return 204;
    }
}

# Automatische Weiterleitung von HTTP auf HTTPS
server {
     listen 80;
     server_name ip_adress;
     return 301 https://$host$request_uri;
}

```
