RamNode logo
Deployment Guide

Deploy Apps with CapRover

CapRover is a powerful, self-hosted Platform-as-a-Service (PaaS) that makes deploying applications incredibly simple. Combined with RamNode's reliable VPS hosting , you get a robust deployment solution that rivals expensive cloud platforms. This guide will walk you through the entire process of setting up CapRover on a RamNode VPS and deploying your first application.

Ubuntu 22.04/24.04
CapRover PaaS
⏱️ 30-45 minutes

Why CapRover + RamNode?

CapRover Benefits

  • • One-click app deployments
  • • Automatic SSL certificates via Let's Encrypt
  • • Built-in load balancer and reverse proxy
  • • Docker-based containerization
  • • Easy database management
  • • Zero-downtime deployments

RamNode Advantages

  • • Competitive pricing with excellent performance
  • • Multiple data center locations
  • • SSD and NVMe storage and high-speed networking
  • • Reliable uptime and support
  • • Flexible configurations

Prerequisites

Before we begin, ensure you have:

Server Requirements

  • • RamNode VPS with at least 1GB RAM (2GB+ recommended)
  • • Ubuntu 22.04 or 24.04 LTS
  • • A domain name pointing to your VPS IP
  • • SSH access to your server

Knowledge Requirements

  • • Basic command line knowledge
  • • SSH connection skills
  • • Basic understanding of Docker concepts
  • • Domain configuration basics
3

Initial Server Configuration

Connect to your RamNode VPS and update the system:

Connect via SSH
ssh root@your-server-ip
Update System Packages
apt update && apt upgrade -y

Create a non-root user (optional but recommended):

Create Non-Root User
adduser caprover
usermod -aG sudo caprover
su - caprover

💡 Tip: Replace "your-server-ip" with your actual RamNode VPS IP address.

4

Configure Firewall

Install and configure UFW (Uncomplicated Firewall):

Configure UFW Firewall
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 3000/tcp
sudo ufw enable

⚠️ Warning: Make sure SSH is allowed before enabling UFW to avoid losing access!

5

Install Docker

CapRover requires Docker to function. Install Docker using the official installation script:

Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Add User to Docker Group
sudo usermod -aG docker $USER

Log out and back in for the changes to take effect, then verify Docker is working:

Verify Docker Installation
docker --version
docker run hello-world

✅ Docker is now installed and ready for CapRover.

6

Install CapRover Server

Run the CapRover installation command:

Install CapRover Container
docker run -p 80:80 -p 443:443 -p 3000:3000 -d \
 --name captain-captain \
 --restart=unless-stopped \
 -v /var/run/docker.sock:/var/run/docker.sock \
 -v /captain:/captain \
 caprover/caprover

🚀 CapRover server is now running!

7

Initial CapRover Setup

Wait for the container to start (about 30 seconds), then access CapRover at:

Access CapRover Web Interface
http://your-domain.com:3000

The default password is captain42. You'll be prompted to change this immediately.

During the initial setup, you'll need to:

  • • Set your root domain (e.g., yourdomain.com)
  • • Configure your email for Let's Encrypt SSL certificates
  • • Change the default password
8

Install CapRover CLI

On your local machine, install the CapRover CLI tool:

Install CapRover CLI
npm install -g caprover

💡 Note: If you don't have Node.js installed, download it from nodejs.org.

9

Connect to Your CapRover Instance

From your local machine, connect to your CapRover server:

Setup CapRover Connection
caprover serversetup

Enter the following information when prompted:

  • • Setup a new CapRover server: Yes
  • • IP address of server: Your RamNode VPS IP
  • • CapRover server URL: https://captain.yourdomain.com
  • • New CapRover name: Choose a memorable name
  • • CapRover server password: The password you set earlier
10

Deploy Your First Application

For this example, we'll deploy a simple Node.js application. Create the following files:

package.json
{
 "name": "my-caprover-app",
 "version": "1.0.0",
 "description": "Sample CapRover application",
 "main": "app.js",
 "scripts": {
 "start": "node app.js"
 },
 "dependencies": {
 "express": "^4.18.0"
 }
}
app.js
const express = require('express');
const app = express();
const PORT = process.env.PORT || 3000;
app.get('/', (req, res) => {
 res.send('Hello from CapRover on RamNode!');
});
app.listen(PORT, () => {
 console.log(`Server running on port ${PORT}`);
});
captain-definition
{
 "schemaVersion": 2,
 "dockerfilePath": "./Dockerfile"
}
Dockerfile
FROM node:16-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
EXPOSE 3000
CMD ["npm", "start"]

Deploy the application:

Deploy Application
caprover deploy

Follow the prompts:

  • • Select your CapRover server
  • • Enter your app name (e.g., my-first-app)
  • • Choose whether to create the app if it doesn't exist
11

Configure Your Application

Visit https://captain.yourdomain.com and log in to access the web interface.

App Settings

  • • Set environment variables
  • • Configure custom domains
  • • Enable SSL certificates
  • • Set up persistent storage
  • • View logs and metrics

Custom Domain Setup

  • • Go to Apps → Your App Name
  • • Click on "HTTP Settings"
  • • Add your custom domain
  • • Enable HTTPS with Let's Encrypt
  • • Force HTTPS redirection
12

Advanced Configuration

CapRover includes one-click apps for popular databases and services:

13

Monitoring and Maintenance

Viewing Logs

  • • Real-time logs
  • • Application metrics
  • • Resource usage

Backup Strategy

  • • Database dumps
  • • Application data
  • • CapRover configuration
Update CapRover
# Update CapRover
docker service update captain-captain --image caprover/caprover:latest
# Update system packages
sudo apt update && sudo apt upgrade -y
14

Troubleshooting Common Issues

15

Security Best Practices

Essential Security

  • • Change default passwords
  • • Use SSH keys
  • • Regular updates
  • • Firewall configuration

Optimization Tips

  • • Right-size your VPS
  • • Monitor resource usage
  • • Optimize Docker images
  • • Clean up unused resources

🎉 Congratulations! You've successfully deployed CapRover on your RamNode VPS. This setup gives you enterprise-grade deployment tools without the complexity or expense of major cloud platforms.

AltStyle によって変換されたページ (->オリジナル) /