Deploying Cosmos Cloud Server with Docker¶
Introduction to Cosmos Cloud¶
Cosmos Cloud is a sophisticated platform designed to manage Docker containers and services. It provides an intuitive interface for container orchestration, simplifying the deployment and management of Dockerized applications.
Docker Run Command for Cosmos Cloud Server¶
The recommended method to deploy Cosmos Cloud Server is via a Docker run command. This approach is advised by Cosmos Cloud developers for optimal compatibility and performance.
Docker Run Command Breakdown¶
docker run -d --network host --privileged --name cosmos-server -h cosmos-server --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /:/mnt/host -v /var/lib/cosmos:/config azukaar/cosmos-server:latest
For Windows and MacOS users: Please use the command below. This adjustment is necessary due to Docker's different handling of network interfaces and privileges on non-Linux platforms.
docker run -d -p 80:80 -p 443:443 -p 4242:4242/udp --privileged --name cosmos-server -h cosmos-server --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /:/mnt/host -v ./config:/config azukaar/cosmos-server:latest
To change the default ports: -e COSMOS_HTTP_PORT=8080 -e COSMOS_HTTPS_PORT=8443 Change these port values to your own
-d: Run container in detached mode (in the background).--network host: Use the host's networking stack. This is crucial for Cosmos Cloud to properly manage and communicate with other containers.--privileged: Gives the container full access to the host. This is necessary for Cosmos Cloud to manage Docker containers and host resources effectively.--name cosmos-server: Assigns the container a name for easy reference.-h cosmos-server: Sets the hostname of the container tocosmos-server.--restart=always: Ensures the container automatically restarts if it stops unexpectedly (e.g., due to a system reboot or crash).-v /var/run/docker.sock:/var/run/docker.sock: Mounts the Docker socket file from the host inside the container. This allows Cosmos Cloud to interact with the Docker daemon, managing containers and services.-v /:/mnt/host: Mounts the root filesystem of the host to/mnt/hostinside the container. This gives Cosmos Cloud access to the host's file system for management and monitoring purposes.-v /var/lib/cosmos:/config: Persists Cosmos Cloud's configuration data in/var/lib/cosmoson the host.azukaar/cosmos-server:latest: Specifies the Docker image and tag to use for the container.
Important Note on Deployment Method¶
Do not use Docker Compose or container managers to deploy Cosmos
Cosmos must be deployed using the docker run command below. Do not use Docker Compose, Portainer Stacks, Unraid App Store, CasaOS, or any other container management tool to deploy it — doing so will cause Cosmos to malfunction.
Deployment Instructions¶
- Prepare Your System: Ensure Docker is installed and running on your host system.
- Run the Docker Command: Execute the provided Docker run command in your terminal. This command pulls the latest Cosmos Cloud Server image and starts a new container with the appropriate configurations.
- Access Cosmos Cloud: After deployment, access Cosmos Cloud through its web interface or according to its documentation to start managing your Docker containers and services.
By following these instructions and using the Docker run command as recommended by Cosmos Cloud, you ensure a smooth and functional deployment of Cosmos Cloud Server, ready to orchestrate your containerized applications effectively.
Updating Cosmos¶
Cosmos manages its own updates — when a new version is available you will see an update prompt in the Cosmos UI. Do not update it with Docker Compose or other container tools.
Youtube Video¶
If there is an issue with this guide or you wish to suggest changes, please raise an issue on GitHub.