//Servers

Deploy Docker & Reverse Proxy in Plesk: A Complete Guide

Install Docker on your Plesk VPS and set up a reverse proxy to run containers securely. Step-by-step guide for Debian and AlmaLinux.

6 min read
Deploy Docker & Reverse Proxy in Plesk: A Complete Guide

Running Docker containers alongside Plesk gives you the flexibility of modern micro‑services while keeping the familiar Plesk UI for domain, DNS, and SSL management. This guide walks through the whole process: installing Docker on a VPS, pulling a container, configuring a reverse proxy in Plesk, and testing the setup. The instructions are split for the two most common Linux families used on AtoZNode servers – Debian/Ubuntu (APT) and AlmaLinux/Rocky / RHEL (DNF). If you are on Windows Server, the concepts are the same, but Docker and reverse‑proxy configuration are handled through the Windows Docker Engine and IIS (or another reverse‑proxy service).

1. Prepare the Server and Install Docker

Before installing Docker, ensure that your Plesk installation is up to date. Updating Plesk also updates the underlying OS packages that Docker depends on.

Debian / Ubuntu (APT)

# Update package lists and upgrade installed packages
sudo apt update && sudo apt upgrade -y

# Install utilities required for Docker’s repository
sudo apt install -y ca-certificates curl gnupg lsb-release

# Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg \
  | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

# Add the stable Docker repository
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \
  https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Refresh package lists and install Docker Engine
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io

# Verify the installation
docker --version

AlmaLinux / Rocky / RHEL (DNF)

# Install utilities required for Docker’s repository
sudo dnf install -y yum-utils device-mapper-persistent-data lvm2

# Add Docker’s official repository
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

# Install Docker Engine
sudo dnf install -y docker-ce docker-ce-cli containerd.io

# Start Docker and enable it at boot
sudo systemctl start docker
sudo systemctl enable docker

# Verify the installation
docker --version

Both sets of commands install the same Docker Engine version that Plesk can detect. After installation, add the Plesk user (usually plesk) to the docker group so the UI can manage containers without sudo.

sudo usermod -aG docker plesk
# Log out and back in for the group change to take effect

2. Enable the Docker Extension in Plesk

Log in to Plesk as an administrator, then navigate to Extensions → Docker and click Install. Once installed, the Docker dashboard appears under Server Management → Docker. The UI lists images, containers, and basic actions (run, stop, remove).

3. Pull and Run a Sample Container

For demonstration we’ll deploy a simple nginx container that will later be accessed through a reverse proxy. You can replace nginx with any image that suits your application (Node.js, PHP‑FPM, etc.).

Using the Plesk UI

  1. Open the Docker extension and click Search.
  2. Enter nginx and press Search.
  3. Select the official nginx:latest image and click Install.
  4. After the image downloads, click Run. In the dialog:
    • Set a Container name (e.g., my-nginx).
    • Map container port 80 to an unused host port, such as 8080.
    • Optionally bind a host directory to /usr/share/nginx/html for static files.
  5. Click Run again to start the container.

Using the Command Line (optional)

# Pull the latest nginx image
docker pull nginx:latest

# Run the container, mapping host port 8080 → container port 80
docker run -d --name my-nginx -p 8080:80 nginx:latest

The container should now be reachable at http://YOUR_SERVER_IP:8080. Open that URL in a browser; you should see the default Nginx welcome page.

4. Set Up a Reverse Proxy with Plesk’s Proxy Settings

Plesk includes a built‑in reverse‑proxy module that works with both Apache and Nginx. We’ll configure it so that a domain (e.g., app.example.com) forwards traffic to the Docker container on port 8080.

Configure the Domain in Plesk

  1. In Plesk, go to Websites & Domains → Add Domain (or select an existing one).
  2. Enter the domain name (e.g., app.example.com) and complete the wizard.
  3. Click Apache & Nginx Settings for that domain.
  4. Scroll to the Proxy mode section and enable Proxy mode. This tells Plesk to forward requests to a backend service.
  5. In the Proxy destination field, enter the internal address of the container: http://127.0.0.1:8080.
  6. Save the settings.

Plesk adds an Nginx location block similar to:

location / {
    proxy_pass http://127.0.0.1:8080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
}

Because the proxy runs on the same host, no firewall changes are required.

Secure the Proxy with Let’s Encrypt (optional)

  1. Within the domain’s dashboard, click SSL/TLS Certificates → Let’s Encrypt.
  2. Check “Secure the domain with Let’s Encrypt” and, if desired, “Include www sub‑domain”.
  3. Press Install. Plesk automatically configures Nginx to serve HTTPS while continuing to proxy to the Docker container.

5. Managing Containers Directly from Plesk

After the initial deployment, you can control the container without leaving the Plesk UI:

  • Start / Stop: Click the play or stop icons next to the container name.
  • View Logs: Open the Logs tab to see real‑time output, useful for debugging.
  • Execute a Shell: Use the Exec button to run bash inside the container (equivalent to docker exec -it … /bin/bash).
  • Update Image: Pull a newer version via the Refresh button, then redeploy.

If you need to change port mappings or environment variables, stop the container, edit its configuration, and start it again. The reverse‑proxy rule continues to point to 127.0.0.1:8080 (or whatever host port you assign), so changes take effect immediately.

6. Troubleshooting Common Issues

Container Not Reachable

  1. Confirm the container is running: docker ps.
  2. Check the host port mapping; the Ports column should show 0.0.0.0:8080->80/tcp.
  3. Verify that the Plesk proxy rule points to the correct host port.
  4. If a firewall is enabled (e.g., ufw or firewalld), ensure the host port (8080) is allowed for inbound traffic.

SSL Handshake Errors

  • Make sure the Let’s Encrypt certificate is correctly assigned to the domain.
  • Confirm that the proxy_set_header Host $host; directive is present; otherwise the backend may reject the request.

Permission Problems with Docker Commands

If you receive “permission denied” when using the Docker CLI as the plesk user, log out and back in or run newgrp docker to refresh the group membership.

Conclusion

Integrating Docker containers with Plesk’s reverse‑proxy feature lets you combine the power of containerised applications with the convenience of a single control panel. By following the steps for your distribution—APT for Debian/Ubuntu or DNF for AlmaLinux/Rocky/RHEL—you can install Docker, pull any image, expose it through a domain, and manage everything from within Plesk. This workflow reduces the need for separate SSH sessions, keeps SSL handling centralized, and scales smoothly as you add more containers or domains.

dockerpleskreverse-proxycontainerslinuxubuntudebianalmalinux

Try it on your own server

Follow along on a Cloud VPS with full root access, or read the step-by-step knowledge base guides.

Guides: VPS for WordPress · Node.js hosting · VPS or dedicated server · Paying by UPI