Upgrading from Alfresco 5 to Alfresco 6 (our way)

/ / Blog, Document Management
Talend Partner Summit Madrid 2018
¡Descubre todas las novedades de Alfresco 6 en nuestro canal de YouTube!

keensoft UST Global started using Alfresco Community for internal purposes in early 2013 over Ubuntu 12.04. We started with 4.0.d but in a few we upgraded to 4.2.c. From them, we have been sharing every upgrading process in our blog:

Some days ago, Alfresco released the first Alfresco 6 GA (identified as 201806-GA). So, as we need some background experiences before spreading the word to our customers, we started to plan the upgrading of our internal server.

Starting point

Our server had following base software:

  • Ubuntu 14.04
  • Alfresco CE 201707
  • PostgreSQL 9.4.12

With 16 GB RAM, memory distribution was mapped as following:

  • 6 GB for Tomcat (Alfresco & Share)
  • 2 GB for Jetty (SOLR)
  • 4 GB for PostgreSQL

Some other features:

  • Authentication and synchronisation with our corporate OpenLDAP
  • Many custom addons as AMPs and JARs, mainly home-made

Size of the repository:

$ cd /opt/alfresco/alf_data/contentstore
$ du --max-depth=1 -h
3.0G ./2013
14G ./2014
6.4G ./2015
14G ./2016
11G ./2017
20G ./2018
66G .

The new server

As our software was running on the original 2012 server, we decided to install a new server with the same specifications but including a Docker service by default:

  • Ubuntu 18.04
  • Docker 17.05
  • 16 GB RAM

Alfresco recommends installing the product by using Docker images from release 6, so we built a simple Docker Compose to include required settings.

Our Docker base images catalog is:

However, we required to perform some configuration to this images to adapt them to our requirements.

version: '3'

        build: ./httpd
          - 80:80
          - alfresco
          - share
          - solr6

      build: ./adf
        - alfresco
        - 3000:3000

        build: ./alfresco
        privileged: true
            JAVA_OPTS : '
                -Xmx6g -Xms6g
          - ./data/alf-repo-data:/usr/local/tomcat/alf_data
          - ./data/ocr_input:/ocr_input
          - ./data/ocr_output:/ocr_output
          - 21:21        #FTP port
          - 25:25        #SMTP port
          - 143:143      #IMAP port
          - 445:445      #CIFS
          - 137:137/udp  #CIFS
          - 138:138/udp  #CIFS
          - 139:139      #CIFS

        build: ./share
            - REPO_HOST=alfresco
            - REPO_PORT=8080
            - 'CATALINA_OPTS= -Xms2g -Xmx2g'

        image: postgres:10.1
            - POSTGRES_PASSWORD=alfresco
            - POSTGRES_USER=alfresco
            - POSTGRES_DB=alfresco
        # From pg_tune (4 GB + 2 CPUs + 300 connections)
        command: '
          postgres -c max_connections=300
            -c shared_buffers=1GB
            -c effective_cache_size=3GB
            -c maintenance_work_mem=256MB
            -c checkpoint_completion_target=0.7
            -c wal_buffers=16MB
            -c default_statistics_target=100
            -c random_page_cost=1.1
            -c effective_io_concurrency=200
            -c work_mem=3495kB
            -c min_wal_size=1GB
            -c max_wal_size=2GB
            -c max_worker_processes=2
            -c max_parallel_workers_per_gather=1
            -c max_parallel_workers=2
            -c log_min_messages=LOG
           - ./data/postgres-data:/var/lib/postgresql/data
            - 5432:5432

        image: alfresco/alfresco-search-services:1.1.1
            - SOLR_ALFRESCO_HOST=alfresco
            - SOLR_ALFRESCO_PORT=8080
            - SOLR_SOLR_HOST=solr6
            - SOLR_SOLR_PORT=8983
            - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
            - SOLR_JAVA_MEM=-Xms2g -Xmx2g
        # Set permissions for user with uid 1000 ('isadm' in host, 'solr' in container)
          - ./data/solr-data:/opt/alfresco-search-services/data

        build: ./ocrmypdf
        hostname: ocrmypdf
          - ./data/ocr_input:/ocr_input
          - ./data/ocr_output:/ocr_output

To use ADF app by using HTTPs and /adf context path, we made some changes in the source code.


"build": "npm run server-versions && ng build --prod --base-href /adf/"


"target": "",
"secure": true,


"ecmHost": "https://{hostname}{:port}",

Finally, we wrote a small script to start Docker Compose on boot by using systemd.

Description=Alfresco 6 Server

ExecStart=/usr/local/bin/docker-compose -f /opt/alfresco/docker-compose.yml up
ExecStop=/usr/local/bin/docker-compose -f /opt/alfresco/docker-compose.yml down -v


Once the base installation was successful, we tested every addon and extension on Alfresco 6 (special care for repository developments) and we adapted some of them:

At this point, we knew that Alfresco 6 was running in the new server with every customisation. So, we made a first data import to start with capacity planning.

Capacity planning

As this was a new infrastructure, despite having the same resources, we run some capacity tests to measure the quality of the service.

We considered three different scenarios:

  • Alfresco 201707 installed by components: Tomcat, Jetty and PostgreSQL
  • Alfresco 6 on Docker Compose
  • Alfresco 6 on Docker Compose but Database as local software

One of the most repeated mantras by experts in Docker is that databases perform better when installed on a server than when running inside a Docker container. So our last scenario would help us to test this hypothesis.

Once the results were analysed, we discovered that Docker Compose performance was the same (or even better) than classic installation using components. And we also discovered that using a local software for the database had few impact in performance. So, we validated our initial idea to use Alfresco 6 in Docker Compose with all the services as containers.


At this point, upgrading was easy, so we had tested every element before.

Without stopping Alfresco 5 service, we started a copy of the contents.

$ rsync -avzh -e "ssh -p 22" root@alfresco5:/opt/alfresco/alf_data/content* /opt/alfresco/data/alf-repo-data/

Once the synchronisation was full, we stopped Alfresco 5 service and we performed a database dump.

$ sudo service alfresco stop
$ sudo su - postgres
$ cd /opt/alfresco/postgresql/bin
$ ./pg_ctl start
$ ./pg_dump alfresco > /tmp/exportFile-20180801.dmp
$ ./pg_ctl stop
$ exit

We copied the file to the new server and we restored the database in Alfresco 6.

$ docker-compose up postgres

$ cat exportFile-20180801.dmp | docker exec -i docker_postgres_1 psql -U alfresco -d alfresco

After that, a new synchronisation to gather last changes.

$ rsync -avzh -e "ssh -p 22" root@alfresco5:/opt/alfresco/alf_data/content* /opt/alfresco/data/alf-repo-data/

And we decided to remove SOLR indexes and allow the server to re-index again all the content before start definitively our brand new Alfresco 6.

$ rm -rf /opt/alfresco/data/solr-data

$ docker-compose up -d

Finally, we created a GIT repository to manage all the Docker configuration.

Upgrading to Alfresco 6 is more or less the same as previous releases, but the new infrastructure based in Docker allows us to improve the performance and the elasticity of the service.

Unidad de negocio, keensoft

4 Comments to “ Upgrading from Alfresco 5 to Alfresco 6 (our way)”

  1. Stephane Vast says :

    hi Angel,
    thank you for the feedback, awesome migration! Looks like you did not hit any problem, great news for the community 🙂

    One question though: the only HTTPS service is adf resource, right ? Did not want to use dockerized NginX or so?

    thank you again,

  2. Angel Borroy says :

    Hi, Stephane.

    Thanks for reading.

    We have an Apache HTTPd in front of many of our services, so we are configuring HTTPs in that layer. Anyway, you can also use ACA / ADF approach and configure an NginX proxy.

  3. Angel Borroy says :


    NGINX configuration available at https://github.com/keensoft/docker-alfresco

  4. Yohan Axel Moreno Sanchez says :

    Hola Angel,

    Increible tu forma de presentar tu solución, se ve muy facil, yo probé la versión dockerizada de Alfresco 6, pero estaba bloqueandose muy seguido, cuando cargaba archivos, de un momento para otro aparecía una alarma con un mensaje similar a “No se puede mostrar el contenido”, y tenia que reiniciar el servidor de apache constantemente. intenté la solución que necesitaba con Alfresco 5.2 y me ha funcionado de una manera más estable. tu has experimentado un problema similar con tu version dockerizada? habia alguna razón de peso para cambiar a 6.0?