Quickly Set Up Nexior AI Platform Using Docker

Nexior is an open-source project on GitHub that allows you to deploy your own AI application site with one click, including AI Q&A, Midjourney drawing, knowledge base Q&A, artistic QR codes, and more. There is no need to develop AI systems yourself, purchase AI accounts, worry about API support, or configure payment systems. It offers zero startup cost and a risk-free way to earn revenue through AI.

This article introduces the deployment process of the Nexior project on your own server using Docker. It is suitable for users with servers and supports deployment on any cloud server (such as Tencent Cloud, Alibaba Cloud, AWS, Google Cloud, etc.), as well as local testing and development environments.

Preparation

Before starting the deployment, please ensure you have the following ready:

  • A server (recommended configuration: 1-core CPU, 2GB RAM; Linux systems recommended are Ubuntu 22.04 or CentOS 7+)
  • Docker and Docker Compose installed on the server
  • A domain name (optional, for custom domain access)

If Docker is not installed yet, you can refer to the official Docker documentation for installation: https://docs.docker.com/get-docker/. After installation, run docker --version to confirm successful installation.

Get the Code

First, clone the Nexior code to your server by opening a terminal and running:

git clone https://github.com/AceDataCloud/Nexior.git
cd Nexior

If you have previously forked the Nexior repository to your own GitHub account, you can also clone from your forked repository URL.

Docker Deployment

The Nexior project includes a Dockerfile and docker-compose.yaml, so you can deploy it with one command using Docker Compose.

In the root directory of the Nexior project, run the following command to build and start the containers:

docker compose up -d --build

After execution, Docker will automatically:

  1. Use the Node 20 environment to install dependencies and build the frontend project
  2. Deploy the build artifacts into an Nginx container
  3. Start the container and listen on port 80

The entire build process takes about 2-5 minutes (depending on server configuration and network speed). After completion, you can access the site via your server’s IP address and port. For example, if the default port is 8080, the access URL will be http://<your-server-IP>:8080.

If your server has a firewall, remember to open port 8080. On platforms like Tencent Cloud or Alibaba Cloud, add an inbound rule for port 8080 in the security group.

To change the default port, edit the docker-compose.yaml file and modify the port mapping from 8080:80 to your desired port.

Using Nginx Reverse Proxy

If you want to access the site via ports 80 or 443 (i.e., without specifying a port), you can configure an Nginx reverse proxy on your server.

First, install Nginx:

# Ubuntu/Debian
sudo apt update && sudo apt install nginx -y

# CentOS
sudo yum install nginx -y

Then create an Nginx configuration file, assuming your domain is ai.example.com:

server {
    listen 80;
    server_name ai.example.com;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Save this configuration to /etc/nginx/conf.d/nexior.conf, then restart Nginx:

sudo nginx -t && sudo systemctl reload nginx

You can now access Nexior directly via your domain name.

Configure HTTPS (Recommended)

For security and SEO, it is strongly recommended to configure HTTPS. You can use free Let's Encrypt certificates and the Certbot tool for one-click configuration:

# Ubuntu/Debian
sudo apt install certbot python3-certbot-nginx -y

# Automatically request and configure SSL certificate
sudo certbot --nginx -d ai.example.com

Certbot will automatically modify the Nginx configuration and set up automatic certificate renewal. After that, you can securely access Nexior via https://ai.example.com.

Site Configuration

After opening the deployed site, register and log in, for example using email or GitHub login. After logging in, you will see the site configuration page where you can modify the site title, logo, favicon, administrator info, and more.

There is also a distribution promotion configuration where you can modify two fields: Default Inviter ID and Forced Inviter ID, explained as follows:

  • Default Inviter ID: If only this is set, everyone can distribute and promote the site. The inviter receives rebates from the customers they invite. If the site URL does not contain any promotion information (no inviter_id in the URL), newly registered users will by default be bound to this Default Inviter ID. Initially, this ID is the site owner’s personal ID.
  • Forced Inviter ID: If set, only this inviter can receive distribution rebates from the site, and others cannot. The distribution promotion entry will not be visible in the backend. All registered users will be bound to this Forced Inviter ID, and all consumption rebates go to this inviter.

There are also feature toggles available. Nexior offers multiple features, and the site owner can selectively enable or disable specific functions.

Code Updates

If the Nexior source code is updated, you can update your deployment with the following commands:

cd Nexior
git pull origin main
docker compose up -d --build

Docker will rebuild the image and automatically replace the old container. The update process takes about 2-5 minutes, during which the site may be temporarily unavailable.

If you are using a forked repository, first click "Sync fork" on GitHub to sync upstream code, then run git pull.

Earning Revenue

Now that your Nexior site is deployed and configured, you can share the site to start earning money.

As long as users have paid bills, a portion will be converted into earnings credited to the distributors’ accounts. You can add customer service for withdrawals.

In the distribution interface, you can view the current number of invitees, total distribution amount, total rewards, etc., and directly add customer service for withdrawals.