### Initialize Database via CLI Source: https://docs.castopod.org/main/en/getting-started/install Run this command to initialize the database schema during manual installation. ```bash php spark install:init-database ``` -------------------------------- ### Create Superadmin via CLI Source: https://docs.castopod.org/main/en/getting-started/install Run this command to create the initial administrative user account. ```bash php spark install:create-superadmin ``` -------------------------------- ### Configure Local Media Storage Source: https://docs.castopod.org/main/en/getting-started/install Set the root directory for media files and the storage path. Files will be saved to the specified storage path under the media root. ```env media.root="media" media.storage="/mnt/storage" ``` -------------------------------- ### Configure Email Settings Source: https://docs.castopod.org/main/en/getting-started/install Add these variables to your .env file to enable email functionality such as password recovery. ```ini # […] email.fromEmail="your_email_address" email.SMTPHost="your_smtp_host" email.SMTPUser="your_smtp_user" email.SMTPPass="your_smtp_password" ``` -------------------------------- ### Set Castopod File Permissions Source: https://docs.castopod.org/main/en/getting-started/security Use these commands to set appropriate file ownership and permissions for Castopod, ensuring security and proper functionality. The `writable` and `public/media` folders require read/write access for the web server user, while other files should be read-only. ```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 ``` -------------------------------- ### Caddy Reverse Proxy Configuration for Castopod Source: https://docs.castopod.org/main/en/getting-started/docker Configure Caddy as a reverse proxy to handle TLS (SSL/HTTPS) for your Castopod instance. This is mandatory for ActivityPub functionality. Ensure your domain points to your server's IP. ```caddy castopod.example.com { reverse_proxy localhost:8080 } ``` -------------------------------- ### Castopod Docker Compose Configuration Source: https://docs.castopod.org/main/en/getting-started/docker Use this Docker Compose file to set up Castopod with MariaDB and Redis. Pin to a specific version for production stability. Adapt environment variables like base URL, passwords, and salt. ```yaml services: castopod: image: castopod/castopod:1 # Pin to a specific version during production container_name: "castopod" volumes: - castopod-media:/app/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: - "8080:8080" # HTTP - "8443:8443" # HTTPS - "8443:8443/udp" # HTTP/3 restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/health"] interval: 30s timeout: 10s retries: 3 start_period: 30s # allows bootstrap/migrations time depends_on: mariadb: condition: service_healthy restart: true redis: condition: service_started mariadb: image: mariadb:12.1 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 healthcheck: test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 5s retries: 3 redis: image: redis:8.4-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: internal: true ``` -------------------------------- ### Configure Cron Tasks Source: https://docs.castopod.org/main/en/getting-started/install Required for background processes like RSS importing, fediverse broadcasting, and video clip generation. ```bash * * * * * /path/to/php /path/to/castopod/spark tasks:run >> /dev/null 2>&1 ``` -------------------------------- ### Configure S3 Media Storage Source: https://docs.castopod.org/main/en/getting-started/install Use this configuration to store media files on an S3-compatible service. Ensure you provide valid S3 credentials and endpoint information. ```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" ``` -------------------------------- ### Update Castopod Database Schema Source: https://docs.castopod.org/main/en/getting-started/update Run this command to update your database schema after copying new Castopod files. Ensure you have backed up your database before proceeding. ```bash php spark castopod:database-update ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.