Internal Documentation
Status
  • πŸ‘‹Welcome
    • πŸ—‚οΈWhat is this?
    • πŸ•Quick Start
    • πŸ’ΈBilling
  • πŸ—ƒοΈExternal Links
    • πŸ—„οΈPublic Documentation
    • πŸ“‹Private GitHub
    • πŸ“‹Public GitHub
    • πŸ—»NetData
    • πŸ“ŠTrello
    • πŸ•°οΈService Monitoring
  • πŸ“Policies
    • Authentication, Access and Accounts
    • Issue and Project Tracking
    • Creation and Managment of Servers or Services
    • Monitoring and Alerting
    • External Access to Systems
    • Management of Documentation
  • πŸ“‹Processes
    • ❔Deploy new Container Stack
    • Limit Bandwidth to Container
    • ❔Create new Virtual Machine
    • Disaster Recovery
    • Port Forwarding or Tunneling a Service
    • Crowdsec Modules
    • Internal IP Range Change
    • SSH Keys
    • Increase Disk on VM
    • Add Wireguard Client
    • ❔New Domain
    • DNS Management
  • πŸ—ΊοΈService Overviews
    • Websites
    • Portainer and GitOps
    • Content Creation
      • Davinci Resolve Server
    • Plex Suite
      • Tdarr
      • Maintainerr
      • Dashdot
      • Overseerr
      • Bazarr
      • Wizarr
      • Plex
      • Tautulli
      • MovieMatch
      • Prowlarr
      • Radarr
      • Sonarr
      • Lidarr
      • FlareSolverr
      • qBittorrent
      • SabNZBD
      • Huntarr
    • Pterodactyl
    • Home Automation & Physical Security
      • Google Assistant
      • Tuya Cloud
      • Home Assistant
    • Infrastructure
      • ❔Cloudflare
      • NextDNS
      • UniFi
      • Synology NAS
      • Proxmox VE
      • Vultr
      • ❔CyberPower PowerPanel & UPS
    • Maintenance & Monitoring
      • AutoHeal
      • Proxmox Backup Server
      • Duplicati
      • Google Drive Sync
      • Ansible
      • UptimeKuma
      • NetData
      • NetbootXYZ
    • Security
      • Bitwarden
      • Google OpenID Auth
      • Wazuh
      • CrowdSec
    • Remote Access
      • Cloudflare Zero Trust
      • ❔UniFi - Wireguard
      • Kasm
    • Other Adhoc Apps
      • ISponsorBlockTV
      • Homebox
      • ❔Hosted Discord Bots
      • LibreChat
      • Imgur
      • Morphos
      • Zapier
      • EpicGames Free Games
      • GitBook
      • Trello
      • StirlingPDF
      • ❔MeTube
    • ❔OpenAI
  • πŸ–₯️Physical Hardware
    • Macaroni
    • Fettuccine
    • Linguine
    • UniFi
  • ‼️Troubleshooting
    • An Introduction...
    • UptimeKuma alerts
    • Portainer
    • Pterodactyl
  • πŸ“–-- Administration --
    • πŸ“ŽGitbook Templates
      • Guide - Root Page
      • Guide - New Docker App
      • Hardware Overview
      • App Overview - Externally Hosted
      • App Overview - Container
      • Miniguide - Compose
      • App Overview - Hosted Discord Bot
Powered by GitBook
On this page
  • Network Adaptor
  • Compose File
  • Applying label to application

Was this helpful?

  1. Processes

Limit Bandwidth to Container

Some containers need their bandwidth limited to reduce the risk of them flooding our limit upload speed. Examples of this are

  • File storage / sharing

  • Websites

  • File conversion / editing software

Network Adaptor

Firstly, you will need to get primary network adaptors name, which (if different from mine - ens18) will need to be set as a variable.

  1. SSH into your server

  2. Run a command that lists network interfaces, such as ip link show

  3. Review the output and locate your primary adaptor. You may have a stack of adaptors for your docker containers.

If your network adaptor is named differently than mine, you have 2 options

  1. Set NETADAPT variable to the network interface name

  2. Update ens18 in the section below to your network interface name

Compose File

To limit an application's bandwidth you will need to add the Traffic Control container and a network to your compose file. This container manages anything going through the docker network and applies the label limit

....

  traffic-control:
    image: lukaszlach/docker-tc:stable
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - network
    restart: on-failure
    cap_add:
      - NET_ADMIN
    command: [--interface, ${NETADAPT:-ens18}]
    
networks:
  network:

....

Applying label to application

In addition to the above, you will need to set the application to use the newly created network and add labels for its configuration,

....

services:
  app:
    image: my image
    networks:
      - network
    labels:
      com.docker-tc.enabled: "1"     # Enables Traffic Control mangement
      com.docker-tc.limit: "15mbps"  # Setting the bandwidth limit to 25mbit
      
....

PreviousDeploy new Container StackNextCreate new Virtual Machine

Last updated 1 year ago

Was this helpful?

πŸ“‹