Skip to content

Software Tweak#

Linux#

Firefox#

Tab in tittle bar#

about:configbrowser.tabs.inTitlebar =1

Enable macOS-like smooth scrolling#

  1. Run this command: echo export MOZ_USE_XINPUT2=1 | sudo tee /etc/profile.d/use-xinput2.sh
  2. Log out and back in.
  3. Firefox should now use xinput 2. (optional) Open Firefox and go to about:preferences -> Advanced (or about:preferences -> Browsing for Firefox Nightly), and uncheck "Use smooth scrolling". This disables the old style "smooth scrolling", which just causes an annoying delay when using xinput2 style scrolling imo.

source

Self-Hosted#

docker#

Docker Compose: internal vs external#

internal: true#

An internal network is isolated from the outside world.

  • Containers can communicate with each other.
  • Containers cannot access the internet through this network.
  • Used for private communication, for example between an app and a database.
networks:
  private_net:
    internal: true
external: true#

An external network already exists outside the Compose file.

  • Docker Compose does not create it.
  • It only connects services to that existing network.
  • Useful to share a network between multiple Compose projects.
networks:
  shared_net:
    external: true
In short#
  • internal = private/isolated network.
  • external = existing network managed outside this Compose file.

NFS volume mount#

An NFS volume lets a container use a remote folder, for example from a NAS or file server.

volumes:
  remote-video:
    driver_opts:
      type: nfs
      o: addr=X.X.X.X,nfsvers=4,sec=sys,proto=tcp
      device: :/remote/path/video
Explanation#
  • remote-video
    Name of the Docker volume.

  • type: nfs
    Indicates that the volume uses NFS.

  • addr=X.X.X.X
    IP address or hostname of the NFS server.

  • nfsvers=4
    Uses NFS version 4.

  • sec=sys
    Uses standard UNIX permissions.

  • proto=tcp
    Uses TCP protocol.

  • device: :/remote/path/video
    Remote folder exported by the NFS server.

In short#

This configuration mounts a remote NFS folder into Docker as a volume, so containers can access files stored outside the Docker host.

npmplus with Crowdsec#

Docker-compose

services:
  npmplus:
    container_name: npmplus
    image: docker.io/zoeyvid/npmplus:latest # or ghcr.io/zoeyvid/npmplus:latest
    restart: always
    networks:
      - proxy
    ports:
      - 80:80
      - 443:443
      - 81:81
      - 91:91
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    environment:
      - TZ=Europe/Zurich
      - ACME_EMAIL=/*[REDACTED]*\
      - LOGROTATE=true
      - GOA=true 
      - NGINX_LOAD_GEOIP2_MODULE=true
      - NGINX_LOAD_NJS_MODULE=true

    crowdsec:
    container_name: crowdsec
    image: docker.io/crowdsecurity/crowdsec:latest
    restart: always
    networks:
      - proxy
    ports:
      - 127.0.0.1:7422:7422
      - 127.0.0.1:8080:8080
    environment:
      - TZ=Europe/Zurich # needs to be changed
      - COLLECTIONS=ZoeyVid/npmplus
    volumes:
      - ./crowdsec/conf:/etc/crowdsec
      - ./crowdsec/data:/var/lib/crowdsec/data
      - ./data/nginx:/opt/npmplus/nginx:ro

  geoipupdate:
    container_name: npmplus-geoipupdate
    image: ghcr.io/maxmind/geoipupdate:latest
    restart: always
    networks:
      - proxy
    environment:
      - TZ=Europe/Zurich # needs to be changed
      - GEOIPUPDATE_EDITION_IDS=GeoLite2-Country GeoLite2-City GeoLite2-ASN
      - GEOIPUPDATE_ACCOUNT_ID=/*[REDACTED]*\ # needs to be changed
      - GEOIPUPDATE_LICENSE_KEY=/*[REDACTED]*\ # needs to be changed
      - GEOIPUPDATE_FREQUENCY=24
    volumes:
      - ./data/goaccess/geoip:/usr/share/GeoIP
networks:
  proxy:
    external: true