network-ports.adoc 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. [#network-ports]
  2. = Network ports
  3. OliveTin might surprise some people when they see it is listening on several
  4. ports when it starts up. Most of these ports are internal and localhost-only by
  5. default. It keeps the architecture of OliveTin clean and simple, and allows for
  6. a lot of flexibility if needed.
  7. == Network flow diagram
  8. Here is the default flow of traffic in OliveTin without any config changes.
  9. [mermaid,png]
  10. .Flow of an inbound network request
  11. ....
  12. %%{init: {'theme': 'neutral'}}%%
  13. graph LR
  14. A[Your Browser] -->|HTTPS 443/tcp| C
  15. C["Single HTTP frontend"]
  16. H["Prometheus"]
  17. B["gRPC API"]
  18. subgraph "OliveTin service"
  19. C -->|/api/| D[REST API] --> B
  20. C -->|/| E[webui]
  21. C -->|/metrics/| H
  22. end
  23. ....
  24. 1. Traffic comes into OliveTin over your network and hits the only port
  25. listening - 1337, which listens on all interfaces. This is a micro HTTP reverse
  26. proxy.
  27. 2. Traffic for `/` gets proxied to `localhost:1340` for the static web
  28. server.
  29. 3. Traffic for `/api/` gets proxied to `localhost:1338` for REST actions.
  30. 4. The REST API actually makes gRPC API calls internally, to port
  31. `localhost:1339`.
  32. Below is a detailed reference table.
  33. == Port Reference Table
  34. .Port reference table
  35. [%header,cols="1,2"]
  36. |===
  37. | Config file reference (and Default Address:Port) | Purpose
  38. | `listenAddressSingleHTTPFrontend: 0.0.0.0:1337` (listen on all available addresses) | This is a "micro reverse proxy" built into OliveTin. It's only purpose is to serve /ui and / (the web interface) from a single endpoint. This means that problems like CORSs and setting "external addresses" is not necessary. It does not do any caching or anything else. It can be disabled, but it makes life a lot easier for you. It's common to put your own reverse proxy like haproxy, traefik, etc in front of this single micro reverse proxy.
  39. | `listenAddressRestActions: localhost:1338` | REST - the protocol used by web pages to talk to web APIs. In the case of OliveTin, the API is used to get actions, and start actions.
  40. | `listenAddressGrpcActions:localhost:1339` | gRPC - a very popular method of service-to-service API communication. This provides the "real" API for OliveTin.
  41. | `listenAddressWebUI: localhost:1340` | Hosts a simple static web server with some HTML, stylesheets, Javascript etc for the web interface.
  42. | `listenAddressPrometheus: localhost:1341` | Hosts a prometheus endpoint, which is disabled by default. See xref:advanced_configuration/prometheus.adoc[Prometheus] to learn more.
  43. |===
  44. == See also
  45. * xref:reference/multiple_instances[Running Multiple instances of OliveTin on the same server]