Last active
July 21, 2022 11:48
-
-
Save jdoss/ad87375b776178e9031685b71dbe37cf to your computer and use it in GitHub Desktop.
Quick Owncast setup with Podman.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
Run this as root on Fedora 35 after installing podman (sudo dnf install podman) and change the DOMAIN var to the domain name you want to use.