@@ -39,6 +39,10 @@ The Image has a very minimal installation of Linux with no services running and
39
39
40
40
## Installation through Docker
41
41
42
+ ::: tip Note
43
+ Some explanations are valid for linux systems only, alltough some windows examples can be found below.
44
+ :::
45
+
42
46
### Obtaining the Official image from DockerHub
43
47
44
48
[ Docker Hub] ( https://hub.docker.com/r/openhab/openhab/ ) has the basic information necessary to acquire and run the Docker image.
@@ -77,6 +81,10 @@ Note, always review the README on [Docker Hub](https://hub.docker.com/r/openhab/
77
81
Services can be run an maintained on a Linux machine one of two ways, using Docker or using the system's built in service management (e.g. systemd).
78
82
If using docker to manage the service, run the following command:
79
83
84
+ :::: tabs
85
+
86
+ ::: tab Linux
87
+
80
88
``` bash
81
89
docker run \
82
90
--name openhab \
@@ -94,6 +102,31 @@ docker run \
94
102
openhab/openhab:< version> -< distribution>
95
103
```
96
104
105
+ :::
106
+
107
+ ::: tab Windows
108
+
109
+ ``` bash
110
+ docker run ^
111
+ --name openhab ^
112
+ --net=host ^
113
+ -v /etc/localtime:/etc/localtime:ro ^
114
+ -v /etc/timezone:/etc/timezone:ro ^
115
+ -v /opt/openhab/conf:/openhab/conf ^
116
+ -v /opt/openhab/userdata:/openhab/userdata ^
117
+ -v /opt/openhab/addons:/openhab/addons ^
118
+ -d ^
119
+ -e USER_ID=< uid> ^
120
+ -e GROUP_ID=< gid> ^
121
+ -e CRYPTO_POLICY=unlimited ^
122
+ --restart=always ^
123
+ openhab/openhab:< version> -< distribution>
124
+ ```
125
+
126
+ :::
127
+
128
+ ::::
129
+
97
130
Where
98
131
99
132
- ` <uid> ` is the user ID number for the ` openhab ` user which you can obtain using the command ` id openhab ` ,
@@ -229,13 +262,32 @@ If you want use an USB stick (for example for Z-Wave network), then it will be n
229
262
In Docker openHAB is running in name of ` openhab ` , a restricted user.
230
263
The stick will work if you run the following command right after docker image is started.
231
264
265
+ :::: tabs
266
+
267
+ ::: tab Linux
268
+
232
269
``` bash
233
270
docker exec \
234
271
-d \
235
272
openhab \
236
273
/bin/chmod o+rw /dev/ttyACM0
237
274
```
238
275
276
+ :::
277
+
278
+ ::: tab Windows
279
+
280
+ ``` bash
281
+ docker exec ^
282
+ -d ^
283
+ openhab ^
284
+ /bin/chmod o+rw /dev/ttyACM0
285
+ ```
286
+
287
+ :::
288
+
289
+ ::::
290
+
239
291
This command changes permissions of the specific device as expected (readable and writable for everyone).
240
292
241
293
::: tip Note
0 commit comments