Deployment Overview of RabbitMQ on Server¶
Prerequisites and Basic Requirements¶
The deployment requires a Linux operating system based on the Ubuntu distribution with the following specifications:
-
Operating System: Ubuntu
-
Privileges: Root access is required for installation and configuration.
-
Domain Zone:
hostkey.in -
Required Ports:
-
Internal Management Port:
15672 -
External HTTPS Port:
443
FQDN of the Final Panel¶
The RabbitMQ management interface is accessible via the Fully Qualified Domain Name (FQDN) constructed using the server-specific prefix and ID. The URL format is:
rabbitmq<Server ID>.hostkey.in:443
Where <Server ID> is the unique identifier for the specific server instance.
Application Installation Process¶
The RabbitMQ server is installed directly on the host operating system using the native package manager. The process includes:
-
Updating the local apt cache.
-
Installing the
rabbitmq-serverpackage. -
Starting and enabling the
rabbitmq-serversystemd service to run on boot. -
Enabling the
rabbitmq_managementplugin to provide the web interface. -
Configuring the management listener to bind to
127.0.0.1on port15672. -
Creating an administrative user and setting permissions.
The installed version corresponds to the latest version available in the Ubuntu repositories at the time of execution.
Databases¶
RabbitMQ utilizes its internal storage mechanism for message queuing and metadata. The configuration establishes the following:
-
Virtual Host:
/ -
User Credentials:
-
Username:
root -
Password: Configured via the system SSH password.
-
Permissions: The
rootuser is granted full permissions (.*) on the/virtual host for configuration, write, and read operations.
Docker Containers and Their Deployment¶
A reverse proxy infrastructure is deployed using Docker Compose to manage SSL termination and routing. The deployment details are:
-
Directory:
/root/nginx -
Composed File:
/root/nginx/compose.yml -
Service:
nginx -
Image:
jonasal/nginx-certbot:latest -
Restart Policy:
unless-stopped -
Network Mode:
host -
Volumes:
-
nginx_secrets: External volume mounted at/etc/letsencryptinside the container. -
Host directory
/data/nginx/user_conf.dmounted to/etc/nginx/user_conf.dinside the container. -
DNS Servers:
-
1.1.1.1 -
8.8.8.8 -
9.9.9.9
Proxy Servers¶
The application uses an Nginx container with Certbot integration to handle HTTPS traffic and SSL certificate management.
-
Container Image:
jonasal/nginx-certbot:latest -
Email for Certbot:
[email protected] -
Environment File:
/data/nginx/nginx-certbot.env -
Configuration Location: Nginx user configurations are stored in
/data/nginx/user_conf.d. -
Routing Logic: A specific Nginx configuration file named
<prefix><Server ID>.hostkey.in.confis updated to proxy requests to the internal RabbitMQ management interface. -
The
proxy_passdirective is set to forward traffic tohttp://127.0.0.1:15672. -
The external path
/maps directly to the internal RabbitMQ management interface.
Location of Configuration Files and Data¶
The following file paths contain the core configuration and data for the deployment:
| Component | File Path / Directory | Description |
|---|---|---|
| RabbitMQ Config | /etc/rabbitmq/rabbitmq.conf | Main configuration file for the RabbitMQ service. |
| Nginx Compose | /root/nginx/compose.yml | Docker Compose file defining the reverse proxy. |
| Nginx User Configs | /data/nginx/user_conf.d | Directory containing specific site configurations. |
| SSL Secrets | /data/nginx (mapped to /etc/letsencrypt) | Directory for Let's Encrypt SSL certificates and keys. |
| Certbot Env | /data/nginx/nginx-certbot.env | Environment variables for the Certbot container. |
Available Ports for Connection¶
The system exposes the following ports for accessing the application:
| Port | Protocol | Service | Access Scope |
|---|---|---|---|
443 | HTTPS | Nginx Reverse Proxy | Public |
15672 | TCP | RabbitMQ Management UI | Localhost (127.0.0.1) only |
Starting, Stopping, and Updating¶
Service management for the core application and the proxy is handled via systemd and Docker Compose respectively.
RabbitMQ Service Management:
-
Start/Restart:
systemctl restart rabbitmq-server -
Status:
systemctl status rabbitmq-server -
Enable on Boot:
systemctl enable rabbitmq-server
Docker Proxy Management:
-
Start/Restart:
docker compose up -d(executed from/root/nginx) -
Stop:
docker compose down(executed from/root/nginx) -
Status:
docker compose ps(executed from/root/nginx)