Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

ddev-alfresco

tests License

Minimal Alfresco Community Edition integration for DDEV projects.

What is this?

This add-on provides a lightweight Alfresco Community Edition setup optimized for local development of applications that integrate with Alfresco’s REST API, CMIS API, or WebDAV interface. Perfect for developing custom connectors, file management integrations, or document-centric applications without the overhead of a full Alfresco deployment.

The setup runs Alfresco Content Repository with PostgreSQL, with search indexing and transform services disabled for minimal resource usage. This gives you a fast, API-ready Alfresco instance that starts in minutes and uses 4-6GB RAM instead of 16GB+.

Installation

ddev add-on get ddev/ddev-alfresco
ddev restart
ddev alfresco-wait

The first startup takes 3-5 minutes while Alfresco initializes.

Access

Web Interface:

ddev launch :8081/alfresco

Note: This addon provides a minimal API-focused Alfresco setup. Alfresco Share (the traditional web UI) is not included to keep resource usage low. For DMS integrations via REST API, CMIS, or WebDAV, Share is not needed. If you require the full Alfresco web interface, you would need to add a separate Share container to the docker-compose configuration.

API Endpoints (external):

Authentication for REST API:

Option 1 - Basic Authentication (easiest):

# Example: Get node information
curl -u admin:admin https://<project>.ddev.site:8081/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-

Option 2 - Ticket-based Authentication:

# 1. Get authentication ticket
TICKET=$(curl -X POST https://<project>.ddev.site:8081/alfresco/api/-default-/public/authentication/versions/1/tickets \
  -H "Content-Type: application/json" \
  -d '{"userId":"admin","password":"admin"}' | jq -r .entry.id)

# 2. Use ticket in subsequent requests
curl https://<project>.ddev.site:8081/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root- \
  -H "Authorization: Basic $(echo -n $TICKET | base64)"

API Endpoints (internal, from web container):

Default credentials:

Default groups:

Commands

ddev alfresco-wait              # Wait for Alfresco to be ready
ddev alfresco-status            # Check service health
ddev alfresco [command]         # Execute command in Alfresco container
ddev logs -s alfresco           # View Alfresco logs (standard DDEV command)
ddev logs -s alfresco-postgres  # View PostgreSQL logs (standard DDEV command)

REST API Capabilities for CMS/DMS Integration

The Alfresco REST API provides complete functionality for DMS integrations:

Core Operations Supported

Key REST Endpoints

All operations return standard HTTP status codes and JSON responses, making integration straightforward for any programming language or framework.

Integration Examples

PHP with Basic Authentication

$config = [
    'alfresco_endpoint' => 'http://alfresco:8080/alfresco/api/-default-/public/alfresco/versions/1',
    'cmis_endpoint' => 'http://alfresco:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser',
    'username' => 'admin',
    'password' => 'admin',
];

// Example: List root folder contents
$ch = curl_init($config['alfresco_endpoint'] . '/nodes/-root-/children');
curl_setopt($ch, CURLOPT_USERPWD, $config['username'] . ':' . $config['password']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);

JavaScript/Node.js with Basic Authentication

const config = {
    endpoint: 'http://alfresco:8080/alfresco/api/-default-/public/alfresco/versions/1',
    auth: Buffer.from('admin:admin').toString('base64')
};

// Example: Get node information
fetch(`${config.endpoint}/nodes/-root-`, {
    headers: {
        'Authorization': `Basic ${config.auth}`
    }
})
.then(response => response.json())
.then(data => console.log(data));

Configuration

Using Alternate Versions of Alfresco

If you need to use a different version of Alfresco or PostgreSQL, you can set environment variables in .ddev/.env.alfresco:

# Set the desired versions
ddev dotenv set .ddev/.env.alfresco --alfresco-image="alfresco/alfresco-content-repository-community:23.2.0"
ddev dotenv set .ddev/.env.alfresco --postgres-image="postgres:15"

# Remove old volumes and restart
ddev stop
docker volume rm ddev-${DDEV_SITENAME}-alfresco-data ddev-${DDEV_SITENAME}-alfresco-postgres-data
ddev start

The addon uses these default versions:

Note: When changing versions, you may need to remove the old volumes to avoid compatibility issues. Make sure to commit the .ddev/.env.alfresco file to version control to share the configuration with your team.

Automatic Initialization

To ensure Alfresco is ready after every ddev start or ddev restart, add this hook to your .ddev/config.yaml:

hooks:
  post-start:
    - exec-host: ddev alfresco-wait

This automatically waits for Alfresco to fully initialize before returning control, so your application can immediately connect to the API.

System Requirements

Services

Search indexing (Solr), document transformation, and message queue services are disabled for minimal resource usage. These can be added later if needed.

Removal

ddev add-on remove ddev-alfresco

This removes the add-on and deletes all Alfresco data.

License

Apache License 2.0 - Copyright © 2025 Wolfgang Klinger [email protected]