Git Product home page Git Product logo

freeipa-nextcloud's Introduction

๐Ÿš€ Freeipa Integrated with NextCloud ๐Ÿš€

FreeIPA Nextcloud MariaDB "mysql"

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

1- Install Docker-compose โœจ

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.27.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose

2- Test the installation โœจ

$ docker-compose --version
docker-compose version 1.27.3, build 1110ad01

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

1- Create freeipa Container as below โœจ

  • define your version of your docker-compose file :
version: "3.7"
services:
  • define your container name "freeipa" , define the "image" you will use for your freeipa image.
freeipa:
    image: freeipa/freeipa-server:centos-8
  • The container is always restarts.
restart: always
  • change "ipa.ldap.local" to your Hostname
hostname: ipa.ldap.local
environment:
    - IPA_SERVER_HOSTNAME=ipa.ldap.local
tty: true
stdin_open: true
cap_add:
    - NET_ADMIN
  • All data beyond what lives in the database is stored in the docker volume as you defined it,That means your data is saved even if the container crashes, is stopped or deleted.
        volumes:
          - /sys/fs/cgroup:/sys/fs/cgroup:ro
          - ./data/freeipa:/data:Z
  • Disable IPV6
        sysctls:
          - net.ipv6.conf.lo.disable_ipv6=0
          - net.ipv6.conf.all.disable_ipv6=0
        security_opt:
          - "seccomp:unconfined"
  • Configure the FreeIPA master using the inputs provided. For unattended initial installation, if you want to allow dns server, delete # from the beginning.
        command:
          - -U
          - --domain=ldap.local         # add your domain name only
          - --realm=ldap.local
          - --http-pin=UltraS3cure
          - --dirsrv-pin=UltraS3cure
          - --ds-password=UltraS3cure       
          - --admin-password=UltraS3cure    # your default password
          - --no-host-dns
          #- --no-dnssec-validation
          #- --setup-dns
          #- --auto-forwarders
          #- --allow-zone-overlap
          - --unattended
  • Expose the freeipa ports :
        ports:
          #- "53:53/udp"
          #- "53:53"
          - "80:80"
          - "443:443"
          - "389:389"
          - "636:636"
          - "88:88"
          - "464:464"
          - "88:88/udp"
          - "464:464/udp"
          - "123:123/udp"
          - "7389:7389"
          - "9443:9443"
          - "9444:9444"
          - "9445:9445"
  • The Important step for make the Integration between freeipa with Nextcloud , it makes the link between 2 containers.
depends_on:
    - nextcloud         # name of the container, you need to make the link.      
  • define the network card name.
networks:
    - nextcloud_network

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

2- Create Nextcloud Container as below โœจ

  • define the nextcloud service on docker-compose file undername nextcloud.
  • select the image you will use , I use the latest version.
  • define the name of the container.
    nextcloud:
        image: nextcloud:latest
        container_name: nextcloud-app
  • Expose the port '8080' into local machine, and port '80' from docker container.
        ports: 
            - 8080:80
  • All data beyond what lives in the database is stored in the docker volume as you defined it,That means your data is saved even if the container crashes, is stopped or deleted.
  • . it's mean the same directory which the docker-compose file there.
        volumes:
            - ./data/nextcloud:/var/www/html
            - ./data/app/config:/var/www/html/config
            - ./data/app/custom_apps:/var/www/html/custom_apps
            - ./data/app/data:/var/www/html/data
            - ./data/app/themes:/var/www/html/themes
            - /etc/localtime:/etc/localtime:ro
                        
  • define the environment methods , and write your domain name or your IP.
  • cloud.ldap.local <-- domain name
        environment:
            - VIRTUAL_HOST=cloud.ldap.local
            - LETSENCRYPT_HOST=cloud.ldap.local
            - [email protected]
        restart: always
        networks:
            - nextcloud_network
  • Nextcloud needs database will depend on it , db it mean the database name of service.
        depends_on:
            - db

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

3- Create Maria-DB "mysql" Database Container as below โœจ

  • define the service name db , Image name mariadb , Container name nextcloud-mariadb, network card name nextcloud_network.
    db:
        image: mariadb
        container_name: nextcloud-mariadb
        restart : always
        networks:
            - nextcloud_network
  • make mount volume for database.
        volumes:
            - ./data/db:/var/lib/mysql
            - /etc/localtime:/etc/localtime:ro
  • define the database name,password,user name.
        environment:
            - MYSQL_ROOT_PASSWORD=toor
            - MYSQL_PASSWORD=mysql
            - MYSQL_DATABASE=nextcloud
            - MYSQL_USER=nextcloud
  • define on the root level the volumes names for create automatickly
volumes:
    nextcloud:
    db:
    datafreeipa:
  • define network card for creation :
networks:
    nextcloud_network:

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

Edit your hosts file if you don't have DNS server, and add this lines , your local IP or your localHost with your hostname for Freeipa , Nextcloud.

hosts

- Run docker-compose

docker-compose up -d

if you want to show the logs , run this command

docker-compose logs -f
  • wait for freeipa finishing the Installation and configuration.

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

  • Configure Nextcloud application for start and Integration
  • open browser and go to http://cloud.ldap.local:8080
  • user name is admin password admin
  • Press Finish setup

Image3

Image4

Image5

Image6

Image7

Image8

Image9

Image10

Image11

Image12

Image13

Image14

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

  • Login to LDAP Server and testing for adding user and go back to nextcloud to join by the same user.
  • open browser and go to http://ipa.ldap.local
  • user name admin password UltraS3cure

Image15

Image16

Image17

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

  • go back to nextcloud for test the hakim user.

Image18

Image19

Image20

Image21

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

  • Done :)

freeipa-nextcloud's People

Contributors

abdel-hakim avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

darz82

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.