github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-system-service.1.md (about) 1 % podman-service(1) 2 3 ## NAME 4 podman\-system\-service - Run an API service 5 6 ## SYNOPSIS 7 **podman system service** [*options*] 8 9 ## DESCRIPTION 10 The **podman system service** command creates a listening service that will answer API calls for Podman. You may 11 optionally provide an endpoint for the API in URI form. For example, *unix:///tmp/foobar.sock* or *tcp:localhost:8080*. 12 If no endpoint is provided, defaults will be used. The default endpoint for a rootful 13 service is *unix:///run/podman/podman.sock* and rootless is *unix://$XDG_RUNTIME_DIR/podman/podman.sock* (for 14 example *unix:///run/user/1000/podman/podman.sock*) 15 16 To access the API service inside a container: 17 - mount the socket as a volume 18 - run the container with `--security-opt label=disable` 19 20 The REST API provided by **podman system service** is split into two parts: a compatibility layer offering support for the Docker v1.40 API, and a Podman-native Libpod layer. 21 Documentation for the latter is available at *https://docs.podman.io/en/latest/_static/api.html*. 22 Both APIs are versioned, but the server will not reject requests with an unsupported version set. 23 24 Note: The default systemd unit files (system and user) change the log-level option to *info* from *error*. This change provides additional information on each API call. 25 26 ## OPTIONS 27 28 #### **--cors** 29 30 CORS headers to inject to the HTTP response. The default value is empty string which disables CORS headers. 31 32 #### **--help**, **-h** 33 34 Print usage statement. 35 36 #### **--time**, **-t** 37 38 The time until the session expires in _seconds_. The default is 5 39 seconds. A value of `0` means no timeout, therefore the session will not expire. 40 41 The default timeout can be changed via the `service_timeout=VALUE` field in containers.conf. 42 See **[containers.conf(5)](https://github.com/containers/common/blob/master/docs/containers.conf.5.md)** for more information. 43 44 ## EXAMPLES 45 46 Run an API listening for 5 seconds using the default socket. 47 ``` 48 podman system service --time 5 49 ``` 50 51 ## SEE ALSO 52 **[podman(1)](podman.1.md)**, **[podman-system-connection(1)](podman-system-connection.1.md)**, **[containers.conf(5)](https://github.com/containers/common/blob/master/docs/containers.conf.5.md)** 53 54 ## HISTORY 55 January 2020, Originally compiled by Brent Baude `<bbaude@redhat.com>` 56 November 2020, Updated by Jhon Honce (jhonce at redhat dot com)