How to Run Own Online SMS Portal with playSMS in Linux

playSMS is an open-source SMS management software that allows you to send and receive SMS messages using various gateways and protocols, which is an excellent tool for businesses, organizations, or anyone who wants to manage SMS communication efficiently.

In this article, we will guide you through the installation of playSMS on a Linux server, which will cover the requirements, installation steps, and configuration processes to help you get started.

System Requirements

Before installing playSMS, ensure that your system meets the following requirements:

  • A Linux distribution (Ubuntu, Debian, RHEL, etc).
  • A web server (Apache or Nginx).
  • PHP (version 7.0 or higher).
  • MySQL or MariaDB.
  • An internet connection.

Step 1: Installing Apache, PHP and MySQL

First, update your package manager to ensure you have the latest software available.

sudo apt update     [Ubuntu/Debian]
sudo dnf update     [RHEL]

Once system packages are updated, you can install Apache, PHP, and MySQL with the following command on Ubuntu-based distributions.

sudo apt install apache2 php libapache2-mod-php php-mysql
sudo apt install php-curl php-gd php-mbstring php-xml php-zip
sudo apt install mysql-server

On RHEL-based distributions, you can use:

sudo yum install httpd php php-mysqlnd
sudo yum install epel-release
sudo yum install php-curl php-gd php-mbstring php-xml php-zip
sudo yum install mariadb-server

Once Apache, PHP, and MySQL are installed, you can start and enable them to start on boot:

---------------- On Ubuntu/Debian ---------------- 
sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl start mysql
sudo systemctl enable mysql
---------------- On RHEL/Fedora ---------------- 
sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl start mariadb
sudo systemctl enable mariadb

Next, you need to secure the database installation by running the security script to set a root password and secure your installation:

sudo mysql_secure_installation

Step 2: Installing and Configuring playSMS Portal

Before installing and configuring the playSMS portal, you need to create a database and a user for playSMS.

mysql -u root -p
CREATE DATABASE playsms;
CREATE USER 'playsmsuser'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON playsms.* TO 'playsmsuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Replace your_password with a secure password.

Next, create a source directory where you will download and install playSMS.

mkdir -p /home/tecmint/src
cd /home/tecmint/src

Now visit the playSMS GitHub page and download the latest version of the software using wget command, make sure to replace x.x.x with the latest version number:

wget https://github.com/playsms/playsms/archive/refs/tags/1.4.7.tar.gz

Once downloaded, extract the playSMS package.

tar -xvf 1.4.7.tar.gz

Navigate to the playSMS directory  and copy the example configuration file to a new file and edit it.

cd /home/tecmint/src/playsms-1.4.7/
cp install.conf.dist install.conf
vi install.conf

In install.conf, you’ll need to customize settings such as database connection details and other configurations to suit your system.

Configure playSMS Settings
Configure playSMS Settings

With your configurations set, run the installation script:

sudo ./install-playsms.sh

To ensure that playSMS runs automatically at startup and if it goes down, you need to set up a cron job.

crontab -e

Insert the following line to run the playSMS daemon every minute.

* * * * * /home/tecmint/bin/playsmsd /home/tecmint/etc/playsmsd.conf start

After installation, check if the playSMS daemon is running:

ps ax | grep playsms
Check playSMS Daemon
Check playSMS Daemon

You can run additional checks to confirm the installation:

/home/tecmint/bin/playsmsd /home/tecmint/etc/playsmsd.conf status
/home/tecmint/bin/playsmsd /home/tecmint/etc/playsmsd.conf check
Check playSMS Status
Check playSMS Status

If everything seems correct, you can access playSMS through your web browser:

URL: http://[your web server IP] Default Admin Username: admin Default Admin Password: admin
playSMS Web Portal
playSMS Web Portal

Follow the on-screen instructions to complete the setup process. You will need to configure the SMS gateway you plan to use for sending and receiving messages.

Conclusion

By following these steps, you should have successfully installed playSMS on your Linux system. If you have any issues or further questions, feel free to ask for help or consult the playSMS community for assistance.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Ravi Saive
I am an experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

31 Comments

Leave a Reply
  1. Mr.Ravi,
    Thanks for your support in the blog,..I was looking for the download files of it,Im in damn need of it..can you please try to send me the files if you have for it…

    thank you very much in advance.

    Reply
  2. how to set ip in pointsms,
    so I can still access my point zpanel and my sms web interface
    i need your help

    thanks for reply

    Reply
  3. i’m installed Zpanel in my localhost
    before zpanel install,i can access my pointsms web interface,
    but after install zpanel, i can’t access it

    how to fix it

    Reply
    • Your Zpanel installation overwritten all your system files, because zpanel comes with own web server and that might overwritten your existing web server files and in result you lost the pointsms setup. To fix pointsms portal you need setup again.

      Reply
  4. after login,i see this

    blank page

    Not Found

    The requested URL /compose was not found on this server.
    Apache/2.2.15 (CentOS) Server at localhost.localdomain Port 80

    Reply
      • Followed the procedure, didn’t find any error or warning during performing steps, but couldn’t find the login screen after typin ip address in the browser.

        Any other change/modify in the config files?

        Reply
        • Did you placed the files under your web root directory and added proper MySQL settings? What you seeing in the browser?

          Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.