Skip to content

Instantly share code, notes, and snippets.

@jdoss
Last active July 21, 2022 11:48
Show Gist options
  • Save jdoss/ad87375b776178e9031685b71dbe37cf to your computer and use it in GitHub Desktop.
Save jdoss/ad87375b776178e9031685b71dbe37cf to your computer and use it in GitHub Desktop.
Quick Owncast setup with Podman.
#!/bin/bash
set -e
DOMAIN=example.com
OWNCAST_VERSION=latest
CADDY_VERSION=latest
## Create Pod
podman pod create --replace --name owncast-pod \
-p 80:80 \
-p 443:443 \
-p 1935:1935
echo "Start Owncast"
podman volume create owncast 2> /dev/null ||:
podman create --replace --pod owncast-pod \
--volume owncast:/app/data:Z \
--name owncast \
docker.io/gabekangas/owncast:${OWNCAST_VERSION}
podman start owncast
echo "Start Caddy"
podman volume create caddy-data 2> /dev/null ||:
podman volume create caddy-config 2> /dev/null ||:
podman create --replace --pod owncast-pod \
--name caddy \
--volume caddy-data:/data:Z \
--volume caddy-config:/config:Z \
docker.io/library/caddy:${CADDY_VERSION} caddy reverse-proxy --from ${DOMAIN} --to localhost:8080
podman start caddy
@eriksjolund
Copy link

If you run rootless Podman, you might get better network performance if you use socket activation.
(I haven't done any benchmarks, though)

Rootless Podman get native network performance for the traffic that is sent over a socket activation socket:
https://github.com/containers/podman/blob/main/docs/tutorials/socket_activation.md#native-network-performance-over-the-socket-activated-socket

I created a PR for adding socket activation support to owncast
owncast/owncast#1751

and also a feature request with rationale arguments
owncast/owncast#1750

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment