
SonarQube
Code quality and security analysis
Deploy SonarQube in 3 Steps
Connect Your VPS
Add your server credentials to Server Compass
Select SonarQube
Choose from our template library
Deploy & Configure
Fill in settings and click Deploy
DIY SonarQube Deployment
Learn how to self-host SonarQube with this hands-on deployment guide.
Open a Terminal Connection
Start by opening a terminal window and connecting to your VPS via SSH.
# Connect to your VPS
ssh root@your-server-ip
# Or with a specific SSH key
ssh -i ~/.ssh/your-key root@your-server-ipFirst time? Docker required! Install it with: curl -fsSL https://get.docker.com | sh
Create Application Directory
Create a dedicated space for your application deployment.
# Create and navigate to project directory
mkdir -p ~/apps/sonarqube
cd ~/apps/sonarqubeCreate Deployment Configuration
Create a docker-compose.yml file with the following configuration:
services:
sonarqube:
image: sonarqube:community
ports:
- "9000:9000"
environment:
- SONAR_JDBC_URL=jdbc:postgresql://db:5432/sonarqube
- SONAR_JDBC_USERNAME=sonarqube
- SONAR_JDBC_PASSWORD=<your-db-password>
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_logs:/opt/sonarqube/logs
- sonarqube_extensions:/opt/sonarqube/extensions
restart: unless-stopped
depends_on:
- db
db:
image: postgres:16-alpine
environment:
- POSTGRES_USER=sonarqube
- POSTGRES_PASSWORD=<your-db-password>
- POSTGRES_DB=sonarqube
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
sonarqube_data:
sonarqube_logs:
sonarqube_extensions:
postgres_data:
PORTHost port(default: 9000)DB_PASSWORDDB passwordLaunch Your Application
Deploy the stack and monitor the startup process.
# Spin up containers
docker compose up -d
# Verify deployment
docker compose ps
# Check logs for errors
docker compose logs -fEnable External Access
Set up firewall rules to permit incoming connections.
# Allow the application port through firewall
sudo ufw allow 9000/tcp
sudo ufw reload
# Access your app at:
# http://your-server-ip:9000Skip the command line. Deploy visually.
Let Server Compass handle the complexity. Deploy SonarQube with a simple, intuitive interface.
- Visual config editor
- Instant deployment
- Automatic HTTPS
- Smooth updates
- Live monitoring
- Quick rollbacks
After Deployment
After deploying SonarQube with Server Compass, complete these steps to finish setup
Set vm.max_map_count on host
Log in (admin/admin)
Change password
Create projects
Need help? Check out our documentation for detailed guides.
SonarQube FAQ
Common questions about self-hosting SonarQube
How do I deploy SonarQube with Server Compass?
Simply download Server Compass, connect to your VPS, and select SonarQube from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.
What are the system requirements for SonarQube?
SonarQube requires a minimum of 2048MB RAM. We recommend a VPS with at least 4096MB RAM for optimal performance. Any modern Linux server with Docker support will work.
Can I migrate my existing SonarQube data?
Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard SonarQube backup and restore procedures.
How do I update SonarQube to the latest version?
Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest SonarQube image will be pulled and deployed with zero downtime.
Is SonarQube free to self-host?
SonarQube is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.
Related Templates
View all Development
PocketBase
Open-source backend in a single file with realtime database, auth, and file storage

Appwrite
Open-source backend-as-a-service - self-hosted Firebase alternative

Parse Server
Open-source backend framework with dashboard

Supabase
Full Supabase self-hosted with Kong, GoTrue Auth, Realtime, and Studio
Ready to Self-Host SonarQube?
Download Server Compass and deploy SonarQube to your VPS in under 3 minutes. No Docker expertise required.
Download Server Compass