Skip to main content

Install Mixpost Enterprise manually

If you have basic PHP knowledge and know how to deploy a PHP application to a server, you can follow these instructions.

Getting a license

In order to install Mixpost Enterprise, you’ll need to get a license first.


Server requirements

Before proceeding, please review the server requirements to ensure that Mixpost functions properly.

1. Creating the application

Install Mixpost Enterprise with composer:

composer create-project inovector/mixpost-enterprise-app

When running this command, Composer will prompt you for a username and password. Enter your mixpost.app account email as the username and your Mixpost license key as the password.

2. File Permissions

Make sure you have the right file permissions

chmod -R 755 public
chmod -R 775 storage
chmod -R 775 bootstrap/cache

3. Application Configuration

3.1 Configure Environment

Adjust the .env file settings to match your project requirements. Set the APP_URL to the URL of your project and update the DB_* entries to align with your database specifications.

3.2 Optimize application

php artisan optimize

3.3 Migrate tables

php artisan migrate

4. Application Process Management

Involves overseeing and controlling the essential processes that keep an application running efficiently.

4.1 Setting Up Process Supervision

Before configuring a Supervisor process monitor, make sure you have installed Redis and Supervisor on your server.

Create mixpost_horizon.conf file inside of /etc/supervisor/conf.d folder and put this content:

[program:mixpost_horizon]
process_name=%(program_name)s
command=php /path-to-your-project/artisan horizon
autostart=true
autorestart=true
user=your_user_name
numprocs=1
startsecs=1
redirect_stderr=true
stdout_logfile=/var/log/supervisor/horizon.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=3
stopwaitsecs=5
stopsignal=SIGTERM
stopasgroup=true
killasgroup=true

Once the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start mixpost_horizon:*

4.2 Configuring Scheduled Tasks

Add a cron that runs the scheduler every minute:

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

5. WebSocket (Optional)

This configuration enables real-time message updates in the post chat discussion. This step is optional.

Mixpost supports 2 WebSocket drivers:

DriverTypeConfiguration Difficulties
PusherSaaSLow
Laravel ReverbSelf-hostedHigh

Pusher

To get started with Pusher, register on their platform, create a new channel, and retrieve your app keys.

  1. Update .env file:

BROADCAST_DRIVER=pusher

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
  1. Optimize application:

php artisan optimize
  1. Terminate the Horizon process:

php artisan horizon:terminate

Laravel Reverb

  1. Update .env file:

BROADCAST_DRIVER=reverb

REVERB_APP_ID=insert_unique_id
REVERB_APP_KEY=insert_random_key
REVERB_APP_SECRET=insert_random_key
REVERB_HOST="example.com" # use "localhost" for testing on your localhost
REVERB_PORT=80 # use 8080 for testing on your localhost
REVERB_SCHEME=https
  1. Optimize application:

php artisan optimize
  1. Add to Supervisor

Create mixpost_reverb.conf file inside of /etc/supervisor/conf.d folder and put this content:

[program:mixpost_reverb]
process_name=%(program_name)s
command=php /path-to-your-project/artisan reverb:start --no-interaction
autostart=true
autorestart=true
user=your_user_name
numprocs=1
startsecs=1
redirect_stderr=true
stdout_logfile=/var/log/supervisor/reverb.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=3
stopwaitsecs=5
stopsignal=SIGTERM
stopasgroup=true
killasgroup=true

Once the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start mixpost_reverb:*
  1. Terminate the Horizon process:

php artisan horizon:terminate

Due to the long-running nature of WebSocket servers, you may need to make some optimizations to your server and hosting environment to ensure your Reverb server can effectively handle the optimal number of connections for the resources available on your server. Read here about running Reverb in production.

6. Done

Mixpost is now accessible through the previously specified APP_URL. Example:

https://example.com 

There you can proceed to create the first admin user.