Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • adaures/castopod
  • mkljczk/castopod-host
  • spaetz/castopod-host
  • PatrykMis/castopod
  • jonas/castopod
  • ajeremias/castopod
  • misuzu/castopod
  • KrzysztofDomanczyk/castopod
  • Behel/castopod
  • nebulon/castopod
  • ewen/castopod
  • NeoluxConsulting/castopod
  • nateritter/castopod-og
  • prcutler/castopod
14 results
Show changes
Showing
with 1767 additions and 0 deletions
---
title: Problemas de seguridad
---
Castopod está construido sobre [CodeIgniter4](https://codeigniter.com/), un
framework de PHP que alienta
[buenas prácticas de seguridad](https://codeigniter.com/user_guide/concepts/security.html).
Para maximizar la seguridad de su instancia y prevenir cualquier ataque
malicioso, le recomendamos que actualice todos los permisos de sus archivos
Castopod después de la instalación o actualizaciones (para evitar cualquier
error de permiso previo):
- `writable/` carpeta debe ser **legible** y **escribible**.
- `public/media/` carpeta debe ser **legible** y **escribible**.
- cualquier otro archivo debe establecerse a **solo lectura**.
Por ejemplo, si estás usando Apache o NGINX con Ubuntu puedes hacer lo
siguiente:
```bash
sudo chown -R root:root /path/to/castopod
sudo chown -R www-data:www-data /path/to/castopod/writable
sudo chown -R www-data:www-data /path/to/castopod/public/media
```
---
title: ¿Cómo actualizar Castopod?
---
import { Aside } from "@astrojs/starlight/components";
Después de instalar Castopod, es posible que quieras actualizar tu instancia a
la última versión para disfrutar de las últimas características ✨, correcciones
de errores 🐛 y mejoras de rendimiento ⚡.
## Instrucciones de Actualización
0. ⚠️ Antes de cualquier actualización, te recomendamos que respaldes tus
archivos de Castopod y base de datos.
- cf.
[¿Debería hacer una copia de seguridad antes de actualizar?](#should-i-make-a-backup-before-updating)
1. Vaya a la página de
[lanzamientos](https://code.castopod.org/adaures/castopod/-/releases) y vea
si su instancia está actualizada con la última versión de Castopod
- cf.
[¿Dónde puedo encontrar mi versión de Castopod?](#where-can-i-find-my-castopod-version)
2. Descargue el último paquete de lanzamiento llamado `Paquete Castopod`, puede
elegir entre los archivos `zip` o `tar.gz`
- ⚠️ Asegúrate de descargar el paquete de Castopod y **NO** el código fuente
- Ten en cuenta que también puedes descargar el último paquete de
[castopod.org](https://castopod.org/)
3. En tu servidor:
- Eliminar todos los archivos excepto `.env` y la carpeta `public/media`
- Copie los nuevos archivos del paquete descargado en su servidor
<Aside>
Es posible que necesite restablecer los permisos de los archivos después el
proceso de instalación. Compruebe
[preocupaciones de seguridad](./security.md).
</Aside>
4. Actualice su esquema de base de datos desde su `Administrador de Castopod` >
`Acerca de` página o ejecutando:
```bash
php spark castopod:database-update
```
5. Limpia tu caché en `Administrador de Castopod` > `Ajustes` > `general` >
`Housekeeping`
6. ✨ ¡Disfruta de tu instancia recién instalada, todo listo!
<Aside>
Las versiones pueden venir con instrucciones de actualización adicionales (véase
la página de
[lanzamientos](https://code.castopod.org/adaures/castopod/-/releases)).
- cf. No he actualizado mi instancia en mucho tiempo… ¿Qué debo hacer?
</Aside>
## Actualizaciones totalmente automatizadas
> Próximamente... 👀
## Preguntas Frecuentes (FAQ)
### ¿Dónde puedo encontrar mi versión de Castopod?
Ve al panel de administración de Castopod, la versión se muestra en la esquina
inferior izquierda.
Alternativamente, puedes encontrar la versión en el archivo
`app > Config > Constants.php`.
### No he actualizado mi instancia en mucho tiempo… ¿Qué debo hacer?
No problem! Just get the latest release as described above. Simplemente cuando
vaya a través de las instrucciones de lanzamiento (4), realice la actualización
secuencialmente, desde el más antiguo hasta el más reciente.
> Puede que quieras hacer una copia de seguridad de tu instancia dependiendo del
> tiempo que no hayas actualizado Castopod.
Por ejemplo, si estás en `v1.0.0-alpha.42` y te gustaría actualizar a
`v1.0.0-beta.1`:
0. (altamente recomendado) Haga una copia de seguridad de sus archivos y base de
datos.
1. Descarga la última versión, sobrescribe tus archivos manteniendo `.env` y
`public/media`.
2. Repase las instrucciones de actualización de cada versión secuencialmente (de
más antiguo a más reciente) comenzando con `v1.0.0-alpha. 3`,
`v1.0.0-alpha.44`, `v1.0.0-alpha.45`, …, `v1.0.0-beta.1`.
3. ✨ ¡Disfruta de tu instancia recién instalada, todo listo!
### ¿Debo hacer una copia de seguridad antes de actualizar?
Te aconsejamos que lo hagas, así que no lo pierdas todo si algo sale mal!
De manera más general, te aconsejamos hacer copias de seguridad regulares de tus
archivos de Castopod y base de datos para evitar que pierdas todo…
---
title: Bienvenido 👋
---
import { LinkCard } from "@astrojs/starlight/components";
Castopod es una plataforma gratuita y de código abierto para hospedar podcasts
hecha para podcasters que quieren involucrar e interactuar más con su audiencia.
Castopod es fácil de instalar y se ha desarrollado sobre
[CodeIgniter4](https://codeigniter.com/), un potente y muy ligero framework PHP.
<LinkCard title="Instalación" href="./getting-started/install" />
## Características
- 🌱 Gratis & de código abierto (licencia AGPL v3).
- 🔐 Centrado en la soberanía de los datos: tu contenido, tu audiencia, y tus
estadísticas te pertenecen a ti y solo a ti.
- 🪄 Funciones de Podcasting 2.0: GUID (interfaz gráfica de usuario),
protección y bloqueo del podcast, transcripciones, monetización, episodios,
geo-localización, personas, fragmentos de audio, …
- 💬 Integración con redes sociales:
- 🚀 Castopod es parte del Fediverso, una red social descentralizada
- ❤️ Se puede crear mensajes, compartir, agregar a favoritos y comentar en
episodios
- 📈 Análisis estadísticos integrados:
- ⚖️ Compatible con GDPR / CCPA / LGPD
- 🪙 Medida de audiencia con el estándar IABv2
- 🏡 On-premises analytics, no third party involved
- 📢 Herramientas de marketing incorporadas:
- ✅ Listo para SEO (meta-etiquetas de open-graph, JSON-LD, …)
- 📱 PWA: instalable como una aplicación independiente
- 🎨 Personalizar los colores del tema
- 🎬 Generar recortes de vídeo listos para compartir, a partir de tus
episodios
- 🔉 Generate soundbites
- ▶️ Reproductor incrustable, con el que insertar tus episodios en cualquier
sitio web!
- 💸 Monetización:
- 🔗 Enlaces de financiación
- 📲 Anuncios publicitarios del tipo click-para-escuchar
- 🤝 value4value / WebMonetization (criptomonedas para creadores de
contenido).
- 💎 Premium podcasts
- 📡 Publica tus episodios en todas partes con RSS:
- 📱 En todos los directorios y aplicaciones: Podcast Index, Apple Podcasts,
Spotify, Google Podcasts, Deezer, Podcast Addict, Podfriend, …
- ⚡ Emite tus episodios al instante con WebSub.
- 📥 Importación de podcasts: mueve tu podcast existente en otro servicio a tu
servidor Castopod.
- 📤 Mueve tu podcast fuera de Castopod.
- 🔀 Multi-podcast: aloja tantos podcasts como quieras en una misma
instancia/panel de CASTOPOD.
- 👥 Multi-usuario: añade colaboradores y define roles.
- 🌎 Soporte multilingüe i18n: traducido al Inglés, Francés, Polaco, Alemán,
Portugués brasileño, Español, Noruego, … ¡y
[más por venir](https://translate.castopod.org)!
## Motivación
The podcasting ecosystem is decentralized by nature: you can create your podcast
as an RSS file, publish it on the web and have it shared everywhere online.
It is in fact one of the only media to have stayed this way for a long time.
As usages are evolving, more and more people are getting into podcasts: whether
it is creators finding new ways to share their ideas, or listeners in the search
for better content.
With podcasting becoming more widely used, some companies are trying to shift it
towards a more controlled and centralized medium.
Castopod was created in an effort to provide an open and sustainable alternative
to hosting your podcasts, promoting decentralization to ensure that podcasters
creativity can express itself.
This project is pushed by the open-source community, and specifically by the
[Fediverse](https://fediverse.party/en/fediverse/) and
[Podcasting 2.0](https://podcastindex.org/) movements.
## Comparación con otras soluciones
We believe that a solution is not necessarily right for everyone, it highly
depends on your needs. So, here are comparisons with other tools to help you to
gauge whether Castopod is the right fit for you.
### Castopod vs. Wordpress
Castopod is often referred to as "the Wordpress for podcasts" because of the
similarities between the two. In some ways this is true. And actually, Castopod
was greatly inspired by the Wordpress ecosystem, seeing the ease of adoption
from the community and the number of websites running it.
Just like Wordpress, Castopod is free & open source, built using PHP with a
MySQL database and is packaged in a way that you can easily install on most web
servers.
Wordpress is a great way to create your website and extend it with plugins to
get what you want. It is a full fledged CMS that helps you get any type of
website online.
On the other hand, Castopod is meant to address the podcasters needs
specifically, focusing on podcasting, and nothing else. You don't need any
plugin to get you started on your podcasting journey.
This allows optimizing the processes specific to podcasting: ranging from the
creation of your podcasts and the publication of new episodes all the way to
broadcasting, marketing and analytics.
Finally, depending on your needs, Wordpress and Castopod can even live side by
side as they share the same requirements!
### Castopod vs. Funkwhale
Funkwhale is a self-hosted, modern free and open-source music server. Just as
Castopod, Funkwhale is on the fediverse, a decentralized social network allowing
interoperability between the two.
Funkwhale was initially built around music. And later on, as the project
evolved, the ability to host podcasts was introduced.
Unlike Funkwhale, Castopod has been designed and built around podcasting
exclusively. This allows easier implementation for features related to the
podcasting ecosystem, such as the podcasting 2.0 features (transcripts,
chapters, locations, persons, …).
So, you should probably use Funkwhale if you want to host your music, and use
Castopod if you want to host your podcasts.
### Castopod vs. otras plataformas de podcast
There are many solutions for you to host your podcasts, some of which are really
great and [a lot of them](https://podcastindex.org/apps) are jumping into the
Podcasting 2.0 wagon just like Castopod!
Each of these solutions differ from one another, you may compare with the
[list of features](#features).
That being said, there are two main differences with other podcasting solutions:
- Castopod puede ser auto-hospedado en tu propio servidor y es la única solución
que te permite mantener un control completo sobre los contenidos que produces.
También, como es de código abierto, puedes incluso personalizarlo como desees
y necesites.
- Castopod es la única solución que hasta el momento integra tanto una red
social descentralizada con ActivityPub así como muchas de las características
del podcasting 2.0, con la esperanza de cerrar la brecha entre ambos.
## Contributing
Love Castopod and would like to help? Take a look at the following documentation
to get you started.
### Código de conducta
Castopod has adopted a Code of Conduct that we expect project participants to
adhere to. Please read the
[CODE_OF_CONDUCT manual](https://code.castopod.org/adaures/castopod/-/blob/beta/CODE_OF_CONDUCT.md)
so that you can understand what actions will and will not be tolerated.
### Guía para colaborar
Read our [contributing guide](../contributing/guidelines.md) to learn about our
development process, how to propose bugfixes and improvements, and how to build
and test your changes to Castopod.
## Contacto
You may reach us for help or ask any question you have on:
- [Discord](https://castopod.org/discord) (para interacción directa con
desarrolladores y la comunidad)
- [Seguimiento de incidencias](https://code.castopod.org/adaures/castopod/-/issues)
(para informar de errores y solicitar nuevas funcionalidades)
Alternatively, you can follow us on social media platforms to get news about
Castopod:
- [podlibre.social](https://podlibre.social/@castopod) (instancia de Mastodon)
- [\[Twitter\](https://twitter.com/castopod)](https://twitter.com/castopod)
- [\[LinkedIn\](https://linkedin.com/company/ad-aures)](https://linkedin.com/company/castopod)
- [Facebook (próximamente?)](https://www.facebook.com/castopod)
## Sponsors
The ongoing development of Castopod is made possible with the support of its
backers. If you'd like to help, please consider
[sponsoring Castopod's development](https://opencollective.com/castopod/contribute).
[![Ad Aures Logo](../../../assets/images/sponsors/adaures.svg)](https://adaures.com/)
[![NLnet Logo](../../../assets/images/sponsors/nlnet.svg)](https://nlnet.nl/)
## Licencia
[GNU Affero General Public License v3.0](https://choosealicense.com/licenses/agpl-3.0/)
Copyright © 2020-present, [Ad Aures](https://adaures.com/).
---
title: Authentication & Authorization
---
Castopod handles authentication and authorization using `codeigniter/shield`
coupled with custom rules. Roles and permissions are defined at two levels:
1. [instance wide](#1-instance-wide-roles-and-permissions)
2. [per podcast](#2-per-podcast-roles-and-permissions)
## 1. Instance wide roles and permissions
### Instance roles
{/* AUTH-INSTANCE-ROLES-LIST:START - Do not remove or modify this section */}
| role | description | permissions |
| ----------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------ |
| Super admin | Has complete control over Castopod. | admin.\*, plugins.\*, podcasts.\*, users.manage, persons.manage, pages.manage, fediverse.manage-blocks |
| Manager | Manages Castopod's content. | podcasts.create, podcasts.import, persons.manage, pages.manage |
| Podcaster | General users of Castopod. | admin.access |
{/* AUTH-INSTANCE-ROLES-LIST:END */}
### Instance permissions
{/* AUTH-INSTANCE-PERMISSIONS-LIST:START - Do not remove or modify this section */}
| permission | description |
| ----------------------- | ------------------------------------------------------------------ |
| admin.access | Can access the Castopod admin area. |
| admin.settings | Can access the Castopod settings. |
| plugins.manage | Auth.instance_permissions.plugins.manage |
| users.manage | Can manage Castopod users. |
| persons.manage | Can manage persons. |
| pages.manage | Can manage pages. |
| podcasts.view | Can view all podcasts. |
| podcasts.create | Can create new podcasts. |
| podcasts.import | Can import podcasts. |
| fediverse.manage-blocks | Can block fediverse actors/domains from interacting with Castopod. |
{/* AUTH-INSTANCE-PERMISSIONS-LIST:END */}
## 2. Per podcast roles and permissions
### Per podcast roles
{/* AUTH-PODCAST-ROLES-LIST:START - Do not remove or modify this section */}
| role | description | permissions |
| ------ | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Admin | Has complete control of podcast #\{id\}. | \* |
| Editor | Manages content and publications of podcast #\{id\}. | view, edit, manage-import, manage-persons, manage-platforms, manage-publications, manage-notifications, interact-as, episodes.view, episodes.create, episodes.edit, episodes.delete, episodes.manage-persons, episodes.manage-clips, episodes.manage-publications, episodes.manage-comments |
| Author | Manages content of podcast #\{id\} but cannot publish them. | view, manage-persons, episodes.view, episodes.create, episodes.edit, episodes.manage-persons, episodes.manage-clips |
| Guest | General contributor of the podcast #\{id\}. | view, episodes.view |
{/* AUTH-PODCAST-ROLES-LIST:END */}
### Per podcast permissions
{/* AUTH-PODCAST-PERMISSIONS-LIST:START - Do not remove or modify this section */}
| permission | description |
| ---------------------------- | -------------------------------------------------------------------------- |
| view | Can view dashboard and analytics of podcast #\{id\}. |
| edit | Can edit podcast #\{id\}. |
| delete | Can delete podcast #\{id\}. |
| manage-import | Can synchronize imported podcast #\{id\}. |
| manage-persons | Can manage subscriptions of podcast #\{id\}. |
| manage-subscriptions | Can manage subscriptions of podcast #\{id\}. |
| manage-contributors | Can manage contributors of podcast #\{id\}. |
| manage-platforms | Can set/remove platform links of podcast #\{id\}. |
| manage-publications | Can publish podcast #\{id\}. |
| manage-notifications | Can view and mark notifications as read for podcast #\{id\}. |
| interact-as | Can interact as the podcast #\{id\} to favourite, share or reply to posts. |
| episodes.view | Can view dashboards and analytics of podcast #\{id\}'s episodes. |
| episodes.create | Can create episodes for podcast #\{id\}. |
| episodes.edit | Can edit episodes of podcast #\{id\}. |
| episodes.delete | Can delete episodes of podcast #\{id\}. |
| episodes.manage-persons | Can manage episode persons of podcast #\{id\}. |
| episodes.manage-clips | Can manage video clips or soundbites of podcast #\{id\}. |
| episodes.manage-publications | Can publish/unpublish episodes and posts of podcast #\{id\}. |
| episodes.manage-comments | Can create/remove episode comments of podcast #\{id\}. |
{/* AUTH-PODCAST-PERMISSIONS-LIST:END */}
---
title: Official Docker images
---
Castopod pushes 3 Docker images to the Docker Hub during its automated build
process:
- [**`castopod/castopod`**](https://hub.docker.com/r/castopod/castopod): an all
in one castopod image using nginx unit
- [**`castopod/app`**](https://hub.docker.com/r/castopod/app): the app bundle
with all of Castopod dependencies
- [**`castopod/web-server`**](https://hub.docker.com/r/castopod/web-server): an
Nginx configuration for Castopod
Additionally, Castopod requires a MySQL-compatible database. A Redis database
can be added as a cache handler.
## Supported tags
- `develop` [unstable], latest development branch build
- `beta` [stable], latest beta version build
- `latest` [stable], latest version build
- `1.x.x` [stable], specific version build (since `1.0.0`)
## Example usage
1. Install [docker](https://docs.docker.com/get-docker/) and
[docker-compose](https://docs.docker.com/compose/install/)
2. Create a `docker-compose.yml` file with the following:
```yml
version: "3.7"
services:
app:
image: castopod/castopod:latest
container_name: "castopod-app"
volumes:
- castopod-media:/var/www/castopod/public/media
environment:
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
CP_BASEURL: "https://castopod.example.com"
CP_ANALYTICS_SALT: changeme
CP_CACHE_HANDLER: redis
CP_REDIS_HOST: redis
CP_REDIS_PASSWORD: changeme
networks:
- castopod-app
- castopod-db
ports:
- 8000:8000
restart: unless-stopped
mariadb:
image: mariadb:10.5
container_name: "castopod-mariadb"
networks:
- castopod-db
volumes:
- castopod-db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
restart: unless-stopped
redis:
image: redis:7.0-alpine
container_name: "castopod-redis"
command: --requirepass changeme
volumes:
- castopod-cache:/data
networks:
- castopod-app
volumes:
castopod-media:
castopod-db:
castopod-cache:
networks:
castopod-app:
castopod-db:
```
You have to adapt some variables to your needs (e.g. `CP_BASEURL`,
`MYSQL_ROOT_PASSWORD`, `MYSQL_PASSWORD` and `CP_ANALYTICS_SALT`).
3. 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](https://caddyserver.com/):
```
#castopod
castopod.example.com {
reverse_proxy localhost:8000
}
```
4. Run `docker-compose up -d`, wait for it to initialize and head on to
`https://castopod.example.com/cp-install` to finish setting up Castopod!
5. You're all set, start podcasting! 🎙️🚀
## Environment Variables
- **castopod/castopod** and **castopod/app**
| 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` |
| **`CP_MAX_BODY_SIZE`** | ?number (with suffix) | `512M` |
| **`CP_PHP_MEMORY_LIMIT`** | ?number (with suffix) | `512M` |
| **`CP_TIMEOUT`** | ?number | `900` |
- **castopod/web-server**
| Variable name | Type | Default |
| ---------------------- | --------------------- | ------- |
| **`CP_APP_HOSTNAME`** | ?string | `"app"` |
| **`CP_MAX_BODY_SIZE`** | ?number (with suffix) | `512M` |
| **`CP_TIMEOUT`** | ?number | `900` |
---
title: How to install Castopod?
---
import { Aside } from "@astrojs/starlight/components";
Castopod was thought-out to be easy to install. Whether using dedicated or
shared hosting, you can install it on most PHP-MySQL compatible web servers.
## Requirements
- PHP v8.4 or higher
- MySQL version 8.4 or higher or MariaDB version 11.4 or higher
- HTTPS support
- An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's
incoming requests
### PHP v8.4 or higher
PHP version 8.4 or higher is required, with the following extensions installed:
- [intl](https://php.net/manual/en/intl.requirements.php)
- [libcurl](https://php.net/manual/en/curl.requirements.php)
- [mbstring](https://php.net/manual/en/mbstring.installation.php)
- [gd](https://www.php.net/manual/en/image.installation.php) with **JPEG**,
**PNG** and **WEBP** libraries.
- [exif](https://www.php.net/manual/en/exif.installation.php)
Additionally, make sure that the following extensions are enabled in your PHP:
- json (enabled by default - don't turn it off)
- xml (enabled by default - don't turn it off)
- [mysqlnd](https://php.net/manual/en/mysqlnd.install.php)
### MySQL compatible database
> We recommend using [MariaDB](https://mariadb.org).
You will need the server hostname, database name, username and password to
complete the installation process. If you do not have these, please contact your
server administrator.
#### Privileges
User must have at least these privileges on the database for Castopod to work:
`CREATE`, `ALTER`, `DELETE`, `EXECUTE`, `INDEX`, `INSERT`, `SELECT`, `UPDATE`,
`REFERENCES`, `CREATE VIEW`.
### (Optional) FFmpeg v4.1.8 or higher for Video Clips
[FFmpeg](https://www.ffmpeg.org/) version 4.1.8 or higher is required if you
want to generate Video Clips. The following extensions must be installed:
- **FreeType 2** library for
[gd](https://www.php.net/manual/en/image.installation.php).
### (Optional) Other recommendations
- Redis for better cache performances.
- CDN for static files caching and better performances.
- e-mail gateway for lost passwords.
## Install instructions
### Pre-requisites
0. Get a Web Server with [requirements](#requirements) installed
1. Create a MySQL database for Castopod with a user having access and
modification privileges (for more info, see
[MySQL compatible database](#mysql-compatible-database)).
2. Activate HTTPS on your domain with an _SSL certificate_.
3. Download and unzip the latest [Castopod Package](https://castopod.org/) onto
the web server if you haven’t already.
- ⚠️ Set the web server document root to the `public/` sub-folder within the
`castopod` folder.
4. Add **cron tasks** on your web server for various background processes
(replace the paths accordingly):
```bash
* * * * * /path/to/php /path/to/castopod/spark tasks:run >> /dev/null 2>&1
```
**Note** - If you do not add this cron task, the following Castopod features
will not work:
- Importing a podcast from an existing RSS feed
- Broadcasting social activities to your followers in the fediverse
- Broadcasting episodes to open hubs using
[WebSub](https://en.wikipedia.org/wiki/WebSub)
- Generating video clips -
[requires FFmpeg](#optional-ffmpeg-v418-or-higher-for-video-clips)
### (recommended) Install Wizard
1. Run the Castopod install script by going to the install wizard page
(`https://your_domain_name.com/cp-install`) in your favorite web browser.
2. Follow the instructions on your screen.
3. Start podcasting!
<Aside>
The install script writes a `.env` file in the package root. If you cannot go
through the install wizard, you can create and edit the `.env` file manually
based on the `.env.example` file.
</Aside>
### Using CLI
1. Create a `.env` file in the package root based on the `.env.example` file.
2. Initialize the database using:
```sh
php spark install:init-database
```
3. Create the superadmin user using:
```sh
php spark install:create-superadmin
```
4. Head on to your admin gateway to start podcasting!
### Email/SMTP setup
Email configuration is required for some features to work properly (eg.
retrieving your forgotten password, sending instructions to premium subscribers,
…)
You may add your email configuration in your instance's `.env` like so:
```ini
# […]
email.fromEmail="your_email_address"
email.SMTPHost="your_smtp_host"
email.SMTPUser="your_smtp_user"
email.SMTPPass="your_smtp_password"
```
#### Email config options
| Variable name | Type | Default |
| ---------------- | -------------------- | ------------ |
| **`fromEmail`** | string | `undefined` |
| **`fromName`** | string | `"Castopod"` |
| **`SMTPHost`** | string | `undefined` |
| **`SMTPUser`** | string | `undefined` |
| **`SMTPPass`** | string | `undefined` |
| **`SMTPPort`** | number | `25` |
| **`SMTPCrypto`** | [`"tls"` or `"ssl"`] | `"tls"` |
### Media storage
By default, files are saved to the `public/media` folder using the file system.
If you need to relocate the `media` folder to a different location, you can
specify it in your `.env` file as shown below:
```ini
# […]
media.root="media"
media.storage="/mnt/storage"
```
In this example, the files will be saved to the /mnt/storage/media folder. Make
sure to also update your web server configuration to reflect this change.
### S3
If you prefer storing your media files on an S3 compatible storage, you may
specify it in your `.env`:
```ini
# […]
media.fileManager="s3"
media.s3.endpoint="your_s3_host"
media.s3.key="your_s3_key"
media.s3.secret="your_s3_secret"
media.s3.region="your_s3_region"
```
#### S3 config options
| Variable name | Type | Default |
| ----------------------- | ------- | ----------- |
| **`endpoint`** | string | `undefined` |
| **`key`** | string | `undefined` |
| **`secret`** | string | `undefined` |
| **`region`** | string | `undefined` |
| **`bucket`** | string | `castopod` |
| **`protocol`** | number | `undefined` |
| **`pathStyleEndpoint`** | boolean | `false` |
| **`keyPrefix`** | string | `undefined` |
## Community packages
If you don't want to bother with installing Castopod manually, you may use one
of the packages created and maintained by the open-source community.
### Install with YunoHost
[YunoHost](https://yunohost.org/) is a distribution based on Debian GNU/Linux
made up of free and open-source software packages. It manages the hardships of
self-hosting for you.
<div class="flex flex-wrap items-center gap-4">
<a
href="https://install-app.yunohost.org/?app=castopod"
target="_blank"
rel="noopener noreferrer"
>
<img
src="https://install-app.yunohost.org/install-with-yunohost.svg"
alt="Install Castopod with YunoHost"
class="align-middle"
/>
</a>
<a
href="https://github.com/YunoHost-Apps/castopod_ynh"
target="_blank"
rel="noopener noreferrer"
class="inline-flex items-center px-4 py-[.3rem] mx-auto font-semibold text-center text-black rounded-md gap-x-1 border-2 border-solid border-[#333] hover:no-underline hover:bg-gray-100"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="1em"
height="1em"
class="text-xl"
>
<path fill="none" d="M0 0h24v24H0z" />
<path d="M12 2A10 10 0 0 0 2 12a10 10 0 0 0 6.84 9.49c.5.09.69-.21.69-.48l-.02-1.86c-2.51.46-3.16-.61-3.36-1.18-.11-.28-.6-1.17-1.02-1.4-.35-.2-.85-.66-.02-.67.79-.01 1.35.72 1.54 1.02.9 1.52 2.34 1.1 2.91.83a2.1 2.1 0 0 1 .64-1.34c-2.22-.25-4.55-1.11-4.55-4.94A3.9 3.9 0 0 1 6.68 8.8a3.6 3.6 0 0 1 .1-2.65s.83-.27 2.75 1.02a9.28 9.28 0 0 1 2.5-.34c.85 0 1.7.12 2.5.34 1.9-1.3 2.75-1.02 2.75-1.02.54 1.37.2 2.4.1 2.65.63.7 1.02 1.58 1.02 2.68 0 3.84-2.34 4.7-4.56 4.94.36.31.67.91.67 1.85l-.01 2.75c0 .26.19.58.69.48A10.02 10.02 0 0 0 22 12 10 10 0 0 0 12 2z" />
</svg>
Github Repo
</a>
</div>
---
title: Security concerns
---
Castopod is built on top of [CodeIgniter4](https://codeigniter.com/), a PHP
framework that encourages
[good security practices](https://codeigniter.com/user_guide/concepts/security.html).
To maximize your instance's safety and prevent any malicious attack, we
recommend you update all your Castopod files permissions after installation or
updates (to avoid any prior permission error):
- `writable/` folder must be **readable** and **writable**.
- `public/media/` folder must be **readable** and **writable**.
- any other file must be set to **readonly**.
For instance, if you are using Apache or NGINX with Ubuntu you may do the
following:
```bash
sudo chown -R root:root /path/to/castopod
sudo chown -R www-data:www-data /path/to/castopod/writable
sudo chown -R www-data:www-data /path/to/castopod/public/media
```
---
title: How to update Castopod?
---
import { Aside } from "@astrojs/starlight/components";
After installing Castopod, you may want to update your instance to the latest
version in order to enjoy the latest features ✨, bug fixes 🐛 and performance
improvements ⚡.
## Update instructions
0. ⚠️ Before any update, we highly recommend you backup your Castopod files and
database.
- cf.
[Should I make a backup before updating?](#should-i-make-a-backup-before-updating)
1. Go to the
[releases page](https://code.castopod.org/adaures/castopod/-/releases) and
see if your instance is up to date with the latest Castopod version
- cf.
[Where can I find my Castopod version?](#where-can-i-find-my-castopod-version)
2. Download the latest release package named `Castopod Package`, you may choose
between the `zip` or `tar.gz` archives
- ⚠️ Make sure you download the Castopod Package and **NOT** the Source Code
- Note that you can also download the latest package from
[castopod.org](https://castopod.org/)
3. On your server:
- Remove all files except `.env` and `public/media`
- Copy the new files from the downloaded package into your server
<Aside>
You may need to reset files permissions as during the install process.
Check [Security Concerns](./security.md).
</Aside>
4. Update your database schema from your `Castopod Admin` > `About` page or by
running:
```bash
php spark castopod:database-update
```
5. Clear your cache from your `Castopod Admin` > `Settings` > `general` >
`Housekeeping`
6. ✨ Enjoy your fresh instance, you're all done!
<Aside>
Releases may come with additional update instructions (see
[releases page](https://code.castopod.org/adaures/castopod/-/releases)).
- cf.
[I haven't updated my instance in a long time… What should I do?](#i-havent-updated-my-instance-in-a-long-time-what-should-i-do)
</Aside>
## Fully Automated updates
> Coming soon... 👀
## Frequently asked questions (FAQ)
### Where can I find my Castopod version?
Go to your Castopod admin panel, the version is displayed on the bottom left
corner.
Alternatively, you can find the version in the `app > Config > Constants.php`
file.
### I haven't updated my instance in a long time… What should I do?
No problem! Just get the latest release as described above. Only, when going
through the release instructions (4), perform them sequentially, from the oldest
to the newest.
> You may want to backup your instance depending on how long you haven't updated
> Castopod.
For example, if you're on `v1.0.0-alpha.42` and would like to upgrade to
`v1.0.0-beta.1`:
0. (highly recommended) Make a backup of your files and database.
1. Download the latest release, overwrite your files whilst keeping `.env` and
`public/media`.
2. Go through each release update instructions sequentially (from oldest to
newest) starting with `v1.0.0-alpha.43`, `v1.0.0-alpha.44`,
`v1.0.0-alpha.45`, …, `v1.0.0-beta.1`.
3. ✨ Enjoy your fresh instance, you're all done!
### Should I make a backup before updating?
We advise you do, so you don't lose everything if anything goes wrong!
More generally, we advise you make regular backups of your Castopod files and
database to prevent you from losing it all…
---
title: Welcome 👋
---
import { LinkCard } from "@astrojs/starlight/components";
Castopod is a free & open-source hosting platform made for podcasters who want
engage and interact with their audience.
Castopod is easy to install and was built on top of
[CodeIgniter4](https://codeigniter.com/), a powerful PHP framework with a very
small footprint.
<LinkCard title="Install" href="./getting-started/install" />
## Features
- 🌱 Free & open-source (AGPL v3 License)
- 🔐 Focused on data sovereignty: your content, audience, and analytics belong
to you, and you only
- 🪄 Podcasting 2.0 features: GUID, locked, transcripts, funding, chapters,
location, persons, soundbites, …
- 💬 Built-in social network:
- 🚀 Castopod is part of the Fediverse, a decentralized social network
- ❤️ Create posts, share, favourite, and comment on episodes
- 📈 Built-in analytics:
- ⚖️ GDPR / CCPA / LGPD compliant
- 🪙 Standard IABv2 audience measurement
- 🏡 On-premises analytics, no third party involved
- 📢 Built-in marketing tools:
- ✅ SEO ready (open-graph meta-tags, JSON-LD, …)
- 📱 PWA: install as a standalone app
- 🎨 Customizable theme colors
- 🎬 Generate ready-to-share Video clips from episodes
- 🔉 Generate soundbites
- ▶️ Embeddable player, embed your episodes on any website
- 💸 Monetization:
- 🔗 Funding links
- 📲 listen-to-click ads
- 🤝 value4value / WebMonetization
- 💎 Premium podcasts
- 📡 Publish your episodes everywhere with RSS:
- 📱 On all indexes and apps: Podcast Index, Apple Podcasts, Spotify, Google
Podcasts, Deezer, Podcast Addict, Podfriend, …
- ⚡ Broadcast your episodes instantly with WebSub
- 📥 Podcast import: move your existing podcast into Castopod
- 📤 Move your podcast out of Castopod
- 🔀 Multi-tenant: host as many podcasts as you want
- 👥 Multi-user: add contributors and set roles
- 🌎 i18n support: translated in English, French, Polish, German, Brazilian
Portuguese, Spanish, simplified Chinese… and
[many more](https://translate.castopod.org)!
## Motivation
The podcasting ecosystem is decentralized by nature: you can create your podcast
as an RSS file, publish it on the web and have it shared everywhere online.
It is in fact one of the only media to have stayed this way for a long time.
As usages are evolving, more and more people are getting into podcasts: whether
it is creators finding new ways to share their ideas, or listeners in the search
for better content.
With podcasting becoming more widely used, some companies are trying to shift it
towards a more controlled and centralized medium.
Castopod was created in an effort to provide an open and sustainable alternative
to hosting your podcasts, promoting decentralization to ensure that podcasters
creativity can express itself.
This project is pushed by the open-source community, and specifically by the
[Fediverse](https://fediverse.party/en/fediverse/) and
[Podcasting 2.0](https://podcastindex.org/) movements.
## Comparison with other solutions
We believe that a solution is not necessarily right for everyone, it highly
depends on your needs. So, here are comparisons with other tools to help you to
gauge whether Castopod is the right fit for you.
### Castopod vs Wordpress
Castopod is often referred to as "the Wordpress for podcasts" because of the
similarities between the two. In some ways this is true. And actually, Castopod
was greatly inspired by the Wordpress ecosystem, seeing the ease of adoption
from the community and the number of websites running it.
Just like Wordpress, Castopod is free & open source, built using PHP with a
MySQL database and is packaged in a way that you can easily install on most web
servers.
Wordpress is a great way to create your website and extend it with plugins to
get what you want. It is a full fledged CMS that helps you get any type of
website online.
On the other hand, Castopod is meant to address the podcasters needs
specifically, focusing on podcasting, and nothing else. You don't need any
plugin to get you started on your podcasting journey.
This allows optimizing the processes specific to podcasting: ranging from the
creation of your podcasts and the publication of new episodes all the way to
broadcasting, marketing and analytics.
Finally, depending on your needs, Wordpress and Castopod can even live side by
side as they share the same requirements!
### Castopod vs Funkwhale
Funkwhale is a self-hosted, modern free and open-source music server. Just as
Castopod, Funkwhale is on the fediverse, a decentralized social network allowing
interoperability between the two.
Funkwhale was initially built around music. And later on, as the project
evolved, the ability to host podcasts was introduced.
Unlike Funkwhale, Castopod has been designed and built around podcasting
exclusively. This allows easier implementation for features related to the
podcasting ecosystem, such as the podcasting 2.0 features (transcripts,
chapters, locations, persons, …).
So, you should probably use Funkwhale if you want to host your music, and use
Castopod if you want to host your podcasts.
### Castopod vs other podcast hosts
There are many solutions for you to host your podcasts, some of which are really
great and [a lot of them](https://podcastindex.org/apps) are jumping into the
Podcasting 2.0 wagon just like Castopod!
Each of these solutions differ from one another, you may compare with the
[list of features](#features).
That being said, there are two main differences with other podcasting solutions:
- Castopod can be self-hosted and is the only solution that allows you to keep
full control over what you produce. Also, as it is open-source, you can even
customize it as you wish.
- Castopod is the only solution that currently integrates both a decentralized
social network with ActivityPub as well as many of the podcasting 2.0
features, hoping to bridge the gap between the two.
## Contributing
Love Castopod and would like to help? Take a look at the following documentation
to get you started.
### Code of conduct
Castopod has adopted a Code of Conduct that we expect project participants to
adhere to. Please read the
[CODE_OF_CONDUCT manual](https://code.castopod.org/adaures/castopod/-/blob/beta/CODE_OF_CONDUCT.md)
so that you can understand what actions will and will not be tolerated.
### Contributing guide
Read our [contributing guide](./contributing/guidelines.md) to learn about our
development process, how to propose bugfixes and improvements, and how to build
and test your changes to Castopod.
## Contact
You may reach us for help or ask any question you have on:
- [Discord](https://castopod.org/discord) (for direct interaction with
developers and the community)
- [Issue tracker](https://code.castopod.org/adaures/castopod/-/issues) (for
feature requests & bug reports)
Alternatively, you can follow us on social media platforms to get news about
Castopod:
- [podlibre.social](https://podlibre.social/@Castopod) (Mastodon instance)
- [Twitter](https://twitter.com/castopod)
- [LinkedIn](https://linkedin.com/company/castopod)
- [Facebook](https://www.facebook.com/castopod)
## Sponsors
The ongoing development of Castopod is made possible with the support of its
backers. If you'd like to help, please consider
[sponsoring Castopod's development](https://opencollective.com/castopod/contribute).
[![Ad Aures Logo](../../../assets/images/sponsors/adaures.svg)](https://adaures.com/)
[![NLnet Logo](../../../assets/images/sponsors/nlnet.svg)](https://nlnet.nl/)
## License
[GNU Affero General Public License v3.0](https://choosealicense.com/licenses/agpl-3.0/)
Copyright © 2020-present, [Ad Aures](https://adaures.com/).
---
title: Authentication & Authorization
---
Castopod handles authentication and authorization using `codeigniter/shield`
coupled with custom rules. Roles and permissions are defined at two levels:
1. [instance wide](#1-instance-wide-roles-and-permissions)
2. [per podcast](#2-per-podcast-roles-and-permissions)
## 1. Instance wide roles and permissions
### Instance roles
{/* AUTH-INSTANCE-ROLES-LIST:START - Do not remove or modify this section */}
| role | description | permissions |
| ----------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------ |
| Super admin | Has complete control over Castopod. | admin.\*, plugins.\*, podcasts.\*, users.manage, persons.manage, pages.manage, fediverse.manage-blocks |
| Manager | Manages Castopod's content. | podcasts.create, podcasts.import, persons.manage, pages.manage |
| Podcaster | General users of Castopod. | admin.access |
{/* AUTH-INSTANCE-ROLES-LIST:END */}
### Instance permissions
{/* AUTH-INSTANCE-PERMISSIONS-LIST:START - Do not remove or modify this section */}
| permission | description |
| ----------------------- | ------------------------------------------------------------------ |
| admin.access | Can access the Castopod admin area. |
| admin.settings | Can access the Castopod settings. |
| plugins.manage | Auth.instance_permissions.plugins.manage |
| users.manage | Can manage Castopod users. |
| persons.manage | Can manage persons. |
| pages.manage | Can manage pages. |
| podcasts.view | Can view all podcasts. |
| podcasts.create | Can create new podcasts. |
| podcasts.import | Can import podcasts. |
| fediverse.manage-blocks | Can block fediverse actors/domains from interacting with Castopod. |
{/* AUTH-INSTANCE-PERMISSIONS-LIST:END */}
## 2. Per podcast roles and permissions
### Per podcast roles
{/* AUTH-PODCAST-ROLES-LIST:START - Do not remove or modify this section */}
| role | description | permissions |
| ------ | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Admin | Has complete control of podcast #\{id\}. | \* |
| Editor | Manages content and publications of podcast #\{id\}. | view, edit, manage-import, manage-persons, manage-platforms, manage-publications, manage-notifications, interact-as, episodes.view, episodes.create, episodes.edit, episodes.delete, episodes.manage-persons, episodes.manage-clips, episodes.manage-publications, episodes.manage-comments |
| Author | Manages content of podcast #\{id\} but cannot publish them. | view, manage-persons, episodes.view, episodes.create, episodes.edit, episodes.manage-persons, episodes.manage-clips |
| Guest | General contributor of the podcast #\{id\}. | view, episodes.view |
{/* AUTH-PODCAST-ROLES-LIST:END */}
### Per podcast permissions
{/* AUTH-PODCAST-PERMISSIONS-LIST:START - Do not remove or modify this section */}
| permission | description |
| ---------------------------- | -------------------------------------------------------------------------- |
| view | Can view dashboard and analytics of podcast #\{id\}. |
| edit | Can edit podcast #\{id\}. |
| delete | Can delete podcast #\{id\}. |
| manage-import | Can synchronize imported podcast #\{id\}. |
| manage-persons | Can manage subscriptions of podcast #\{id\}. |
| manage-subscriptions | Can manage subscriptions of podcast #\{id\}. |
| manage-contributors | Can manage contributors of podcast #\{id\}. |
| manage-platforms | Can set/remove platform links of podcast #\{id\}. |
| manage-publications | Can publish podcast #\{id\}. |
| manage-notifications | Can view and mark notifications as read for podcast #\{id\}. |
| interact-as | Can interact as the podcast #\{id\} to favourite, share or reply to posts. |
| episodes.view | Can view dashboards and analytics of podcast #\{id\}'s episodes. |
| episodes.create | Can create episodes for podcast #\{id\}. |
| episodes.edit | Can edit episodes of podcast #\{id\}. |
| episodes.delete | Can delete episodes of podcast #\{id\}. |
| episodes.manage-persons | Can manage episode persons of podcast #\{id\}. |
| episodes.manage-clips | Can manage video clips or soundbites of podcast #\{id\}. |
| episodes.manage-publications | Can publish/unpublish episodes and posts of podcast #\{id\}. |
| episodes.manage-comments | Can create/remove episode comments of podcast #\{id\}. |
{/* AUTH-PODCAST-PERMISSIONS-LIST:END */}
---
title: Official Docker images
---
Castopod pushes 3 Docker images to the Docker Hub during its automated build
process:
- [**`castopod/castopod`**](https://hub.docker.com/r/castopod/castopod): an all
in one castopod image using nginx unit
- [**`castopod/app`**](https://hub.docker.com/r/castopod/app): the app bundle
with all of Castopod dependencies
- [**`castopod/web-server`**](https://hub.docker.com/r/castopod/web-server): an
Nginx configuration for Castopod
Additionally, Castopod requires a MySQL-compatible database. A Redis database
can be added as a cache handler.
## Supported tags
- `develop` [unstable], latest development branch build
- `beta` [stable], latest beta version build
- `latest` [stable], latest version build
- `1.x.x` [stable], specific version build (since `1.0.0`)
## Example usage
1. Install [docker](https://docs.docker.com/get-docker/) and
[docker-compose](https://docs.docker.com/compose/install/)
2. Create a `docker-compose.yml` file with the following:
```yml
version: "3.7"
services:
app:
image: castopod/castopod:latest
container_name: "castopod-app"
volumes:
- castopod-media:/var/www/castopod/public/media
environment:
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
CP_BASEURL: "https://castopod.example.com"
CP_ANALYTICS_SALT: changeme
CP_CACHE_HANDLER: redis
CP_REDIS_HOST: redis
CP_REDIS_PASSWORD: changeme
networks:
- castopod-app
- castopod-db
ports:
- 8000:8000
restart: unless-stopped
mariadb:
image: mariadb:10.5
container_name: "castopod-mariadb"
networks:
- castopod-db
volumes:
- castopod-db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: castopod
MYSQL_USER: castopod
MYSQL_PASSWORD: changeme
restart: unless-stopped
redis:
image: redis:7.0-alpine
container_name: "castopod-redis"
command: --requirepass changeme
volumes:
- castopod-cache:/data
networks:
- castopod-app
volumes:
castopod-media:
castopod-db:
castopod-cache:
networks:
castopod-app:
castopod-db:
```
You have to adapt some variables to your needs (e.g. `CP_BASEURL`,
`MYSQL_ROOT_PASSWORD`, `MYSQL_PASSWORD` and `CP_ANALYTICS_SALT`).
3. 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](https://caddyserver.com/):
```
#castopod
castopod.example.com {
reverse_proxy localhost:8000
}
```
4. Run `docker-compose up -d`, wait for it to initialize and head on to
`https://castopod.example.com/cp-install` to finish setting up Castopod!
5. You're all set, start podcasting! 🎙️🚀
## Environment Variables
- **castopod/castopod** and **castopod/app**
| 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` |
| **`CP_MAX_BODY_SIZE`** | ?number (with suffix) | `512M` |
| **`CP_PHP_MEMORY_LIMIT`** | ?number (with suffix) | `512M` |
| **`CP_TIMEOUT`** | ?number | `900` |
- **castopod/web-server**
| Variable name | Type | Default |
| ---------------------- | --------------------- | ------- |
| **`CP_APP_HOSTNAME`** | ?string | `"app"` |
| **`CP_MAX_BODY_SIZE`** | ?number (with suffix) | `512M` |
| **`CP_TIMEOUT`** | ?number | `900` |
---
title: How to install Castopod?
---
import { Aside } from "@astrojs/starlight/components";
Castopod was thought-out to be easy to install. Whether using dedicated or
shared hosting, you can install it on most PHP-MySQL compatible web servers.
## Requirements
- PHP v8.4 or higher
- MySQL version 8.4 or higher or MariaDB version 11.4 or higher
- HTTPS support
- An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's
incoming requests
### PHP v8.4 or higher
PHP version 8.4 or higher is required, with the following extensions installed:
- [intl](https://php.net/manual/en/intl.requirements.php)
- [libcurl](https://php.net/manual/en/curl.requirements.php)
- [mbstring](https://php.net/manual/en/mbstring.installation.php)
- [gd](https://www.php.net/manual/en/image.installation.php) with **JPEG**,
**PNG** and **WEBP** libraries.
- [exif](https://www.php.net/manual/en/exif.installation.php)
Additionally, make sure that the following extensions are enabled in your PHP:
- json (enabled by default - don't turn it off)
- xml (enabled by default - don't turn it off)
- [mysqlnd](https://php.net/manual/en/mysqlnd.install.php)
### MySQL compatible database
> We recommend using [MariaDB](https://mariadb.org).
You will need the server hostname, database name, username and password to
complete the installation process. If you do not have these, please contact your
server administrator.
#### Privileges
User must have at least these privileges on the database for Castopod to work:
`CREATE`, `ALTER`, `DELETE`, `EXECUTE`, `INDEX`, `INSERT`, `SELECT`, `UPDATE`,
`REFERENCES`, `CREATE VIEW`.
### (Optional) FFmpeg v4.1.8 or higher for Video Clips
[FFmpeg](https://www.ffmpeg.org/) version 4.1.8 or higher is required if you
want to generate Video Clips. The following extensions must be installed:
- **FreeType 2** library for
[gd](https://www.php.net/manual/en/image.installation.php).
### (Optional) Other recommendations
- Redis for better cache performances.
- CDN for static files caching and better performances.
- e-mail gateway for lost passwords.
## Install instructions
### Pre-requisites
0. Get a Web Server with [requirements](#requirements) installed
1. Create a MySQL database for Castopod with a user having access and
modification privileges (for more info, see
[MySQL compatible database](#mysql-compatible-database)).
2. Activate HTTPS on your domain with an _SSL certificate_.
3. Download and unzip the latest [Castopod Package](https://castopod.org/) onto
the web server if you haven’t already.
- ⚠️ Set the web server document root to the `public/` sub-folder within the
`castopod` folder.
4. Add **cron tasks** on your web server for various background processes
(replace the paths accordingly):
```bash
* * * * * /path/to/php /path/to/castopod/spark tasks:run >> /dev/null 2>&1
```
**Note** - If you do not add this cron task, the following Castopod features
will not work:
- Importing a podcast from an existing RSS feed
- Broadcasting social activities to your followers in the fediverse
- Broadcasting episodes to open hubs using
[WebSub](https://en.wikipedia.org/wiki/WebSub)
- Generating video clips -
[requires FFmpeg](#optional-ffmpeg-v418-or-higher-for-video-clips)
### (recommended) Install Wizard
1. Run the Castopod install script by going to the install wizard page
(`https://your_domain_name.com/cp-install`) in your favorite web browser.
2. Follow the instructions on your screen.
3. Start podcasting!
<Aside>
The install script writes a `.env` file in the package root. If you cannot go
through the install wizard, you can create and edit the `.env` file manually
based on the `.env.example` file.
</Aside>
### Using CLI
1. Create a `.env` file in the package root based on the `.env.example` file.
2. Initialize the database using:
```sh
php spark install:init-database
```
3. Create the superadmin user using:
```sh
php spark install:create-superadmin
```
4. Head on to your admin gateway to start podcasting!
### Email/SMTP setup
Email configuration is required for some features to work properly (eg.
retrieving your forgotten password, sending instructions to premium subscribers,
…)
You may add your email configuration in your instance's `.env` like so:
```ini
# […]
email.fromEmail="your_email_address"
email.SMTPHost="your_smtp_host"
email.SMTPUser="your_smtp_user"
email.SMTPPass="your_smtp_password"
```
#### Email config options
| Variable name | Type | Default |
| ---------------- | -------------------- | ------------ |
| **`fromEmail`** | string | `undefined` |
| **`fromName`** | string | `"Castopod"` |
| **`SMTPHost`** | string | `undefined` |
| **`SMTPUser`** | string | `undefined` |
| **`SMTPPass`** | string | `undefined` |
| **`SMTPPort`** | number | `25` |
| **`SMTPCrypto`** | [`"tls"` or `"ssl"`] | `"tls"` |
### Media storage
By default, files are saved to the `public/media` folder using the file system.
If you need to relocate the `media` folder to a different location, you can
specify it in your `.env` file as shown below:
```ini
# […]
media.root="media"
media.storage="/mnt/storage"
```
In this example, the files will be saved to the /mnt/storage/media folder. Make
sure to also update your web server configuration to reflect this change.
### S3
If you prefer storing your media files on an S3 compatible storage, you may
specify it in your `.env`:
```ini
# […]
media.fileManager="s3"
media.s3.endpoint="your_s3_host"
media.s3.key="your_s3_key"
media.s3.secret="your_s3_secret"
media.s3.region="your_s3_region"
```
#### S3 config options
| Variable name | Type | Default |
| ----------------------- | ------- | ----------- |
| **`endpoint`** | string | `undefined` |
| **`key`** | string | `undefined` |
| **`secret`** | string | `undefined` |
| **`region`** | string | `undefined` |
| **`bucket`** | string | `castopod` |
| **`protocol`** | number | `undefined` |
| **`pathStyleEndpoint`** | boolean | `false` |
| **`keyPrefix`** | string | `undefined` |
## Community packages
If you don't want to bother with installing Castopod manually, you may use one
of the packages created and maintained by the open-source community.
### Install with YunoHost
[YunoHost](https://yunohost.org/) is a distribution based on Debian GNU/Linux
made up of free and open-source software packages. It manages the hardships of
self-hosting for you.
<div class="flex flex-wrap items-center gap-4">
<a
href="https://install-app.yunohost.org/?app=castopod"
target="_blank"
rel="noopener noreferrer"
>
<img
src="https://install-app.yunohost.org/install-with-yunohost.svg"
alt="Install Castopod with YunoHost"
class="align-middle"
/>
</a>
<a
href="https://github.com/YunoHost-Apps/castopod_ynh"
target="_blank"
rel="noopener noreferrer"
class="inline-flex items-center px-4 py-[.3rem] mx-auto font-semibold text-center text-black rounded-md gap-x-1 border-2 border-solid border-[#333] hover:no-underline hover:bg-gray-100"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="1em"
height="1em"
class="text-xl"
>
<path fill="none" d="M0 0h24v24H0z" />
<path d="M12 2A10 10 0 0 0 2 12a10 10 0 0 0 6.84 9.49c.5.09.69-.21.69-.48l-.02-1.86c-2.51.46-3.16-.61-3.36-1.18-.11-.28-.6-1.17-1.02-1.4-.35-.2-.85-.66-.02-.67.79-.01 1.35.72 1.54 1.02.9 1.52 2.34 1.1 2.91.83a2.1 2.1 0 0 1 .64-1.34c-2.22-.25-4.55-1.11-4.55-4.94A3.9 3.9 0 0 1 6.68 8.8a3.6 3.6 0 0 1 .1-2.65s.83-.27 2.75 1.02a9.28 9.28 0 0 1 2.5-.34c.85 0 1.7.12 2.5.34 1.9-1.3 2.75-1.02 2.75-1.02.54 1.37.2 2.4.1 2.65.63.7 1.02 1.58 1.02 2.68 0 3.84-2.34 4.7-4.56 4.94.36.31.67.91.67 1.85l-.01 2.75c0 .26.19.58.69.48A10.02 10.02 0 0 0 22 12 10 10 0 0 0 12 2z" />
</svg>
Github Repo
</a>
</div>
---
title: Ar surentez
---
Castopod is built on top of [CodeIgniter4](https://codeigniter.com/), a PHP
framework that encourages
[good security practices](https://codeigniter.com/user_guide/concepts/security.html).
To maximize your instance's safety and prevent any malicious attack, we
recommend you update all your Castopod files permissions after installation or
updates (to avoid any prior permission error):
- `writable/` folder must be **readable** and **writable**.
- `public/media/` folder must be **readable** and **writable**.
- any other file must be set to **readonly**.
For instance, if you are using Apache or NGINX with Ubuntu you may do the
following:
```bash
sudo chown -R root:root /path/to/castopod
sudo chown -R www-data:www-data /path/to/castopod/writable
sudo chown -R www-data:www-data /path/to/castopod/public/media
```
---
title: How to update Castopod?
---
import { Aside } from "@astrojs/starlight/components";
After installing Castopod, you may want to update your instance to the latest
version in order to enjoy the latest features ✨, bug fixes 🐛 and performance
improvements ⚡.
## Update instructions
0. ⚠️ Before any update, we highly recommend you backup your Castopod files and
database.
- cf.
[Should I make a backup before updating?](#should-i-make-a-backup-before-updating)
1. Go to the
[releases page](https://code.castopod.org/adaures/castopod/-/releases) and
see if your instance is up to date with the latest Castopod version
- cf.
[Where can I find my Castopod version?](#where-can-i-find-my-castopod-version)
2. Download the latest release package named `Castopod Package`, you may choose
between the `zip` or `tar.gz` archives
- ⚠️ Make sure you download the Castopod Package and **NOT** the Source Code
- Note that you can also download the latest package from
[castopod.org](https://castopod.org/)
3. On your server:
- Remove all files except `.env` and `public/media`
- Copy the new files from the downloaded package into your server
<Aside>
You may need to reset files permissions as during the install process.
Check [Security Concerns](./security.md).
</Aside>
4. Update your database schema from your `Castopod Admin` > `About` page or by
running:
```bash
php spark castopod:database-update
```
5. Clear your cache from your `Castopod Admin` > `Settings` > `general` >
`Housekeeping`
6. ✨ Enjoy your fresh instance, you're all done!
<Aside>
Releases may come with additional update instructions (see
[releases page](https://code.castopod.org/adaures/castopod/-/releases)).
- cf.
[I haven't updated my instance in a long time… What should I do?](#i-havent-updated-my-instance-in-a-long-time-what-should-i-do)
</Aside>
## Fully Automated updates
> Coming soon... 👀
## Frequently asked questions (FAQ)
### Where can I find my Castopod version?
Go to your Castopod admin panel, the version is displayed on the bottom left
corner.
Alternatively, you can find the version in the `app > Config > Constants.php`
file.
### I haven't updated my instance in a long time… What should I do?
No problem! Just get the latest release as described above. Only, when going
through the release instructions (4), perform them sequentially, from the oldest
to the newest.
> You may want to backup your instance depending on how long you haven't updated
> Castopod.
For example, if you're on `v1.0.0-alpha.42` and would like to upgrade to
`v1.0.0-beta.1`:
0. (highly recommended) Make a backup of your files and database.
1. Download the latest release, overwrite your files whilst keeping `.env` and
`public/media`.
2. Go through each release update instructions sequentially (from oldest to
newest) starting with `v1.0.0-alpha.43`, `v1.0.0-alpha.44`,
`v1.0.0-alpha.45`, …, `v1.0.0-beta.1`.
3. ✨ Enjoy your fresh instance, you're all done!
### Should I make a backup before updating?
We advise you do, so you don't lose everything if anything goes wrong!
More generally, we advise you make regular backups of your Castopod files and
database to prevent you from losing it all…