Alfresco Share 5 running on a Raspberry Pi

Showing results for 
Search instead for 
Did you mean: 

Alfresco Share 5 running on a Raspberry Pi

Established Member
1 3 4,136


As a fun side project I had a go at getting part of the Alfresco 5 platform - Alfresco Share 5 in the Apache Tomcat based web-tier - running on Raspberry Pi.

I'm using a Raspberry Pi Model B which has a huge 512MB RAM and crazy fast 700Mhz single-core ARM CPU!! Wow. OK. If you hadn't already guessed, that is not huge nor it is at all fast - in fact it is a lot slower than my HTC One Android phone CPU (quad-core 1.7Ghz ARM CPU with 2GB RAM). To give you comparison - the low-end Intel Atom processor is approx 3-4x faster than this ARM CPU - so it's pretty amazing that it's possible at all.


The Raspberry Pi is running the standard 32bit Debian Wheezy Linux distribution that is compiled specially for the Raspberry Pi but is not anything special from a Linux perspective. I had previously installed Oracle JDK 7 so that will save some time - but here's how:

sudo apt-get update && sudo apt-get install oracle-java7-jdk

I expect you can also use JDK 8 but I have not tried it!

OK, next I gzipped up my local copy of Apache Tomcat which contains my share.war webapp. IMPORTANT: The Tomcat instance does not contain alfresco.war or solr.war webapps! To be clear, we are only trying the Share web-app on the Pi because the minimum CPU/RAM requirements of the complete Alfresco repository are too much for this tiny $30 computer. Most Alfresco developers run separate Share/Alfresco Tomcat instances as this makes it much easier when doing Share development so that the Alfresco+Solr server instance can be left running - it only takes a few seconds to restart a Tomcat instance containing just Share.

Use 'scp' or FTP to get your tomcat zip bundle onto the Pi and unpack it somewhere.


1. Edit the tomcat/bin/ file to apply JVM memory settings. Add this line near the top of the file:

JAVA_OPTS='$JAVA_OPTS -Xms128m -Xmx200m'

I set mine to 200MB which is more than enough for Share. Also ensure there are no other JVM options applied that may not be suitable - e.g. for my instance I removed settings for the CMS GC and a few server related flags that were not appropriate for a tiny device with a single-core CPU.

2. Edit tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml to point to your remote Alfresco 5.0 repository instance. This is a common Remote config change for an Alfresco Share installation. I won't go into the details here as I have posted about it before on few occasions - but here is what mine looks like:


<config evaluator='string-compare' condition='Remote'>




<name>Alfresco - unauthenticated access</name>

<description>Access to Alfresco Repository WebScripts that do not require authentication</description>







<name>Alfresco - user access</name>

<description>Access to Alfresco Repository WebScripts that require user authentication</description>







<name>Alfresco Feed</name>

<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>









The important part is the <endpoint-url> address. You may need to use a direct IP address in your config depending on your Alfresco repository machine OS and network.

3. In tomcat/bin folder execute ./ run as usual to start Tomcat. Because I was using ssh to remote the Pi, I actually used nohup ./ run & so I could then tail -f the log and leave it running in the background when logged out - but that's up to you.

The server takes a little under 3 minutes to start (rather than around 20 seconds on a modern laptop!)

INFO: Deploying web application directory /home/pi/dev/tomcat/webapps/share

INFO: Starting Servlet Engine: Apache Tomcat/7.0.40

INFO: Server startup in 156202 ms

Point a web browser at the Raspberry Pi Share start page URL e.g. http://raspberrypi:8081/share - again this will vary with your set-up as you might need a direct IP and your port may be different depending on your original Share Tomcat config.

The server takes another couple of minutes to warm up (Share is in production mode; warms caches, compiles JS/FTL/Less, retrieves License/DD from Alfresco etc. - lots to do for a single core 700Mhz CPU!)

2014-10-14 21:04:51,434  INFO  [] [http-bio-8081-exec-4] Successfully retrieved license information from Alfresco.

Login to Share!

The server takes another 30 seconds to login the first time - then each new page takes ~10sec to warm up - but then response time is very reasonable! Pages appears in <2 seconds.

Memory usage of Share heap is ~120MB during page generation, ~75MB at idle.

A fun Raspberry Pi experiment and an example of how lean the Alfresco Share 5.0 web-tier is!