Skip to content

Reverse Proxy

This guide will help you set up a reverse proxy for the application. A reverse proxy is a server that sits in front of your application and forwards client requests to it.

  1. Create a new docker network for e.g. proxy:

    Terminal window
    docker network create proxy
  2. Adjust your docker-compose.yml file to include the Traefik service:

    services:
    traefik:
    image: traefik:latest
    container_name: traefik
    ports:
    - "80:80"
    - "8080:8080" # Traefik dashboard
    networks:
    - proxy
    volumes:
    - "/var/run/docker.sock:/var/run/docker.sock"
    slink:
    image: anirdev/slink:latest
    container_name: slink
    restart: always
    environment:
    - ORIGIN=https://your-domain.com
    volumes:
    - ./data/slink/var/data:/app/var/data
    - ./data/slink/images:/app/slink/images
    labels:
    - "traefik.enable=true"
    - "traefik.http.routers.slink.entrypoints=http"
    - "traefik.http.routers.slink.rule=Host(`your-domain.com`)"
    - "traefik.http.middlewares.slink-https-redirect.redirectscheme.scheme=https"
    - "traefik.http.routers.slink.middlewares=slink-https-redirect"
    - "traefik.http.routers.slink-secure.entrypoints=https"
    - "traefik.http.routers.slink-secure.rule=Host(`your-domain.com`)"
    - "traefik.http.routers.slink-secure.tls=true"
    - "traefik.http.routers.slink-secure.service=slink"
    - "traefik.http.services.slink.loadbalancer.server.port=3000"
    - "traefik.docker.network=proxy"
    networks:
    - proxy
    networks:
    proxy:
    external: true
  3. Restart your Docker containers.

  4. Open your browser and navigate to http://your-domain.com to access the Slink application.

  1. Create a new docker network for e.g. proxy:

    Terminal window
    docker network create proxy
  2. Adjust your docker-compose.yml file to include the Nginx Proxy Manager service:

    services:
    nginx-proxy-manager:
    image: jc21/nginx-proxy-manager:latest
    container_name: nginx-proxy-manager
    restart: always
    ports:
    - "80:80"
    - "81:81"
    networks:
    - proxy
    slink:
    image: anirdev/slink:latest
    container_name: slink
    restart: always
    environment:
    - ORIGIN=https://your-domain.com
    volumes:
    - ./data/slink/var/data:/app/var/data
    - ./data/slink/images:/app/slink/images
    networks:
    - proxy
    networks:
    proxy:
    external: true
  3. Restart your Docker containers.

  4. Open your browser and navigate to http://your-domain.com:81 to access the Nginx Proxy Manager dashboard.

  5. Create a new proxy host with the following settings:

    • Domain Names: your-domain.com
    • Scheme: http
    • Forward Hostname / IP: slink
    • Forward Port: 3000
    • Block Common Exploits: true
    • Websockets Support: true
    • SSL: Request a new SSL certificate
    • Force SSL: true
  6. Click on the Save button to create the proxy host.

  7. Open your browser and navigate to https://your-domain.com to access the Slink application.