...
Deploy castopod on almalinux vps
Deploy castopod on almalinux vps

This article provides a production-ready, step-by-step guide to deploy Castopod on AlmaLinux VPS using Nginx + PHP-FPM + MariaDB + HTTPS.

What is Castopod?

Castopod is an open-source podcast hosting platform designed to give podcasters control over their content while supporting the latest podcasting innovations, such as Podcasting 2.0 features. It’s a self-hosted solution, meaning that users can install and run Castopod on their own servers, offering them full ownership of their podcasts and data, unlike hosted platforms where the hosting service owns the platform infrastructure (which creates a vendor lock-in scenario for podcaster).

Additionally, Castopod supports federation via ActivityPub, the decentralized social networking protocol, also known as the Fediverse. This means podcasts hosted on Castopod can be followed and interacted with from compatible social networks, broadening the reach and engagement of podcast content.

Pre-requisites

Minimum VPS specs (recommended):

  • AlmaLinux 9
  • 2 vCPU
  • 2 GB RAM (4 GB ideal)
  • 20+ GB NVMe storage
  • Root or sudo access
  • A domain or subdomain (e.g. podcast.example.com)

Launch 100% ssd almalinux vps from $3. 19/mo!


Compare AlmaLinux VPS Plans

KVM-SSD-1
KVM-SSD-8
KVM-SSD-16
KVM-SSD-32
CPU
1 Core
2 Cores
4 Cores
8 Cores
Memory
1 GB
8 GB
16 GB
32 GB
Storage
16 GB NVMe
128 GB NVMe
256 GB NVMe
512 GB NVMe
Bandwidth
1 TB
4 TB
8 TB
16 TB
Network
1 Gbps
1 Gbps
1 Gbps
1 Gbps
Delivery Time
⏱️ Instant
⏱️ Instant
⏱️ Instant
⏱️ Instant
Location
US/FR
US/FR
US/FR
US/FR
Price
$7.58*
$39.50*
$79.40*
$151.22*
KVM-SSD-1
CPU: 1 Core
Memory: 2 GB
Storage: 16 GB NVMe
1 TB
KVM-SSD-8
CPU: 2 Cores
Memory: 8 GB
Storage: 128 GB NVMe
4 TB
KVM-SSD-16
CPU: 4 Cores
Memory: 16 GB
Storage: 256 GB NVMe
8 TB
KVM-SSD-32
CPU: 8 Cores
Memory: 32 GB
Storage: 512 GB NVMe
16 TB

How to Deploy Castopod on AlmaLinuux VPS

To deploy Castopod on AlmaLinux VPS, follow the steps below:

  1. Prepare the AlmaLinux VPS

    Update the system and install core utilities:

    dnf update -y
    dnf install -y epel-release unzip wget curl firewalld nano
    systemctl enable --now firewalld
    

    Open HTTP and HTTPS:

    firewall-cmd --permanent --add-service=http
    firewall-cmd --permanent --add-service=https
    firewall-cmd --reload
    
  2. Install Nginx

    dnf install -y nginx
    systemctl enable --now nginx
    

    Verify:

    curl http://localhost
    
  3. Install PHP (Required Extensions)

    Castopod requires PHP 8.1+.

    Enable Remi repository:

    dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm
    dnf module reset php -y
    dnf module enable php:remi-8.2 -y
    

    Install PHP and extensions:

    dnf install -y \
    php php-fpm php-mysqlnd php-intl php-mbstring php-xml \
    php-gd php-curl php-zip php-opcache php-cli
    

    Start PHP-FPM:

    systemctl enable --now php-fpm
    
  4. Install MariaDB

    dnf install -y mariadb-server
    systemctl enable --now mariadb
    

    Secure the database:

    mysql_secure_installation
    
  5. Create Castopod Database

    mysql -u root -p
    
    CREATE DATABASE castopod CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    CREATE USER 'castopod'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD';
    GRANT ALL PRIVILEGES ON castopod.* TO 'castopod'@'localhost';
    FLUSH PRIVILEGES;
    EXIT;
    
  6. Download Castopod

    cd /var/www
    wget https://code.castopod.org/-/project/2/uploads/db9596e195aa5c9eb652427a0060c253/castopod-1.14.1.zip
    unzip castopod-1.14.1.zip
    mv castopod podcast
    chown -R nginx:nginx podcast
    chmod -R 755 podcast
    
  7. Configure PHP Permissions

    chcon -R -t httpd_sys_rw_content_t /var/www/podcast
    setsebool -P httpd_can_network_connect 1
    
  8. Configure Nginx Virtual Host

    Create config:

    nano /etc/nginx/conf.d/podcast.conf
    
    server {
        listen 80;
        server_name podcast.example.com;
    
        root /var/www/podcast/public;
        index index.php;
    
        client_max_body_size 2G;
    
        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }
    
        location ~ \.php$ {
            include fastcgi_params;
            fastcgi_pass unix:/run/php-fpm/www.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
    
        location ~* \.(mp3|m4a|ogg|wav)$ {
            expires 30d;
            add_header Cache-Control "public";
        }
    }
    

    Test and reload:

    nginx -t
    systemctl reload nginx
    
  9. Install HTTPS (Let’s Encrypt)

    dnf install -y certbot python3-certbot-nginx
    certbot --nginx -d podcast.example.com
    

    Enable auto-renewal:

    systemctl enable certbot-renew.timer
    
  10. Web Installer (Final Setup)

    Open in browser:

    https://podcast.example.com
    

    Provide:

    • Database name: castopod
    • Database user: castopod
    • Password: STRONG_PASSWORD
    • Admin email & password
    • Podcast metadata

    Complete installation.

  11. Optimize for Production

    PHP Tuning

    Edit:

    nano /etc/php.ini
    

    Recommended:

    memory_limit = 512M
    upload_max_filesize = 2048M
    post_max_size = 2048M
    max_execution_time = 300
    

    Restart PHP:

    systemctl restart php-fpm
    
  12. Enable Background Jobs (Recommended)

    Castopod relies on scheduled tasks.

    crontab -u nginx -e
    
    * * * * * php /var/www/podcast/spark castopod:scheduled
    
  13. Optional Enhancements

    • Object storage (S3-compatible) for episode media
    • CDN for audio delivery
    • Redis for caching
    • Fail2Ban for admin protection
    • Daily database + media backups
    • HTTP/3 (QUIC) via Nginx + Cloudflare

Common Troubleshooting

502 Bad Gateway

  • PHP-FPM not running
  • Socket mismatch (/run/php-fpm/www.sock)

Uploads failing

  • Increase client_max_body_size
  • Check PHP upload limits

SELinux blocking access

audit2allow -w -a

Final Notes

You now have a secure, scalable Castopod deployment on AlmaLinux suitable for:

  • Independent podcasters
  • Hosting providers
  • Media networks
  • White-label podcast platforms

Launch 100% ssd almalinux vps from $3. 19/mo!

Conclusion

You now know how to deploy Castopod on AlmaLinux VPS.

Avatar of editorial staff

Editorial Staff

Rad Web Hosting is a leading provider of web hosting, Cloud VPS, and Dedicated Servers in Dallas, TX.
lg