2021-04-23 15:42:54 +00:00
|
|
|
|
# How to install Castopod Host <!-- omit in toc -->
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2021-04-23 15:42:54 +00:00
|
|
|
|
_Castopod Host_ 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.
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2021-04-02 17:20:02 +00:00
|
|
|
|
## Table of contents <!-- omit in toc -->
|
|
|
|
|
|
2020-10-08 16:38:30 +00:00
|
|
|
|
- [Install instructions](#install-instructions)
|
2021-04-23 17:07:01 +00:00
|
|
|
|
- [0. Pre-requisites](#0-pre-requisites)
|
2021-06-08 09:52:11 +00:00
|
|
|
|
- [(recommended) Install Wizard](#recommended-install-wizard)
|
|
|
|
|
- [(alternative) Manual configuration](#alternative-manual-configuration)
|
2020-10-08 16:38:30 +00:00
|
|
|
|
- [Web Server Requirements](#web-server-requirements)
|
2021-06-08 09:52:11 +00:00
|
|
|
|
- [PHP v8.0 or higher](#php-v80-or-higher)
|
2020-10-08 16:38:30 +00:00
|
|
|
|
- [MySQL compatible database](#mysql-compatible-database)
|
2021-04-02 17:20:02 +00:00
|
|
|
|
- [Privileges](#privileges)
|
2020-10-08 16:38:30 +00:00
|
|
|
|
- [(Optional) Other recommendations](#optional-other-recommendations)
|
|
|
|
|
- [Security concerns](#security-concerns)
|
|
|
|
|
|
|
|
|
|
## Install instructions
|
|
|
|
|
|
2021-04-23 17:07:01 +00:00
|
|
|
|
### 0. Pre-requisites
|
|
|
|
|
|
|
|
|
|
0. Get a Web Server with requirements installed
|
|
|
|
|
1. Create a MySQL database for Castopod Host with a user having access and
|
2020-10-12 14:47:21 +00:00
|
|
|
|
modification privileges (for more info, see
|
|
|
|
|
[Web Server Requirements](#web-server-requirements)).
|
2021-04-23 17:07:01 +00:00
|
|
|
|
2. Activate HTTPS on your domain with an _SSL certificate_.
|
|
|
|
|
3. Download and unzip the latest
|
2021-04-23 15:42:54 +00:00
|
|
|
|
[Castopod Host Package](https://code.podlibre.org/podlibre/castopod-host/-/releases)
|
|
|
|
|
onto the web server if you haven’t already.
|
2020-10-08 16:38:30 +00:00
|
|
|
|
- ⚠️ Set the web server document root to the `public/` sub-folder.
|
2021-04-23 17:07:01 +00:00
|
|
|
|
4. Add a cron task on your web server to run every minute (replace the paths
|
|
|
|
|
accordingly):
|
2021-04-02 17:20:02 +00:00
|
|
|
|
|
|
|
|
|
```php
|
2021-04-23 15:42:54 +00:00
|
|
|
|
* * * * * /path/to/php /path/to/castopod-host/public/index.php scheduled-activities
|
2021-04-02 17:20:02 +00:00
|
|
|
|
```
|
|
|
|
|
|
2021-04-23 17:07:01 +00:00
|
|
|
|
> ⚠️ Social features will not work properly if you do not set the task. It is
|
|
|
|
|
> used to broadcast social activities to the fediverse.
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
|
### (recommended) Install Wizard
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2021-04-23 17:07:01 +00:00
|
|
|
|
1. Run the Castopod Host 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!
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
|
> **Note:**
|
|
|
|
|
>
|
|
|
|
|
> The install script writes a `.env` file in the package root. If you cannot go
|
|
|
|
|
> through the install wizard, you can
|
|
|
|
|
> [create and update the `.env` file manually](#alternative-manual-configuration).
|
2021-04-23 17:07:01 +00:00
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
|
### (alternative) Manual configuration
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2020-10-12 14:47:21 +00:00
|
|
|
|
1. Rename the `.env.example` file to `.env` and update the default values with
|
|
|
|
|
your own.
|
2021-04-23 17:07:01 +00:00
|
|
|
|
2. Upload the `.env` file to the Castopod Host Package root on your server.
|
2020-10-08 16:38:30 +00:00
|
|
|
|
3. Go to `/cp-install` to finish the install process.
|
2021-04-23 17:07:01 +00:00
|
|
|
|
4. Start podcasting!
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
|
|
|
|
## Web Server Requirements
|
|
|
|
|
|
2021-05-14 17:59:35 +00:00
|
|
|
|
### PHP v8.0 or higher
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2021-05-14 17:59:35 +00:00
|
|
|
|
PHP version 8.0 or higher is required, with the following extensions installed:
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2021-04-20 13:43:38 +00:00
|
|
|
|
- [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)
|
2021-11-23 11:54:34 +00:00
|
|
|
|
- [gd](https://www.php.net/manual/en/image.installation.php) with **JPEG**,
|
|
|
|
|
**PNG** and **WEBP** libraries.
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
|
|
|
|
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)
|
2021-04-20 13:43:38 +00:00
|
|
|
|
- [mysqlnd](https://php.net/manual/en/mysqlnd.install.php)
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
|
|
|
|
### MySQL compatible database
|
|
|
|
|
|
2021-04-23 17:07:01 +00:00
|
|
|
|
> We recommend using [MariaDB](https://mariadb.org).
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2020-10-12 14:47:21 +00:00
|
|
|
|
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.
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2021-04-23 17:07:01 +00:00
|
|
|
|
> NB. Castopod Host only works with supported MySQL compatible databases. It
|
|
|
|
|
> will break with MySQL v5.6 for example as its end of life was on February
|
|
|
|
|
> 5, 2021.
|
|
|
|
|
|
2020-10-08 16:38:30 +00:00
|
|
|
|
#### Privileges
|
|
|
|
|
|
2021-04-23 15:42:54 +00:00
|
|
|
|
User must have at least these privileges on the database for Castopod Host to
|
2021-10-01 12:58:08 +00:00
|
|
|
|
work: `CREATE`, `ALTER`, `DELETE`, `EXECUTE`, `INDEX`, `INSERT`, `SELECT`,
|
|
|
|
|
`UPDATE`.
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
|
|
|
|
### (Optional) Other recommendations
|
|
|
|
|
|
|
|
|
|
- Redis for better cache performances.
|
2021-04-23 17:07:01 +00:00
|
|
|
|
- CDN for static files caching and better performances.
|
2020-10-08 16:38:30 +00:00
|
|
|
|
- e-mail gateway for lost passwords.
|
|
|
|
|
|
|
|
|
|
## Security concerns
|
|
|
|
|
|
2021-04-23 15:42:54 +00:00
|
|
|
|
Castopod Host is built on top of Codeigniter, a PHP framework that encourages
|
2020-10-12 14:47:21 +00:00
|
|
|
|
[good security practices](https://codeigniter.com/user_guide/concepts/security.html).
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
2020-10-12 14:47:21 +00:00
|
|
|
|
To maximize your instance safety and prevent any malicious attack, we recommend
|
2021-04-23 15:42:54 +00:00
|
|
|
|
you update all your Castopod Host files permissions after installation (to avoid
|
|
|
|
|
any permission error):
|
2020-10-08 16:38:30 +00:00
|
|
|
|
|
|
|
|
|
- `writable/` folder must be **readable** and **writable**.
|
|
|
|
|
- `public/media/` folder must be **readable** and **writable**.
|
|
|
|
|
- any other file must be set to **readonly**.
|
|
|
|
|
|
2020-10-15 20:22:33 +00:00
|
|
|
|
For instance, if you are using Apache or NGINX with Ubuntu you may do the
|
|
|
|
|
following:
|
|
|
|
|
|
|
|
|
|
```bash
|
2021-04-23 15:42:54 +00:00
|
|
|
|
sudo chown -R root:root /path/to/castopod-host
|
|
|
|
|
sudo chown -R www-data:www-data /path/to/castopod-host/writable
|
|
|
|
|
sudo chown -R www-data:www-data /path/to/castopod-host/public/media
|
2020-10-15 20:22:33 +00:00
|
|
|
|
```
|