Skip to content

Docker Installation

Emakin Docker images are published on Docker Hub at 6kare.

When the container starts for the first time, the documented default domain and admin user are created automatically:

Set the following environment variables on the emakin service to choose a different initial administrator:

Variable Default Description
AK_DEFAULT_ADMIN [email protected] User ID and email address of the default domain administrator
AK_DEFAULT_PASSWORD admin Password of the default domain administrator

These variables are read only when the default domain is created, that is, when no domain exists yet. Changing them later does not change an existing administrator account.

Default access points:

  • Application Access: http://localhost
  • Host Administration: https://localhost:7180

Quick Installation

On a clean x86-64 or ARM64 Linux host, the following command installs Docker Engine when it is missing, downloads the Compose file below to /opt/emakin, replaces the sample database password with a generated one, and starts all services:

1
curl -fsSL https://doc.emakin.com/redir/install | sudo bash

The script sets the initial administrator through AK_DEFAULT_ADMIN and AK_DEFAULT_PASSWORD. When they are not provided, it uses [email protected], generates a password, and prints it at the end. To choose them yourself:

1
curl -fsSL https://doc.emakin.com/redir/install | sudo AK_DEFAULT_ADMIN='[email protected]' AK_DEFAULT_PASSWORD='change-me' bash

The values are stored in /opt/emakin/.env, which is readable only by root. The command requires root privileges, curl, and free ports 80, 443, 7180, 25, 587, and 465. Running it again keeps the existing Compose file and .env file and starts the stopped services. Review the script before running it on production hosts.

Uninstallation

To stop Emakin and remove its containers and network, run:

1
curl -fsSL https://doc.emakin.com/redir/uninstall | sudo bash

This keeps the data volumes, images, and /opt/emakin, so running the installation command again starts Emakin with the existing data.

To also delete all data volumes, images, and /opt/emakin, set EMAKIN_PURGE=1. The script asks you to type DELETE before it removes anything:

1
curl -fsSL https://doc.emakin.com/redir/uninstall | sudo EMAKIN_PURGE=1 bash

Warning

Deleting the data volumes permanently removes all Emakin domains, documents, and the database. Back up the data before you purge an installation that contains real data.

The uninstall script does not remove Docker Engine. Review the script before running it.

Docker Compose Configuration

Create a docker-compose.yml file similar to the following:

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
services:
    emakin:
        image: 6kare/emakin:8.8
        restart: unless-stopped
        ports:
            - "80:80"
            - "443:443"
            - "7180:7180"
            - "25:25"
            - "587:587"
            - "465:465"
        sysctls:
            - "net.ipv4.ip_unprivileged_port_start=0"
        depends_on:
            dragonfly:
                condition: service_started
            postgres:
                condition: service_healthy
            basex:
                condition: service_started
            tika:
                condition: service_started
        volumes:
            - "emakin-data:/app/Configuration/Data"
        environment:
            - AK_DbProvider=PostgreSql
            - AK_DbConnStr=Host=postgres;Database=ALTIKARE;Username=ALTIKARE;Password=ALTIKARE;
            - AK_RedisConnStr=dragonfly,allowAdmin=true
            - AK_BasexConnStr=http://admin:admin@basex:1984/
            - AK_TikaConnStr=http://tika:9998/
            - AK_WopiConnStr=http://onlyoffice:81/hosting/discovery
            - AK_AntivirusServerUrl=tcp://clamav:3310
            - AK_DEFAULT_ADMIN=${AK_DEFAULT_ADMIN:[email protected]}
            - AK_DEFAULT_PASSWORD=${AK_DEFAULT_PASSWORD:-admin}
    postgres:
        image: "postgres:18"
        restart: unless-stopped
        healthcheck:
            test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB -h localhost"]
            interval: 5s
            timeout: 5s
            retries: 20
            start_period: 10s
        volumes:
            - "postgres-data:/var/lib/postgresql"
        environment:
            - POSTGRES_USER=ALTIKARE
            - POSTGRES_PASSWORD=ALTIKARE
            - POSTGRES_DB=ALTIKARE
    dragonfly:
        image: docker.dragonflydb.io/dragonflydb/dragonfly
        restart: unless-stopped
        expose:
            - "6379"
        ulimits:
            memlock: -1
    basex:
        image: "6kare/basex"
        restart: unless-stopped
        expose:
            - "1984"
        volumes:
            - "basex-data:/srv/basex/data"
    tika:
        image: "6kare/tika"
        restart: unless-stopped
        expose:
            - 9998
    onlyoffice:
        image: onlyoffice/documentserver:8.0
        restart: unless-stopped
        environment:
            USE_UNAUTHORIZED_STORAGE: "true"
            WOPI_ENABLED: "true"
        ports:
            - "81:80"
            - "8443:443"
    clamav:
        image: "clamav/clamav-debian:1.5"
        restart: unless-stopped
        expose:
            - 3310
        volumes:
            - "clamav-data:/var/lib/clamav"
    market:
        profiles: ["market"]
        image: 6kare/emakin:8.8
        command: ["market"]
        restart: unless-stopped
        ports:
            - "5100:5100"
        depends_on:
            dragonfly:
                condition: service_started
            postgres:
                condition: service_healthy
        volumes:
            - "emakin-data:/app/Configuration/Data"
        environment:
            - AK_Market__Enabled=true
            - AK_DbProvider=PostgreSql
            - AK_DbConnStr=Host=postgres;Database=ALTIKARE;Username=ALTIKARE;Password=ALTIKARE;
            - AK_RedisConnStr=dragonfly,allowAdmin=true
    push:
        profiles: ["push"]
        image: 6kare/emakin:8.8
        command: ["push"]
        restart: unless-stopped
        ports:
            - "5111:5111"
        depends_on:
            dragonfly:
                condition: service_started
            postgres:
                condition: service_healthy
        volumes:
            - "emakin-data:/app/Configuration/Data"
            - "./push/product.pfx:/run/emakin/push/product.pfx:ro"
        environment:
            - AK_Push__Enabled=true
            - AK_Push__ProductCertificate__Path=/run/emakin/push/product.pfx
            - AK_Push__ProductCertificate__Password=${PUSH_PRODUCT_CERTIFICATE_PASSWORD:-}
            - AK_DbProvider=PostgreSql
            - AK_DbConnStr=Host=postgres;Database=ALTIKARE;Username=ALTIKARE;Password=ALTIKARE;
            - AK_RedisConnStr=dragonfly,allowAdmin=true

volumes:
    emakin-data:
    postgres-data:
    basex-data:
    clamav-data:

The Compose example keeps the default data path and does not need AK_CONFIGURATION_DATA_PATH. Define this variable only when the Emakin node data must be stored outside /app/Configuration/Data. In that case, change the existing emakin service environment and volume target together:

1
2
3
4
environment:
    - AK_CONFIGURATION_DATA_PATH=/srv/emakin/data
volumes:
    - "emakin-data:/srv/emakin/data"

The example above replaces the default emakin-data:/app/Configuration/Data mapping; do not leave both mappings for the same data volume. The target directory must be writable by the container user. When moving an existing deployment, copy or restore the existing data, including protected settings and the FullText catalog, before switching to the new volume target. Compose does not migrate the old data automatically.

Replace placeholders such as credentials and hostnames with your actual environment values, then start the stack with docker compose up.

Optional Push and Market Services

The Push and Market services are disabled by default. The supplied Compose file starts them only when their profiles are selected. Each profile runs the corresponding isolated Agent mode instead of the complete web stack.

Start Market on HTTP port 5100:

1
docker compose --profile market up -d market

Start Push on HTTPS port 5111:

1
2
PUSH_PRODUCT_CERTIFICATE_PASSWORD='your-pfx-password' \
docker compose --profile push up -d push

Before starting the Push profile, place the signing PFX at ./push/product.pfx. Compose mounts this file read-only at /run/emakin/push/product.pfx and passes its password through PUSH_PRODUCT_CERTIFICATE_PASSWORD. Keep the PFX and password outside source control. The Push profile listens on HTTP port 5110 and HTTPS port 5111; only 5111 is published by the supplied Compose configuration.

The Agent image exposes these runtime ports for custom deployments: Web 80/443, Market 5100, Push 5110/5111, FullText 5120, Health 5121, and Host Administration 7180.

Environment Variables

The documented database environment variables are:

1
2
AK_DbProvider=PostgreSQL  # Or "Oracle", "SqlServer"
AK_DbConnStr=Host=databaseserver;Database=database;Username=user;Password=pass;

Packaging Images

Use the following script to package Docker images for deployment to a closed network. After execution, emakin-deploy.tar.gz will be created in the current directory.

1
2
3
4
5
6
7
8
9
docker compose pull

echo "Packaging..."

docker compose config --images | sort -u | xargs docker save > emakin-deploy.tar && \
tar czf emakin-deploy.tar.gz docker-compose.yml emakin-deploy.tar && \
rm -f emakin-deploy.tar

echo "Packaging completed."

Unpacking Images

1
2
3
4
5
6
7
echo "Loading Docker images..."

tar xzf emakin-deploy.tar.gz && \
docker load -i emakin-deploy.tar && \
rm -f emakin-deploy.tar

echo "Unpack completed."

Once unpacking is completed, start services with Docker Compose:

1
docker compose up -d --pull never

WSL Support

In some environments, the PostgreSQL image may not work correctly with WSL because of file system permission issues. In these cases, use a Docker volume instead of mounting a Windows file path.

1
2
3
4
5
6
7
....
postgres:
    volumes:
        - postgres-data:/var/lib/postgresql
...
volumes:
  postgres-data:

Load Balancer Example with HAProxy

The following example shows how an HAProxy service can be added for load balancing across multiple Emakin web nodes:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#...previous services definition...
haproxy:
    image: haproxy:latest
    volumes:
        - "./haproxy.cfg:/usr/local/etc/haproxy:ro"
    restart: always
    ports:
        - "80:80"
        - "443:443"
        - "7180:7180"
        - "25:25"
        - "587:587"
        - "465:465"

#...rest of the configuration...

You also need a separate haproxy.cfg file. The documented sample is:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
frontend http
    bind *:80
    bind *:443
    bind *:5000
    mode http
    timeout client 1000s
    use_backend all

backend all
    mode http
    timeout server 1000s
    timeout connect 1000s
    server s1 web1:80
    server s2 web2:80
    server s3 web3:80

Adapt the sample to your actual hostnames, ports, and network layout.