Official Docker image
Castopod publishes a single official Docker image to the Docker Hub as part of its automated build process:
castopod/castopod: an all-in-one image integrating FrankenPHP and Caddy, optimized for production environments. It is based on serversideup/php.
Castopod requires a MySQL-compatible database to function. Optionally, a Redis service can be configured as the caching layer.
Supported tags
Section titled “Supported tags”1.x.x, specific version build (since1.0.0)1, latest build for version 1latest, latest version builddevelop[unstable], latest development branch build
Other unstable channels (e.g., beta, next, 2-next) may be actively pushed during development phases.
See all tags in the docker hub.
Example usage
Section titled “Example usage”-
Install docker and docker compose
-
Create a
compose.ymlfile with the following:services:castopod:image: castopod/castopod:1 # Pin to a specific version during productioncontainer_name: "castopod"volumes:- castopod-media:/app/public/mediaenvironment:MYSQL_DATABASE: castopodMYSQL_USER: castopodMYSQL_PASSWORD: changemeCP_BASEURL: "https://castopod.example.com"CP_ANALYTICS_SALT: changemeCP_CACHE_HANDLER: redisCP_REDIS_HOST: redisCP_REDIS_PASSWORD: changemenetworks:- castopod-app- castopod-dbports:- "8080:8080" # HTTP- "8443:8443" # HTTPS- "8443:8443/udp" # HTTP/3restart: unless-stoppedhealthcheck:test: ["CMD", "curl", "-f", "http://localhost:8080/health"]interval: 30stimeout: 10sretries: 3start_period: 30s # allows bootstrap/migrations timedepends_on:mariadb:condition: service_healthyrestart: trueredis:condition: service_startedmariadb:image: mariadb:12.1container_name: "castopod-mariadb"networks:- castopod-dbvolumes:- castopod-db:/var/lib/mysqlenvironment:MYSQL_ROOT_PASSWORD: changemeMYSQL_DATABASE: castopodMYSQL_USER: castopodMYSQL_PASSWORD: changemerestart: unless-stoppedhealthcheck:test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]start_period: 10sinterval: 10stimeout: 5sretries: 3redis:image: redis:8.4-alpinecontainer_name: "castopod-redis"command: --requirepass changemevolumes:- castopod-cache:/datanetworks:- castopod-appvolumes:castopod-media:castopod-db:castopod-cache:networks:castopod-app:castopod-db:internal: trueYou have to adapt some variables to your needs (e.g.
CP_BASEURL,MYSQL_ROOT_PASSWORD,MYSQL_PASSWORDandCP_ANALYTICS_SALT). -
Setup a reverse proxy for TLS (SSL/HTTPS)
TLS is mandatory for ActivityPub to work. This job can easily be handled by a reverse proxy, for example with Caddy:
#castopodcastopod.example.com {reverse_proxy localhost:8080} -
Run
docker compose up -d, wait for it to initialize and head on tohttps://castopod.example.com/cp-installto finish setting up Castopod! -
You’re all set, start podcasting! 🎙️🚀
Environment Variables
Section titled “Environment Variables”| Variable name | Type (default) | Default |
|---|---|---|
CP_BASEURL | string | undefined |
CP_MEDIA_BASEURL | ?string | CP_BASEURL |
CP_ADMIN_GATEWAY | ?string | "cp-admin" |
CP_AUTH_GATEWAY | ?string | "cp-auth" |
CP_ANALYTICS_SALT | string | undefined |
CP_DATABASE_HOSTNAME | ?string | "mariadb" |
CP_DATABASE_NAME | ?string | MYSQL_DATABASE |
CP_DATABASE_USERNAME | ?string | MYSQL_USER |
CP_DATABASE_PASSWORD | ?string | MYSQL_PASSWORD |
CP_DATABASE_PREFIX | ?string | "cp_" |
CP_CACHE_HANDLER | ["file" or "redis"] | "file" |
CP_REDIS_HOST | ?string | "localhost" |
CP_REDIS_PASSWORD | ?string | null |
CP_REDIS_PORT | ?number | 6379 |
CP_REDIS_DATABASE | ?number | 0 |
CP_EMAIL_SMTP_HOST | ?string | undefined |
CP_EMAIL_FROM | ?string | undefined |
CP_EMAIL_SMTP_USERNAME | ?string | "localhost" |
CP_EMAIL_SMTP_PASSWORD | ?string | null |
CP_EMAIL_SMTP_PORT | ?number | 25 |
CP_EMAIL_SMTP_CRYPTO | ["tls" or "ssl"] | "tls" |
CP_ENABLE_2FA | ?boolean | undefined |
CP_MEDIA_FILE_MANAGER | ?string | undefined |
CP_MEDIA_S3_ENDPOINT | ?string | undefined |
CP_MEDIA_S3_KEY | ?string | undefined |
CP_MEDIA_S3_SECRET | ?string | undefined |
CP_MEDIA_S3_REGION | ?string | undefined |
CP_MEDIA_S3_BUCKET | ?string | undefined |
CP_MEDIA_S3_PROTOCOL | ?number | undefined |
CP_MEDIA_S3_PATH_STYLE_ENDPOINT | ?boolean | undefined |
CP_MEDIA_S3_KEY_PREFIX | ?string | undefined |
CP_DISABLE_HTTPS | ?[0 or 1] | undefined |
PHP_MEMORY_LIMIT | ?number (with suffix) | 512M |
PHP_UPLOAD_MAX_FILE_SIZE | ?number (with suffix) | 512M |
PHP_POST_MAX_SIZE | ?number (with suffix) | 512M |
PHP_MAX_EXECUTION_TIME | ?number | 300 |
PHP_OPCACHE_ENABLE | ?[0 or 1] | 1 |