Como instalar o Castopod?

Castopod foi pensado para ser fácil de instalar. Seja usando hospedagem dedicada ou compartilhada, você pode instalá-lo na maioria dos servidores web compatíveis com PHP-MySQL.

::: dica Nota

Nós lançamos imagens Docker oficiais para Castopod!

Se você prefere usar o Docker, você pode pular isso e ir direto para a documentação docker de Castopod.

:::

Requisitos

  • PHP v8.1 or higher
  • MySQL versão 5.7 ou superior ou MariaDB versão 10.2 ou superior
  • Suporte a HTTPS
  • An ntp-synced clock to validate federation's incoming requests

PHP v8.1 or higher

PHP version 8.1 or higher is required, with the following extensions installed:

Além disso, certifique-se de que as seguintes extensões estejam habilitadas em seu PHP:

  • json (habilitado por padrão - não desativar)
  • xml (habilitado por padrão - não desativar)
  • mysqlnd

Banco de dados compatível com MySQL

Recomendamos usar o MariaDB.

Aviso

Castopod só funciona com bancos de dados MySQL 5.7 ou superior compatíveis. It will break with the previous MySQL v5.6 for example as its end of life was on February 5, 2021.

Você vai precisar do hostname do servidor, nome do banco de dados, nome do usuário e senha para concluir o processo de instalação. Se você não os tem, entre em contato com o administrador do servidor.

Privilégios

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 ou superior para Clipes de Vídeo

FFmpeg version 4.1.8 or higher is required if you want to generate Video Clips. As seguintes extensões devem ser instaladas:

  • Biblioteca FreeType 2 para gd.

(Opcional) Outras recomendações

  • Redis para melhores desempenhos de cache.
  • CDN para cache de arquivos estáticos e melhores desempenhos.
  • gateway de e-mail para senhas perdidas.

Instruções de instalação

Pré-requisitos

  1. Obter um servidor web com os requisitos instalados

  2. Criar um banco de dados MySQL para Castopod com um usuário com privilégios de acesso e de modificação (para mais informações, ver o banco de dados compatível com MySQL).

  3. Ativar HTTPS em seu domínio com um certificado SSL.

  4. Baixar e descompactar o último Pacote Castopod no servidor web, se você ainda não o fez.

    • ⚠️ Definir a raiz do documento do servidor web para a subpasta public/ dentro da pasta castopod.
  5. Add cron tasks on your web server for various background processes (replace the paths accordingly):

       * * * * * /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
    • Generating video clips - requires FFmpeg

(recomendado) Assistente de Instalação

  1. Execute o script de instalação do Castopod acessando a página do assistente de instalação (https://your_domain_name.com/cp-install) no seu navegador favorito.
  2. Siga as instruções na sua tela.
  3. Comece o podcast!

::: Nota de Informação

O script de instalação grava um arquivo .env na raiz do pacote. If you cannot go through the install wizard, you can create and edit the .env file manually based on the .env.example file.

:::

Using CLI

  1. Create a .env file in the package root based on the .env.example file.

  2. Initialize the database using:

    php spark install:init-database
    
  3. Create the superadmin user using:

    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:

# […]

# […]

email.fromEmail="your_email_address"
email.SMTPHost="your_smtp_host"
email.SMTPUser="your_smtp_user"
email.SMTPPass="your_smtp_password"

Configurar opções de e-mail

Nome da variávelTipoPadrão
fromEmailstringindefinido
fromNamestring"Castopod"
SMTPHoststringundefined
SMTPUserstringundefined
SMTPPassstringundefined
SMTPPortnumber25
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 nameTypeDefault
endpointstringundefined
keystringundefined
secretstringundefined
regionstringundefined
bucketstringcastopod
protocolnumberundefined
pathStyleEndpointbooleanfalse
keyPrefixstringundefined

Pacotes comunitários

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.