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)
Initial VPS Setup
Connect to your RamNode VPS and perform initial setup:
ssh root@your-vps-ip-address# 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-certificatesCreate a new user (security best practice):
# Create a new user
sudo adduser nocobase
# Add user to sudo group
sudo usermod -aG sudo nocobase
# Switch to the new user
su - nocobaseConfigure firewall:
# 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 statusInstall Node.js and Yarn
Install Node.js 20.x and Yarn package manager:
# 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 globally
npm install --global yarn
# Verify Yarn installation
yarn --version✅ Node.js and Yarn are now installed and ready for NocoBase.
Install and Configure PostgreSQL
PostgreSQL is recommended for production deployments:
# 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# Switch to postgres user and create database
sudo -u postgres psql-- 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;
\qConfigure PostgreSQL for network access:
# 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.
Install NocoBase
Using create-nocobase-app (Recommended method):
# 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-appAlternative: 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.
Configure Environment Variables
Edit the .env file in your project directory:
nano .env# 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:
# Install dependencies
yarn install
# Initialize the database
yarn nocobase install
# Build the application
yarn buildConfigure NGINX Reverse Proxy
Set up NGINX as a reverse proxy for better performance:
# Install Nginx
sudo apt install -y nginx
# Start and enable Nginx
sudo systemctl start nginx
sudo systemctl enable nginxsudo nano /etc/nginx/sites-available/nocobaseserver {
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;
}
}# 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 nginxSSL Certificate Setup
Use Let's Encrypt for free SSL certificates:
# 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.
Start NocoBase
Start NocoBase using PM2 for process management:
# Install PM2 globally
npm install -g pm2# Start NocoBase in production mode
pm2 start "yarn start" --name nocobase
# Setup PM2 to start on boot
pm2 startup
pm2 save# 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
Performance Optimization
Optimize PostgreSQL for better performance:
sudo nano /etc/postgresql/*/main/postgresql.conf# 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 = 200sudo systemctl restart postgresqlAdditional 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
Monitoring & Maintenance
Set up monitoring and backup strategies:
Log management:
# 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.logBackup strategy:
# 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 system packages
sudo apt update && sudo apt upgrade -y
# Update NocoBase
cd my-nocobase-app
yarn nocobase upgradeTroubleshooting
Common issues and their solutions:
Port Already in Use
# Check what's using port 13000
sudo netstat -tlnp | grep :13000
# Kill process if needed
sudo kill -9 <process_id>Database Connection Issues
# 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.logMemory Issues
# 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
