0

I want to deploy syncthing on my Ubunty 18.04 server using docker.

I'm using nginx as a reverse proxy so WebGUI traffic goes over SSL using my certificate. However, opening the webGUI when proxied through nginx makes it look like this https://i.sstatic.net/UdhYO.png

I have found one single other person with this problem on Google, and did not find a solution... Does anyone know what's up?

My docker-compose.yml:

version: '3'

services:

  nginx:
    image: nginx:latest
    container_name: nginx-1
    networks:
      - syncthing
    ports:
      - "80:80"
      - "443:443"
    restart: always
    volumes:
      - ./www:/var/www
      - ./nginx/:/etc/nginx
      - ./nginx/log:/var/log/nginx
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
    command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"

  syncthing:
    image: linuxserver/syncthing
    container_name: syncthing-1
    networks:
      - syncthing
    ports:
        #webUI 
      - 8384:8384
        #listening  
      - 22000:22000
        #port discovery
      - 21027:21027/udp
    restart: always
    volumes:
      - ./syncthing/config:/config
      - ./syncthing/data:/data
    environment:
      - TZ=CET

  letsencrypt:
    image: certbot/certbot
    command: renew
    container_name: letsencrypt-1
    networks:
      - le
    depends_on:
      - nginx
    restart: always
    volumes:
      - ./letsencrypt:/etc/letsencrypt
      - ./letsencrypt/log:/var/log/letsencrypt
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"


networks:
  syncthing:

And my syncthing nginx sites-enabled file:

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name example.com;
    root /;

    # SSL
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/example.com/chain.pem;

    # reverse proxy
    location /syncthing {
        proxy_pass http://syncthing:8384;

        proxy_read_timeout      600s;
        proxy_send_timeout      600s;    

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

# HTTP redirect
server {
    listen 80;
    listen [::]:80;

    server_name example.com;

    location / {
        return 301 https://example.com$request_uri;
    }
}
3
  • It’s pretty obvious the scripts and styles are not loaded. However, only you can use your browser’s developer tools to find out exactly why that is.
    – Daniel B
    Commented Sep 22, 2019 at 13:24
  • Can you elaborate on that?
    – lizardguy
    Commented Sep 23, 2019 at 15:30
  • Press F12 and check what it’s trying to load in your browser’s developer tools.
    – Daniel B
    Commented Sep 25, 2019 at 18:58

0

You must log in to answer this question.

Browse other questions tagged .