Com instal·lar Castopod?
Castopod va ser pensat per ser fàcil d’instal·lar. Ja sigui utilitzant un allotjament dedicat o un compartit, podeu instal·lar-lo a la majoria de servidors web compatibles amb PHP-MySQL.
Requisits
- PHP v8.3 or higher
- MySQL versió 5.7 o superior o MariaDB versió 10.2 o superior
- Support d’HTTPS
- An ntp-synced clock to validate federation’s incoming requests
PHP v8.3 or higher
PHP version 8.3 or higher is required, with the following extensions installed:
A més, assegureu-vos que les extensions següents estiguin habilitades al vostre PHP:
- json (activat per defecte; no el desactiveu)
- xml (activat per defecte; no el desactiveu)
- mysqlnd
Base de dades compatible amb MySQL
Us recomanem que utilitzeu MariaDB.
Necessitareu el nom d’amfitrió del servidor (hostname), el nom de la base de dades, el nom d’usuari i la contrasenya per completar el procés d’instal·lació. Si no els teniu, poseu-vos en contacte amb l’administrador del vostre servidor.
Privilegis
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
.
(Opcional) FFmpeg v4.1.8 o superior per fer videoclips
Si voleu generar videoclips, cal FFmpeg versió 4.1.8 o superior. Cal instal·lar les següents extensions:
- La llibreria FreeType 2 per gd.
(Opcional) Altres recomanacions
- Redis per a un millor rendiment de la memòria cau.
- CDN per a la memòria cau de fitxers estàtics i millors rendiments.
- Passarel·la de correu electrònic per a contrasenyes perdudes.
Instruccions d’instal·lació
Pre-requisits
-
Obteniu un servidor web amb els requisits instal·lats
-
Creeu una base de dades MySQL per a Castopod amb un usuari amb privilegis d’accés i modificació (per a més informació, vegeu base de dades compatible MySQL).
-
Activeu HTTPS al vostre domini amb un certificat SSL.
-
Baixeu i descomprimiu el darrer paquet Castopod al servidor web si encara no ho heu fet.
- ⚠️ Establiu l’arrel del document del servidor web a la subcarpeta
castopod/public/
.
- ⚠️ Establiu l’arrel del document del servidor web a la subcarpeta
-
Add cron tasks on your web server for various background processes (replace the paths accordingly):
Terminal window * * * * * /path/to/php /path/to/castopod/spark tasks:run >> /dev/null 2>&1Note - 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
- Generating video clips - requires FFmpeg
(recomanat) Assistent d’instal·lació
- Executeu l’script d’instal·lació de Castopod anant a la pàgina web de
l’assistent d’instal·lació (
https://exemple.com/cp-install
) al vostre navegador web preferit. - Seguiu les instruccions a la vostra pantalla.
- Comenceu a fer podcasts!
Using CLI
-
Create a
.env
file in the package root based on the.env.example
file. -
Initialize the database using:
Terminal window php spark install:init-database -
Create the superadmin user using:
Terminal window php spark install:create-superadmin -
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:
# […]
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:
# […]
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
:
# […]
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 |
Paquets de la comunitat
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 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.