Deploy EzyPlatform

Updated at 1715419485000
EzyPlatform can be deployed on different operating systems, but it is recommended to use Linux-based operating systems such as Ubuntu or CentOS for automatic restart capabilities. Here, I will use Ubuntu as the operating system.

Add SSH Public Keys

Add SSH public keys for convenient login.

mkdir -p ~/.ssh
nano ~/.ssh/authorized_keys
# add key and close

Change Timezone

timedatectl list-timezones | grep <keyword>
sudo timedatectl set-timezone your_time_zone

Install Firewall

Note that you only need to install the firewall for servers or VPSs that do not have a firewall service.

Refer to: How To Set Up a Firewall with UFW on Ubuntu 20.04

sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw enable
sudo ufw allow http
sudo ufw allow https

If your application uses sockets and websockets, you will need to open additional ports.

  1. 3005 for sockets
  2. 2208 if you only use ws
  3. 2812 if you use wss
  4. 2611 if you use UDP
sudo ufw allow 3005
sudo ufw allow 2208
sudo ufw allow 2812
sudo ufw allow 2611/udp

Install MySQL

Refer to: How To Install MySQL on Ubuntu 20.04.

sudo apt update
sudo apt install mysql-server
sudo systemctl start mysql.service

MySQL Configuration

sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<new password>';
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket;
sudo mysql_secure_installation

Create Database


Create a new user, for example:

CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON new_schema . * TO '<username>'@'localhost';

Install Nginx

Refer to: How To Install Nginx on Ubuntu 20.04

sudo apt update
sudo apt install nginx
systemctl status nginx

Restart Nginx:

sudo systemctl stop nginx
sudo systemctl start nginx
sudo systemctl restart nginx
sudo systemctl reload nginx

Remove the default file in the /etc/nginx/sites-enabled and /etc/nginx/sites-available directories.

Go to the /etc/nginx/sites-enabled directory and create two files for the public site and admin site.

Public site, for example :

server {
    server_name <host name>;

    location / {
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass "";
        client_max_body_size 50M;

If you want to add Cache-Control header for web you can add:

 location ~* \.(css|js|woff|woff2|ttf|gif|jpg|jpeg|png)$ {
        expires 1h;
        proxy_pass "";

Admin site, for example admin.:

server {
    server_name admin.<host name>;

    location / {
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass "";
        client_max_body_size 100M;

If you want to add Cache-Control header for admin you can add:

location ~* \.(css|js|woff|woff2|ttf|gif|jpg|jpeg|png)$ {
        expires 24h;
        proxy_pass "";

Check the Nginx configuration: sudo nginx -t, if it displays like this, it's okay.

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Restart Nginx

sudo systemctl reload nginx

Install Certbot

sudo apt install certbot python3-certbot-nginx
sudo certbot

After using Certbot, the configuration file may be changed like this:

server {

    location / {
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass "";
        client_max_body_size 100M;

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

server {
    listen 80;
server {
    if ($host = {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80;
    return 404; # managed by Certbot

Remove Redundant Section

Remove the following section:

server {
    listen 80;

Then restart Nginx: sudo systemctl reload nginx.

Install JDK 8

Refer to: How To Install Java with Apt on Ubuntu 20.04.

sudo apt update
java -version

Running these commands will display the list of Java installations.

apt install default-jre            
apt install openjdk-11-jre-headless
apt install openjdk-8-jre-headless 
apt install openjdk-9-jre-headless

Choose openjdk-8-jre-headless for the apt install.

Set up JAVA_HOME by adding the following line to the .bash_profile using vim:

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64

Then run: source ~/.bash_profile to apply.

Install EzyPlatform

You can download the latest version from the Home page and then use a tool to copy it to the server, or use wget and inspect the download button on the Home page to get the latest version, for example:

wget && mv download

Then unzip the file: unzip

Navigate to the ezyplatform/settings folder and modify the file (e.g., nano settings/ with the database information you created earlier, for example:


Start by running in console mode first to check for any errors:

bash "console admin"
If you see EZHTTP READY printed in the console and no exceptions, it means the startup was successful.

From here, let's assume the website you want to create is Open your browser and go to:, where you will see the setup screen:


Set up the necessary information and submit, then the home screen will be displayed:


Make sure you turn off all ezyplatform websites running on localhost and clear all cookies.

Go to Dashboard > Admin and update the Admin URL and Admin Properties, for example:


Now, turn off the console mode by pressing Ctrl+C, and start in the background mode:

bash "start admin" ; tail -f logs/admin-server.log

Wait for about 10-15 seconds for the server to finish startup, then go back to your browser and select Dashboard > Web. Update the Web URL and Web properties, for example:


Then click the start button. Wait for 10-15 seconds and you can access:

Setup SSL for socket

If you don't need to use socket or you are in localhost, you can skip this step.

  1. You can look at here to see how to create a keystore file.
  2. After you have the keystore file, you can upload and set the password via Dashboard > Socket > SSL configuration.

Congratulations! You have successfully deployed EzyPlatform on an Ubuntu server. Next, you can install themes and plugins according to your preferences.