this post was submitted on 22 Nov 2023
0 points (50.0% liked)

Self-Hosted Main

515 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

hey all, maybe my Google-Fu is glitching tonight, but what, if anything, do y'all use to track port usage in your docker containers? I know I can browse through Portainer, or grep some data out of my docker compose files etc, but I am hosting things on 3 different machines through a single reverse proxy, and I am just looking for an easy way to trace what ports are in use.

Ideally this would be some sort of container that can gather this data, but looking for recommendations

thanks

app

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 11 months ago

I'm not sure if google-fu is glitching as much as imagination. You have three clean options:

  • docker container ls (shows container name and ports)

  • netstat -ban (shows all ports in use on the system + the binary running the service)

  • Just write documentation for yourself when you bring up a new service. Doesn't have to be anything fancy, a simple markdown or YAML file can be used. I use YAML in case I ever want to use it programmatically.

netstat -an is your friend.

Documentation is your second best friend.