No-Code Platform

    Deploy NocoBase on RamNode VPS

    NocoBase is a powerful, scalability-first no-code platform that enables you to build complex applications without writing code. Deploy your own private no-code platform on a RamNode VPS with complete control over your data and environment.

    Ubuntu 22.04/24.04
    Node.js 20+
    ⏱️ 30-45 minutes

    What is NocoBase?

    NocoBase is an open-source, scalability-first no-code development platform that allows you to create complex applications without writing code. It provides a private, controllable, and extremely scalable environment.

    • Scalability-first design: Built to handle applications from small projects to large enterprise solutions
    • Plugin architecture: Extensible interfaces throughout the application lifecycle
    • Multi-database support: PostgreSQL, MySQL, MariaDB, and SQLite
    • Modern tech stack: Built on Node.js with React frontend
    • Self-hosted: Complete control over your data and environment

    Prerequisites & Requirements

    Before starting, ensure you have:

    VPS Requirements

    • • RamNode VPS (1GB+ RAM, 2GB recommended)
    • • 20GB+ Storage
    • • Ubuntu 22.04 or 24.04 LTS
    • • Root or sudo access

    Software Requirements

    • • Node.js 18+ or 20+
    • • Yarn 1.22.x
    • • PostgreSQL/MySQL/MariaDB
    • • Domain name (optional but recommended)
    2

    Initial VPS Setup

    Connect to your RamNode VPS and perform initial setup:

    Connect via SSH
    ssh root@your-vps-ip-address
    Update System
    # Update package index and upgrade system
    sudo apt update && sudo apt upgrade -y
    
    # Install essential packages
    sudo apt install -y curl wget git unzip software-properties-common apt-transport-https ca-certificates

    Create a new user (security best practice):

    Create User
    # Create a new user
    sudo adduser nocobase
    
    # Add user to sudo group
    sudo usermod -aG sudo nocobase
    
    # Switch to the new user
    su - nocobase

    Configure firewall:

    UFW Firewall Setup
    # Enable UFW firewall
    sudo ufw enable
    
    # Allow SSH (port 22)
    sudo ufw allow ssh
    
    # Allow HTTP and HTTPS
    sudo ufw allow 80
    sudo ufw allow 443
    
    # Allow NocoBase's default port
    sudo ufw allow 13000
    
    # Check firewall status
    sudo ufw status
    3

    Install Node.js and Yarn

    Install Node.js 20.x and Yarn package manager:

    Install Node.js 20.x
    # Install Node.js 20.x from NodeSource repository
    curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
    sudo apt install -y nodejs
    
    # Verify installation
    node --version
    npm --version
    Install Yarn Package Manager
    # Install Yarn globally
    npm install --global yarn
    
    # Verify Yarn installation
    yarn --version

    ✅ Node.js and Yarn are now installed and ready for NocoBase.

    4

    Install and Configure PostgreSQL

    PostgreSQL is recommended for production deployments:

    Install PostgreSQL
    # Install PostgreSQL
    sudo apt install -y postgresql postgresql-contrib
    
    # Start and enable PostgreSQL service
    sudo systemctl start postgresql
    sudo systemctl enable postgresql
    
    # Check service status
    sudo systemctl status postgresql
    Create Database and User
    # Switch to postgres user and create database
    sudo -u postgres psql
    PostgreSQL Commands
    -- In PostgreSQL shell, create database and user
    CREATE DATABASE nocobase;
    CREATE USER nocobase WITH ENCRYPTED PASSWORD 'your_strong_password_here';
    GRANT ALL PRIVILEGES ON DATABASE nocobase TO nocobase;
    ALTER USER nocobase CREATEDB;
    \q

    Configure PostgreSQL for network access:

    Edit PostgreSQL Configuration
    # Edit PostgreSQL configuration
    sudo nano /etc/postgresql/*/main/postgresql.conf
    
    # Find and uncomment/modify this line:
    # listen_addresses = 'localhost'
    
    # Edit pg_hba.conf for authentication
    sudo nano /etc/postgresql/*/main/pg_hba.conf
    
    # Add this line for local connections:
    # local  nocobase  nocobase                       md5
    
    # Restart PostgreSQL
    sudo systemctl restart postgresql

    🔐 Security: Replace 'your_strong_password_here' with a strong, unique password and save it securely.

    5

    Install NocoBase

    Using create-nocobase-app (Recommended method):

    Create NocoBase Project
    # Create NocoBase project with PostgreSQL
    yarn create nocobase-app my-nocobase-app -d postgres \
      -e DB_HOST=localhost \
      -e DB_DATABASE=nocobase \
      -e DB_USER=nocobase \
      -e DB_PASSWORD=your_strong_password_here
    
    # Navigate to project directory
    cd my-nocobase-app

    Alternative: Docker Installation

    For containerized deployment, you can use Docker Compose. This method provides easier management and isolation but requires Docker to be installed on your system.

    6

    Configure Environment Variables

    Edit the .env file in your project directory:

    Edit Environment File
    nano .env
    Environment Variables
    # Application
    APP_KEY=generate_random_32_character_string_here
    APP_PORT=13000
    APP_ENV=production
    
    # Database
    DB_DIALECT=postgres
    DB_HOST=localhost
    DB_PORT=5432
    DB_DATABASE=nocobase
    DB_USER=nocobase
    DB_PASSWORD=your_strong_password_here
    
    # Initial admin user
    INIT_ROOT_EMAIL=admin@yourdomain.com
    INIT_ROOT_PASSWORD=your_admin_password
    INIT_ROOT_NICKNAME=Administrator
    INIT_ROOT_USERNAME=admin

    🔐 Important: APP_KEY is the application's secret key used for generating user tokens. Ensure it is a random string and not exposed publicly.

    Install dependencies and initialize:

    Setup NocoBase
    # Install dependencies
    yarn install
    
    # Initialize the database
    yarn nocobase install
    
    # Build the application
    yarn build
    7

    Configure NGINX Reverse Proxy

    Set up NGINX as a reverse proxy for better performance:

    Install NGINX
    # Install Nginx
    sudo apt install -y nginx
    
    # Start and enable Nginx
    sudo systemctl start nginx
    sudo systemctl enable nginx
    Create NGINX Configuration
    sudo nano /etc/nginx/sites-available/nocobase
    NGINX Configuration
    server {
        listen 80;
        server_name your-domain.com www.your-domain.com;
    
        return 301 https://$server_name$request_uri;
    }
    
    server {
        listen 443 ssl http2;
        server_name your-domain.com www.your-domain.com;
    
        # SSL configuration (add your SSL certificates)
        # ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
        # ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;
    
        # SSL settings
        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_ciphers HIGH:!aNULL:!MD5;
    
        # Gzip compression
        gzip on;
        gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
    
        # Client max body size (for file uploads)
        client_max_body_size 100M;
    
        location / {
            proxy_pass http://127.0.0.1:13000;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            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;
            proxy_cache_bypass $http_upgrade;
            proxy_read_timeout 86400;
        }
    }
    Enable Site
    # Create symbolic link
    sudo ln -s /etc/nginx/sites-available/nocobase /etc/nginx/sites-enabled/
    
    # Test configuration
    sudo nginx -t
    
    # Reload NGINX
    sudo systemctl reload nginx
    8

    SSL Certificate Setup

    Use Let's Encrypt for free SSL certificates:

    Install Certbot
    # Install Certbot
    sudo apt install -y certbot python3-certbot-nginx
    
    # Obtain SSL certificate
    sudo certbot --nginx -d your-domain.com -d www.your-domain.com
    
    # Test automatic renewal
    sudo certbot renew --dry-run

    ✅ Certbot will automatically configure NGINX for HTTPS and set up auto-renewal.

    9

    Start NocoBase

    Start NocoBase using PM2 for process management:

    Install PM2
    # Install PM2 globally
    npm install -g pm2
    Start NocoBase with PM2
    # Start NocoBase in production mode
    pm2 start "yarn start" --name nocobase
    
    # Setup PM2 to start on boot
    pm2 startup
    pm2 save
    PM2 Management Commands
    # Check status
    pm2 status
    
    # View logs
    pm2 logs nocobase
    
    # Restart
    pm2 restart nocobase
    
    # Stop
    pm2 stop nocobase

    🚀 Access your installation: Navigate to https://your-domain.com or http://your-vps-ip:13000

    10

    Performance Optimization

    Optimize PostgreSQL for better performance:

    Edit PostgreSQL Configuration
    sudo nano /etc/postgresql/*/main/postgresql.conf
    PostgreSQL Optimization Settings
    # Optimize for limited resources
    shared_buffers = 128MB
    effective_cache_size = 512MB
    maintenance_work_mem = 64MB
    checkpoint_completion_target = 0.9
    wal_buffers = 16MB
    default_statistics_target = 100
    random_page_cost = 1.1
    effective_io_concurrency = 200
    Restart PostgreSQL
    sudo systemctl restart postgresql

    Additional Optimization Tips

    • • Enable HTTP/2 in NGINX (already included in configuration above)
    • • Choose sufficient bandwidth (50Mbps+ recommended for many users)
    • • Deploy in regions closer to your main user base
    • • Monitor resource usage and scale as needed
    11

    Monitoring & Maintenance

    Set up monitoring and backup strategies:

    Log management:

    View Logs
    # Check NocoBase logs
    tail -f logs/nocobase.log
    
    # Check PM2 logs
    pm2 logs nocobase
    
    # Check Nginx logs
    sudo tail -f /var/log/nginx/access.log
    sudo tail -f /var/log/nginx/error.log

    Backup strategy:

    Database Backup
    # Database backup
    sudo -u postgres pg_dump nocobase > nocobase_backup_$(date +%Y%m%d).sql
    
    # Application backup
    tar -czf nocobase_app_backup_$(date +%Y%m%d).tar.gz my-nocobase-app/

    Regular updates:

    Update Commands
    # Update system packages
    sudo apt update && sudo apt upgrade -y
    
    # Update NocoBase
    cd my-nocobase-app
    yarn nocobase upgrade
    12

    Troubleshooting

    Common issues and their solutions:

    Port Already in Use

    Check Port Usage
    # Check what's using port 13000
    sudo netstat -tlnp | grep :13000
    
    # Kill process if needed
    sudo kill -9 <process_id>

    Database Connection Issues

    Test Database Connection
    # Test PostgreSQL connection
    psql -h localhost -U nocobase -d nocobase
    
    # Check PostgreSQL status
    sudo systemctl status postgresql
    
    # Check PostgreSQL logs
    sudo tail -f /var/log/postgresql/postgresql-*-main.log

    Memory Issues

    Check and Add Swap
    # Check memory usage
    free -h
    
    # Check swap usage
    swapon --show
    
    # Add swap if needed
    sudo fallocate -l 1G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile

    🎉 Congratulations!

    You now have a fully functional NocoBase installation running on your RamNode VPS! Start building your no-code applications with complete control over your data and environment.

    Next Steps

    • • Explore NocoBase features and start building your applications
    • • Use the Plugin Manager to extend functionality
    • • Set up monitoring with tools like Uptime Kuma
    • • Configure email settings for notifications
    • • Plan for growth by monitoring resource usage
    • • Regularly backup your data
    • • Keep your system updated for optimal security

    Security Considerations

    Keep your NocoBase installation secure by following these best practices:

    • • Enable automatic security updates
    • • Regularly review firewall rules
    • • Use strong passwords for all accounts
    • • Keep PostgreSQL and all software up to date
    • • Monitor logs for suspicious activity