Is it possible to install Cockpit on Ubuntu without Docker?

Hi all,

I’m pretty new to development in general, and would like some assistance. I’m trying to get Cockpit installed and running with MongoDB on a Linux machine. I tried with Docker initially but was lost when it came to modifying Dockerfiles and such to connect it to Mongo. Is there a way to install Cockpit without Docker and be able to view the config files in the GUI to adjust them to work with Mongo? or am I missing something with Docker that could make that method viable for me?

Thanks in advance.

Hey @SlopezP, the docker is probably the most straightforward way to go… as it solves most of the issues of configuring servers, I use it always for development (and also for hosted websites), but if you prefer to go native… it should work as any other cms, you only need to have a webserver (e.g. nginx), php and mongodb.

The relevant part on mongo is the config/config.yaml on cockpit, you need something like:

database:
   server: mongodb://mongo-host:27017
   options:
       db: cockpitdb
       username: root
       password: root

assuming that you have mongo running and have a db and configured user and password!

You can have also a docker-compose.yml like below:

version: "2"

services:

  cockpit-cms-mongo:
    image: mongo
    environment:
        MONGO_INITDB_DATABASE: "cockpitdb"
        MONGO_INITDB_ROOT_USERNAME: root
        MONGO_INITDB_ROOT_PASSWORD: root
    ports:
    - "27017:27017"

  cockpit-cms-php:
    image: wodby/php:7.1
    environment:
      PHP_FPM_CLEAR_ENV: "no"
    volumes:
      - ./www:/var/www/html

  cockpit-cms-nginx:
    image: wodby/php-nginx:1.13
    depends_on:
      - cockpit-cms-php
    environment:
      NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
      NGINX_ERROR_LOG_LEVEL: error
      NGINX_BACKEND_HOST: cockpit-cms-php
      NGINX_SERVER_ROOT: /var/www/html
    volumes:
      - ./www:/var/www/html
    ports:
      - '8000:80'
1 Like

Thanks for the reply!

If docker is the way to go, how do I get to the config.yaml file? Is I’m having trouble figuring out the steps needed to get there and edit it. DO I have to use terminal commands to get to it? Or is it able to be accessed in the GUI?

I created manually the config.yaml inside config folder. When you have cockpit installed you can access that file from the ui in the settings page.

1 Like