### Start Telemt Service with Docker Compose Source: https://github.com/4q4r/telemt-docker/blob/master/README.md Command to start the Telemt service in detached mode using Docker Compose. This command reads the docker-compose.yml file to launch the container. ```bash docker compose up -d ``` -------------------------------- ### Create and Prepare Telemt Configuration Directory Source: https://github.com/4q4r/telemt-docker/blob/master/README.md This script creates a directory for Telemt configuration and sets appropriate permissions. The Telemt API requires the entire directory to be mounted and writable for dynamic configuration changes. ```bash mkdir ./telemt-config # Create and edit your config inside touch ./telemt-config/telemt.toml # Grant write permissions so the container's non-root user can modify the config chmod 777 ./telemt-config chmod 666 ./telemt-config/telemt.toml ``` -------------------------------- ### Build Docker with Specific Upstream Ref Source: https://github.com/4q4r/telemt-docker/blob/master/README.md Builds a Docker image using a specific Telemt repository reference (tag, branch, or commit) and pushes it to a registry. This allows for version pinning. ```bash docker buildx build \ --build-arg TELEMT_REF=v1.1.0.0 \ -t whn0thacked/telemt-docker:v1.1.0.0 \ --push . ``` -------------------------------- ### Multi-arch Docker Build Source: https://github.com/4q4r/telemt-docker/blob/master/README.md Builds a Docker image for multiple architectures (amd64 and arm64) and pushes it to a registry. Ensure you are logged into your Docker registry. ```bash docker buildx build \ --platform linux/amd64,linux/arm64 \ -t whn0thacked/telemt-docker:latest \ --push . ``` -------------------------------- ### Run Raw Docker Command Source: https://github.com/4q4r/telemt-docker/blob/master/README.md Use this command to run a raw Docker command without Compose. It maps ports, sets environment variables, mounts configuration, and applies security settings. ```bash docker build -t telemt:local . docker run --name telemt --restart unless-stopped \ -p 443:443 \ -e RUST_LOG=info \ -v "$PWD/telemt-config:/etc/telemt" \ --read-only \ --cap-drop ALL --cap-add NET_BIND_SERVICE \ --ulimit nofile=65536:65536 \ telemt:local /etc/telemt/telemt.toml ``` -------------------------------- ### Docker Compose Configuration for Telemt Source: https://github.com/4q4r/telemt-docker/blob/master/README.md Defines the Telemt service using Docker Compose. Pay close attention to network mode, volume mounts for configuration, and security options for privileged port binding. ```yaml services: telemt: image: whn0thacked/telemt-docker:latest container_name: telemt restart: unless-stopped # --------------------------------------------------------------- # Root user requirement for binding privileged ports (<1024) # The default image runs as 'nonroot' to minimize attack vectors. # Uncomment the line below to run as root ONLY if you need to bind # to port 443 and encounter 'os error 13'. # --------------------------------------------------------------- # user: "root" # Telemt uses RUST_LOG for verbosity (optional) environment: RUST_LOG: "info" # --------------------------------------------------------------- # API Configuration writes (Atomic Config Save) # The API performs atomic writes (creates a .tmp file and renames it). # To allow the API to save changes to the config, we MUST mount the # ENTIRE directory (not just the file) and ensure it is writable. # We override the default command to point to the mounted file. # --------------------------------------------------------------- command: ["/etc/telemt/telemt.toml"] volumes: - ./telemt-config:/etc/telemt # --------------------------------------------------------------- # Host network mode: the container uses the host's network stack # directly. The "ports" section is IGNORED in this mode — Telemt # binds to host ports as specified in telemt.toml. # # To use Docker-managed port mapping instead, comment out # "network_mode: host" and uncomment the "ports" section below. # --------------------------------------------------------------- network_mode: host # ports: # - "443:443/tcp" # # If you enable metrics_port=9090 in config: # # - "127.0.0.1:9090:9090/tcp" # Hardening # --------------------------------------------------------------- # ⚠️ If you uncommented `user: "root"` above to bind to port 443, # you MUST comment out the two lines below, as they prevent # gaining the necessary privileges for binding restricted ports. # --------------------------------------------------------------- security_opt: - no-new-privileges:true cap_drop: - ALL cap_add: - NET_BIND_SERVICE read_only: true tmpfs: - /tmp:rw,nosuid,nodev,noexec,size=16m # Resource limits (optional) deploy: resources: limits: cpus: "0.50" memory: 256M reservations: cpus: "0.25" memory: 128M # File descriptor limits (critical for a high-load server!) ulimits: nofile: soft: 65536 hard: 65536 logging: driver: json-file options: max-size: "10m" max-file: "3" ``` -------------------------------- ### Monitor Telemt Service Logs Source: https://github.com/4q4r/telemt-docker/blob/master/README.md Command to follow the logs of the Telemt service in real-time. Useful for debugging and monitoring the service's activity. ```bash docker compose logs -f ``` -------------------------------- ### Generate a 32-Hex-Char Secret Source: https://github.com/4q4r/telemt-docker/blob/master/README.md Use this command to generate a secure 16-byte secret required for Telemt users. Ensure the output is exactly 32 hexadecimal characters. ```bash openssl rand -hex 16 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.