2022-04-18 18:53:28 +00:00
|
|
|
# Docker
|
|
|
|
|
2023-01-25 22:00:21 +00:00
|
|
|
## Important note
|
|
|
|
Starting with v0.18.0, tag names have changed. You may no longer use `latest`, `master`, `vX.X.X`.
|
|
|
|
|
2022-10-28 01:51:24 +00:00
|
|
|
## Build your own containers
|
|
|
|
This image provides a method for you to easily use the latest Sunshine release in your own docker projects. It is not
|
|
|
|
intended to use as a standalone container at this point, and should be considered experimental.
|
|
|
|
|
|
|
|
```dockerfile
|
2023-01-25 22:00:21 +00:00
|
|
|
ARG SUNSHINE_VERSION=latest
|
|
|
|
ARG SUNSHINE_OS=ubuntu-22.04
|
|
|
|
FROM lizardbyte/sunshine:${SUNSHINE_VERSION}-${SUNSHINE_OS}
|
2022-10-28 01:51:24 +00:00
|
|
|
|
|
|
|
# install Steam, Wayland, etc.
|
|
|
|
|
|
|
|
ENTRYPOINT steam && sunshine
|
|
|
|
```
|
|
|
|
|
2023-01-25 22:00:21 +00:00
|
|
|
### SUNSHINE_VERSION
|
|
|
|
- `latest`, `master`, `vX.X.X`
|
|
|
|
- commit hash
|
|
|
|
|
|
|
|
### SUNSHINE_OS
|
2023-02-13 20:27:51 +00:00
|
|
|
Sunshine images are available with the following tag suffixes, based on their respective base images.
|
2023-01-25 22:00:21 +00:00
|
|
|
|
2023-02-13 20:27:51 +00:00
|
|
|
- `archlinux`
|
2024-08-05 18:44:17 +00:00
|
|
|
- `debian-bookworm`
|
|
|
|
- `fedora-39`
|
|
|
|
- `fedora-40`
|
2023-01-25 22:00:21 +00:00
|
|
|
- `ubuntu-22.04`
|
2024-08-05 18:44:17 +00:00
|
|
|
- `ubuntu-24.04`
|
2023-01-25 22:00:21 +00:00
|
|
|
|
|
|
|
### Tags
|
|
|
|
You must combine the `SUNSHINE_VERSION` and `SUNSHINE_OS` to determine the tag to pull. The format should be
|
2024-08-05 18:44:17 +00:00
|
|
|
`<SUNSHINE_VERSION>-<SUNSHINE_OS>`. For example, `latest-ubuntu-24.04`.
|
2023-01-25 22:00:21 +00:00
|
|
|
|
|
|
|
See all our available tags on [docker hub](https://hub.docker.com/r/lizardbyte/sunshine/tags) or
|
|
|
|
[ghcr](https://github.com/LizardByte/Sunshine/pkgs/container/sunshine/versions) for more info.
|
|
|
|
|
2022-10-28 01:51:24 +00:00
|
|
|
## Where used
|
|
|
|
This is a list of docker projects using Sunshine. Something missing? Let us know about it!
|
|
|
|
|
|
|
|
- [Games on Whales](https://games-on-whales.github.io)
|
|
|
|
|
|
|
|
## Port and Volume mappings
|
|
|
|
Examples are below of the required mappings. The configuration file will be saved to `/config` in the container.
|
|
|
|
|
|
|
|
### Using docker run
|
2022-04-18 18:53:28 +00:00
|
|
|
Create and run the container (substitute your `<values>`):
|
|
|
|
|
|
|
|
```bash
|
|
|
|
docker run -d \
|
2024-01-19 02:53:33 +00:00
|
|
|
--device /dev/dri/ \
|
2022-10-28 01:51:24 +00:00
|
|
|
--name=<image_name> \
|
2024-01-19 02:53:33 +00:00
|
|
|
--restart=unless-stopped \
|
2022-04-18 18:53:28 +00:00
|
|
|
-e PUID=<uid> \
|
|
|
|
-e PGID=<gid> \
|
|
|
|
-e TZ=<timezone> \
|
2022-10-28 01:51:24 +00:00
|
|
|
-v <path to data>:/config \
|
2022-07-29 13:45:26 +00:00
|
|
|
-p 47984-47990:47984-47990/tcp \
|
2022-04-18 18:53:28 +00:00
|
|
|
-p 48010:48010 \
|
2022-07-29 13:45:26 +00:00
|
|
|
-p 47998-48000:47998-48000/udp \
|
2022-10-28 01:51:24 +00:00
|
|
|
<image>
|
2022-04-18 18:53:28 +00:00
|
|
|
```
|
|
|
|
|
2022-10-28 01:51:24 +00:00
|
|
|
### Using docker-compose
|
2022-04-18 18:53:28 +00:00
|
|
|
Create a `docker-compose.yml` file with the following contents (substitute your `<values>`):
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
version: '3'
|
|
|
|
services:
|
2022-10-28 01:51:24 +00:00
|
|
|
<image_name>:
|
|
|
|
image: <image>
|
2022-04-18 18:53:28 +00:00
|
|
|
container_name: sunshine
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
2022-07-29 13:45:26 +00:00
|
|
|
- <path to data>:/config
|
2022-04-18 18:53:28 +00:00
|
|
|
environment:
|
2022-07-29 13:45:26 +00:00
|
|
|
- PUID=<uid>
|
|
|
|
- PGID=<gid>
|
|
|
|
- TZ=<timezone>
|
2022-04-18 18:53:28 +00:00
|
|
|
ports:
|
2022-10-28 01:51:24 +00:00
|
|
|
- "47984-47990:47984-47990/tcp"
|
|
|
|
- "48010:48010"
|
|
|
|
- "47998-48000:47998-48000/udp"
|
2022-04-18 18:53:28 +00:00
|
|
|
```
|
|
|
|
|
2024-01-19 02:53:33 +00:00
|
|
|
### Using podman run
|
|
|
|
Create and run the container (substitute your `<values>`):
|
|
|
|
|
|
|
|
```bash
|
|
|
|
podman run -d \
|
|
|
|
--device /dev/dri/ \
|
|
|
|
--name=<image_name> \
|
|
|
|
--restart=unless-stopped \
|
|
|
|
--userns=keep-id \
|
|
|
|
-e PUID=<uid> \
|
|
|
|
-e PGID=<gid> \
|
|
|
|
-e TZ=<timezone> \
|
|
|
|
-v <path to data>:/config \
|
|
|
|
-p 47984-47990:47984-47990/tcp \
|
|
|
|
-p 48010:48010 \
|
|
|
|
-p 47998-48000:47998-48000/udp \
|
|
|
|
<image>
|
|
|
|
```
|
|
|
|
|
2022-10-28 01:51:24 +00:00
|
|
|
### Parameters
|
2022-04-18 18:53:28 +00:00
|
|
|
You must substitute the `<values>` with your own settings.
|
|
|
|
|
|
|
|
Parameters are split into two halves separated by a colon. The left side represents the host and the right side the
|
|
|
|
container.
|
|
|
|
|
|
|
|
**Example:** `-p external:internal` - This shows the port mapping from internal to external of the container.
|
|
|
|
Therefore `-p 47990:47990` would expose port `47990` from inside the container to be accessible from the host's IP on
|
|
|
|
port `47990` (e.g. `http://<host_ip>:47990`). The internal port must be `47990`, but the external port may be changed
|
2022-07-29 13:45:26 +00:00
|
|
|
(e.g. `-p 8080:47990`). All the ports listed in the `docker run` and `docker-compose` examples are required.
|
2022-04-18 18:53:28 +00:00
|
|
|
|
|
|
|
|
2022-12-28 21:30:32 +00:00
|
|
|
| Parameter | Function | Example Value | Required |
|
|
|
|
|-----------------------------|----------------------|--------------------|----------|
|
|
|
|
| `-p <port>:47990` | Web UI Port | `47990` | True |
|
|
|
|
| `-v <path to data>:/config` | Volume mapping | `/home/sunshine` | True |
|
|
|
|
| `-e PUID=<uid>` | User ID | `1001` | False |
|
|
|
|
| `-e PGID=<gid>` | Group ID | `1001` | False |
|
|
|
|
| `-e TZ=<timezone>` | Lookup [TZ value][1] | `America/New_York` | False |
|
2022-04-18 18:53:28 +00:00
|
|
|
|
2022-10-28 01:51:24 +00:00
|
|
|
[1]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
2022-04-18 18:53:28 +00:00
|
|
|
|
2022-10-28 01:51:24 +00:00
|
|
|
#### User / Group Identifiers:
|
2022-04-18 18:53:28 +00:00
|
|
|
When using data volumes (-v flags) permissions issues can arise between the host OS and the container. To avoid this
|
|
|
|
issue you can specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same
|
|
|
|
user you specify.
|
|
|
|
|
|
|
|
In this instance `PUID=1001` and `PGID=1001`. To find yours use id user as below:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ id dockeruser
|
|
|
|
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
|
|
|
|
```
|
2022-10-28 01:51:24 +00:00
|
|
|
|
|
|
|
If you want to change the PUID or PGID after the image has been built, it will require rebuilding the image.
|
2022-11-02 19:06:56 +00:00
|
|
|
|
|
|
|
## Supported Architectures
|
|
|
|
|
2023-01-25 22:00:21 +00:00
|
|
|
Specifying `lizardbyte/sunshine:latest-<SUNSHINE_OS>` or `ghcr.io/lizardbyte/sunshine:latest-<SUNSHINE_OS>` should
|
|
|
|
retrieve the correct image for your architecture.
|
2022-11-02 19:06:56 +00:00
|
|
|
|
2023-02-13 20:27:51 +00:00
|
|
|
The architectures supported by these images are shown in the table below.
|
2022-11-02 19:06:56 +00:00
|
|
|
|
2023-02-13 20:27:51 +00:00
|
|
|
| tag suffix | amd64/x86_64 | arm64/aarch64 |
|
|
|
|
|-----------------|--------------|---------------|
|
|
|
|
| archlinux | ✅ | ❌ |
|
2024-01-19 02:53:33 +00:00
|
|
|
| debian-bookworm | ✅ | ✅ |
|
2024-08-05 18:44:17 +00:00
|
|
|
| fedora-39 | ✅ | ❌ |
|
|
|
|
| fedora-40 | ✅ | ❌ |
|
2023-02-13 20:27:51 +00:00
|
|
|
| ubuntu-22.04 | ✅ | ✅ |
|
2024-08-05 18:44:17 +00:00
|
|
|
| ubuntu-24.04 | ✅ | ✅ |
|
|
|
|
|
|
|
|
<div class="section_buttons">
|
|
|
|
|
|
|
|
| Previous | Next |
|
|
|
|
|:-------------------------------|-----------------------------------------------------:|
|
|
|
|
| [Changelog](docs/changelog.md) | [Third-Party Packages](docs/third_party_packages.md) |
|
|
|
|
|
|
|
|
</div>
|