Ir al contenido

Master Guide: Deploying Plane with SSL Security and Cloudflare

Deployment and advanced securing of Plane Commercial using Nginx, Cloudflare Origin SSL certificates, and strict end-to-end encryption.

0views

The most common error in the deployment of Plane is having obsolete versions of container orchestrators. We will clean and install the official version compatible with the Plane administrative CLI.

Ventana de terminal
# Eliminar versiones conflictivas previas
sudo apt-get remove docker docker-engine docker.io containerd runc
# Instalar dependencias base
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg -y
# Instalar llaves seguras GPG
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Configurar el repositorio oficial
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

1.2. Docker Engine and Compose Plugin Installation

Sección titulada «1.2. Instalación de Docker Engine y Plugin Compose»
Ventana de terminal
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
# Validación de funcionamiento
docker compose version

Phase 2: Plane Installation (Commercial Edition)

Sección titulada «Fase 2: Instalación de Plane (Commercial Edition)»

We will adjust the native ports of the Plane proxy container to avoid collisions with the local Nginx web server.

Ventana de terminal
mkdir plane-selfhost && cd plane-selfhost
curl -fsSL https://raw.githubusercontent.com/makeplane/plane/master/deploy/selfhost/install.sh -o setup.sh
chmod +x setup.sh
# Ejecutar setup indicando la delegación de SSL a un proxy reverso
sudo ./setup.sh --behind-proxy --domain="plane.portelcore.com"

We will edit the local configuration so that Plane services listen on dedicated internal ports (8080), freeing up the privileged internet ports (80 and 443) on the host machine for Nginx.

Open the configuration file:

Ventana de terminal
nano .env

Align the following key variables:

# Asignación de puertos de contenedor internos
LISTEN_HTTP_PORT=8080
LISTEN_HTTPS_PORT=10443
# Enrutamiento SSL corporativo
WEB_URL=https://plane.portelcore.com
API_URL=https://plane.portelcore.com/api
# Enrutamiento del puerto local
SITE_ADDRESS=:80
Ventana de terminal
sudo prime-cli restart

Phase 3: Security Certificates (Cloudflare Origin)

Sección titulada «Fase 3: Certificados de Seguridad (Cloudflare Origin)»

To ensure a strict encrypted tunnel between the Cloudflare Edge and your local virtualization server:

  1. Access your Cloudflare SSL/TLS Origin Server dashboard.
  2. Create a new Origin Certificate specifying the host name resolution.
  3. Copy the public certificate and the generated private key strings.

On the local host server:

Ventana de terminal
# Registrar el certificado público de origen
sudo nano /etc/ssl/certs/plane-origin.pem
# (Pegar el contenido del bloque de Cloudflare Origin Certificate)
# Registrar la clave privada de cifrado
sudo nano /etc/ssl/private/plane-key.pem
# (Pegar el contenido del bloque de Private Key)

Nginx will decrypt the incoming SSL encryption and channel the traffic to the Plane containers.

Ventana de terminal
sudo apt update && sudo apt install nginx -y
Ventana de terminal
sudo nano /etc/nginx/sites-available/plane

Add the standardized routing configuration:

server {
listen 443 ssl http2;
server_name plane.portelcore.com;
# Rutas a certificados de Cloudflare Origin
ssl_certificate /etc/ssl/certs/plane-origin.pem;
ssl_certificate_key /etc/ssl/private/plane-key.pem;
# Configuración de Algoritmos de Cifrado Seguros
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+AESGCM:EDH+AESGCM;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
# Límite máximo de carga de adjuntos
client_max_body_size 10M;
location / {
# Redireccionar al puerto de contenedor interno
proxy_pass http://127.0.0.1:8080/;
# Cabeceras estándar de enrutamiento inverso
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
# Soporte de conexiones WebSockets duraderas
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Tiempos de espera extendidos
proxy_read_timeout 300;
proxy_connect_timeout 300;
}
}

4.3. Activation and Deployment on Nginx Server

Sección titulada «4.3. Activación y Despliegue en Servidor Nginx»
Ventana de terminal
# Enlace simbólico en sitios activos
sudo ln -s /etc/nginx/sites-available/plane /etc/nginx/sites-enabled/
sudo rm /etc/nginx/sites-enabled/default
# Probar la sintaxis del archivo
sudo nginx -t
# Reiniciar servidor web
sudo systemctl restart nginx

Phase 5: Hardening in Cloudflare (Strict Mode)

Sección titulada «Fase 5: Blindaje en Cloudflare (Strict Mode)»
  1. Go to the SSL/TLS > Overview tab in Cloudflare and set the encryption to Full (Strict) mode.
  2. Go to SSL/TLS > Edge Certificates and enable the Always Use HTTPS option to force secure redirections.

  • ✓ End-to-End Security: Full encryption guaranteed via local Cloudflare Origin certificates.
  • ✓ Conflict-Free: Decoupling of container HTTP/HTTPS ports to alternative ports (8080 / 10443).
  • ✓ Active Sockets: Correct WebSocket headers to support instant project synchronization.