Skip to content

Commit 96f4297

Browse files
authored
Merge pull request #652 from pieslinger/20230127-updateDefaultConfigs.md
20230127-updateDefaultConfigs.md
2 parents 854fd6f + a6bff0e commit 96f4297

File tree

2 files changed

+120
-43
lines changed

2 files changed

+120
-43
lines changed
Lines changed: 57 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,60 @@
1-
# Default Passwords and ports
1+
# Default ports
22

3-
Here you can find a list of the default configurations for IOTstack for quick referece.
3+
Here you can find a list of the default mode and ports used by each service found in the .templates directory.
44

5-
## A word of caution
6-
While it is convienent to leave passwords and ports set to their factory value, for security reasons we __strongly__ encourage you to use a randomly generated password for services that require passwords, and/or setup a reverse nginx proxy to require authentication before proxying to services. Only allowing connections originating from LAN or VPN is another way to help secure your services. Security requires a multi-pronged approach.
5+
This list can be generated by running the default_ports_md_generator.sh script.
76

8-
Do note that the ports listed are not all of the ports containers use. They are mearly the WUI ports.
9-
10-
## List of defaults
11-
12-
| Service Name | Default Username | Default Password | Default External HTTP/S WUI Port | Multiple Passwords |
13-
| -------------- | ---------------- | ---------------- | -------------------------------- | ------------------ |
14-
| adminer | *none* | *none* | 9080 | No |
15-
| blynk_server | *none* | *none* | 8180 | No |
16-
| dashmachine | *none* | *none* | 5000 | No |
17-
| deconz | *none* | IOtSt4ckDec0nZ | 8090 | No |
18-
| diyhue | *none* | *none* | 8070 | No |
19-
| domoticz | *none* | *none* | 8883 | No |
20-
| dozzle | *none* | *none* | 8889 | No |
21-
| espruinohub | *none* | *none* | *none* | No |
22-
| gitea | *none* | *none* | 7920 | No |
23-
| grafana | *none* | *none* | 3000 | No |
24-
| home_assistant | *none* | *none* | 8123 | No |
25-
| homebridge | *none* | *none* | 8581 | No |
26-
| influxdb | *none* | *none* | *none* | Yes |
27-
| mariadb | mariadbuser | IOtSt4ckmariaDbPw | *none* | Yes |
28-
| mosquitto | *none* | *none* | *none* | No |
29-
| motioneye | *none* | *none* | 8765 | No |
30-
| nextcloud | *none* | *none* | 9321 | No |
31-
| nodered | nodered | nodered | 1880 | No |
32-
| openhab | *none* | *none* | 4050 | No |
33-
| pihole | *none* | IOtSt4ckP1Hol3 | 8089 | No |
34-
| plex | *none* | *none* | *none* | No |
35-
| portainer | *none* | *none* | 9002 | No |
36-
| portainer-ce | *none* | *none* | 9001 | No |
37-
| postgres | postuser | IOtSt4ckpostgresDbPw | *none* | Yes |
38-
| python | *none* | *none* | *none* | No |
39-
| rtl_433 | *none* | *none* | *none* | No |
40-
| tasmoadmin | *none* | *none* | 8088 | No |
41-
| telegraf | *none* | *none* | *none* | No |
42-
| timescaledb | postgres | IOtSt4ckTim3Scale | *none* | No |
43-
| transmission | *none* | *none* | 9091 | No |
44-
| webthingsio_gateway | *none* | *none* | 4060 | No |
45-
| zigbee2mqtt | *none* | *none* | *none* | No |
46-
| zigbee2mqtt_assistant | *none* | *none* | *none* | No |
7+
| Service Name | Mode | Port(s)<br> *External:Internal* |
8+
| ------------ | -----| --------------- |
9+
| adguardhome | non-host | 53:53 <br> 8089:8089 <br> 3001:3000 <br> |
10+
| adminer | non-host | 9080:8080 <br> |
11+
| blynk_server | non-host | 8180:8080 <br> 8440:8440 <br> 9443:9443 <br> |
12+
| chronograf | non-host | 8888:8888 <br> |
13+
| dashmachine | non-host | 5000:5000 <br> |
14+
| deconz | non-host | 8090:80 <br> 443:443 <br> 5901:5900 <br> |
15+
| diyhue | non-host | 8070:80 <br> 1900:1900 <br> 1982:1982 <br> 2100:2100 <br> |
16+
| domoticz | non-host | 8083:8080 <br> 6144:6144 <br> 1443:1443 <br> |
17+
| dozzle | non-host | 8889:8080 <br> |
18+
| duckdns | host | |
19+
| espruinohub | host | |
20+
| gitea | non-host | 7920:3000 <br> 2222:22 <br> |
21+
| grafana | non-host | 3000:3000 <br> |
22+
| heimdall | non-host | 8880:80 <br> 8883:443 <br> |
23+
| home_assistant | host | |
24+
| homebridge | host | |
25+
| homer | non-host | 8881:8080 <br> |
26+
| influxdb | non-host | 8086:8086 <br> |
27+
| influxdb2 | non-host | 8087:8086 <br> |
28+
| kapacitor | non-host | 9092:9092 <br> |
29+
| mariadb | non-host | 3306:3306 <br> |
30+
| mosquitto | non-host | 1883:1883 <br> |
31+
| "motioneye" | non-host | 8765:8765 <br> 8081:8081 <br> |
32+
| "n8n" | non-host | 5678:5678 <br> |
33+
| nextcloud | non-host | 9321:80 <br> |
34+
| nodered | non-host | 1880:1880 <br> |
35+
| octoprint | non-host | 9980:80 <br> |
36+
| openhab | host | |
37+
| pihole | non-host | 8089:80 <br> 53:53 <br> 67:67 <br> |
38+
| plex | host | |
39+
| portainer-ce | non-host | 8000:8000 <br> 9000:9000 <br> |
40+
| portainer-agent | non-host | 9001:9001 <br> |
41+
| postgres | non-host | 5432:5432 <br> |
42+
| prometheus-cadvisor | non-host | 8082:8080 <br> |
43+
| prometheus-nodeexporter | non-host | |
44+
| prometheus | non-host | 9090:9090 <br> |
45+
| python | non-host | |
46+
| qbittorrent | non-host | 6881:6881 <br> 15080:15080 <br> 1080:1080 <br> |
47+
| ring-mqtt | non-host | 8554:8554 <br> 55123:55123 <br> |
48+
| rtl_433 | non-host | |
49+
| scrypted | host | 10443:10443 <br> |
50+
| syncthing | host | |
51+
| tasmoadmin | non-host | 8088:80 <br> |
52+
| telegraf | non-host | 8092:8092 <br> 8094:8094 <br> 8125:8125 <br> |
53+
| timescaledb | non-host | |
54+
| transmission | non-host | 9091:9091 <br> 51413:51413 <br> |
55+
| webthingsio_gateway | host | |
56+
| wireguard | non-host | 51820:51820 <br> |
57+
| zerotier | host | |
58+
| zerotier | host | |
59+
| zigbee2mqtt | non-host | 8080:8080 <br> |
60+
| zigbee2mqtt_assistant | non-host | 8880:80 <br> |
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/usr/bin/env python3
2+
3+
# This script will return a markdown table containing the service names, mode (host or non-host), and default
4+
# external ports used by all services found in the .templates directory. The markdown output can be used to
5+
# quickly update the docs/Basic_setup/Default-Configs.md file.
6+
7+
import glob
8+
import pathlib
9+
import re
10+
11+
# Setup columns & print service names, mode, and default ports.
12+
13+
print("| Service Name | Mode | Port(s)<br> *External:Internal* |")
14+
print("| ------------ | -----| --------------- |")
15+
16+
# Change directories
17+
18+
currentPath = pathlib.Path(__file__)
19+
dirName = str(currentPath.parents[1])
20+
templates = glob.glob(dirName + '/.templates/**/service.yml',recursive = True)
21+
22+
# Iterate through service.ymls for required info.
23+
24+
for template in sorted(templates):
25+
26+
with open(template) as file:
27+
28+
fileInput = file.read()
29+
30+
# Search for service names and mode.
31+
32+
try:
33+
serviceName = re.search(r'container_name:.?(["a-z0-9_-]+)', fileInput).group(1)
34+
except:
35+
serviceName = 'Parsing error'
36+
try:
37+
if (re.search(r'^([^\#]\s+network_mode:).?([a-z0-9]+)', fileInput,flags = re.M).group(2) == 'host'):
38+
mode = 'host'
39+
except:
40+
mode = 'non-host'
41+
42+
# Print service and mode but do not end the line.
43+
44+
print("| " + serviceName + " | " + mode + " | ", end= "")
45+
46+
# Search for ports used by each service. findall is split into 2 groups to deal with #'s in some service.yml's.
47+
# Keep only the ports and not the whitespace or "-"
48+
49+
portSearchResult = re.findall(r'^(\s*[-]\s*"*)(\d{2,5}[:]\d{2,5})', fileInput,re.M)
50+
ports = []
51+
for result in portSearchResult:
52+
ports.append(result[1])
53+
54+
# Get rid of found doubles - UDP and TCP ports etc.
55+
56+
dropDuplicates = []
57+
[dropDuplicates.append(port) for port in ports if port not in dropDuplicates]
58+
59+
# Print the ports used and end the line when the for loop completes.
60+
61+
for port in dropDuplicates:
62+
print(port + " <br> ", end= "")
63+
print("|")

0 commit comments

Comments
 (0)