Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    Getting StartedAdministrator documentationFunctional characteristics
      Technology descriptionarrow
    • Architecture OverviewComponent Description
        Deployment schemesarrow
      • Basic schemeFail-safe schemeTypical Placement in Infrastructure
    System requirements
      Admin Panelarrow
      • Account areaarrow
        • Accountsarrow
        • Account UsersAccount Virtual SendersAccount Database Indexes
        TariffsExternal data configurationLDAPTasksSchedule JobsGlobal Stop ListsWebversion Store Policies
        Settingsarrow
      • Databases
          Accessarrow
        • AdminsAPI tokens
        Notifiers
          MTAarrow
        • Default rulesRetry rulesLock rulesBounce patternsStrategiesKeysISPsPools
      Nodes
        Sendersarrow
      • EmailSMSEvent generatorIntegration with SendsayENS: настройка сендера
        Reportsarrow
      • Audit JournalData Usage
        Toolsarrow
      • ARF decoderURL decoderSMID decoderLicense
      Platform installationarrow
    • Automatic installationManual installationRunning the platform in a Docker container
      Platform configurationarrow
    • Configuration fileDomain settingsLDAP access configurationSending Email via SMTP relayPixel and push domain configurationCluster and Replication SetupSystem notifications configurationProcesses UNIX sockets configurationHTTPS ConfigurationMigrating from MongoDB Community Edition to Percona Server for MongoDBAdding sender IP addressesDeduplication request settingsPostgreSQL database for account dataProxy server settingsKeycloak Integration with AltcraftGetting HTTP service statusesConfiguration MongoDB logs rotation
        Configuration of system constants and directoriesarrow
      • Filtering bot actionsDirectory of gender markers
      Platform maintenancearrow
    • Personnel requirementsPlatform maintenance processesPlatform updatingPlatform service monitoringBackup and recoveryTransferring the platform to a new serverCreating, deleting, and populating tables for statistics in ClickHouseUsage of the aktool utilityUsers and directories engaged by the platform
      Custom channels guidearrow
    • OverviewCreating and configuring a channelEntity field configurationTemplate languageEntities
        Pipesarrow
      • Pipe: Basic ConceptsResultErrorsLogPackUnpackHTTP RequestStore SetStore GetSelectorSQLEventerScheduler
        Pipelinesarrow
      • Pipeline: Basic ConceptsMessageScheduleListenerModerateStop
      Extraarrow
    • System page customizationSend Message IDИнструкция по миграции истории в ClickHouseInstructions for migrating history to ClickHouseUtility for importing push subscriptions to Firebase projectUtility for importing push subscriptions to Firebase project
    Processing HTTP/HTTPS traffic
      Administrator APIarrow
      • Accounts admin apiarrow
        • Restricted accessarrow
        • Account Activation and DeactivationAccount Freeze and Unfreeze
        Get accounts listAdd a new accountDelete the account
        Account usersarrow
      • Update an Existing AccountAdd a new accountDelete a userGet a list of usersSending a Welcome Email
        Nodesarrow
      • Synchronize node MTA configurationGet nodes listGet node MTA statusActivate node MTADeactivate node MTA
        Senders admin apiarrow
      • Create or update AKMTA senderGet AKMTA sender informationAssign account to senderGet senders listDelete senderRestore sender
          Sender queuearrow
        • Get sender queue informationHold sender queueRelease sender queueClear sender queue
        Virtual sendersarrow
      • Get virtual senders listGet virtual sender informationCreate virtual senderUpdate virtual senderClone virtual senderDelete virtual sender
    Documentation Archive
  • Platform installation
  • Running the platform in a Docker container

Running the platform in a Docker container

The Altcraft image is a monolithic image that runs all the necessary processes in one container.

note

Databases (MongoDB, SSDB, ClickHouse) and RabbitMQ must be installed separately on the host or in Docker containers.

Installation​

Minimum requirements​

The table contains the minimum software versions that must be installed on the target host to run the platform.

SoftwareVersionDescription
Docker Engine>= 19.03.0See the Docker Engine documentation for installation instructions
Docker Compose>= 1.25.0See the Docker Compose documentation for installation instructions

Volume locations​

The Altcraft container uses volumes to store persistent data. You can customize their location according to your requirements.

Location in Docker containerDescription
/altcraft/account_filesMessage previews and task files (export, import) inside accounts.
By default, an anonymous volume will be used.
/altcraft/dataTemporary files, storage and cache of various jobs
/altcraft/logsLogs
Note: the output of logs to the STDOUT of the container is configured by the LOG_STDOUT environment variable. Set it to true if you need it.

Minimal main.json configuration​

Before starting the platform, you need to configure the minimum configuration $ALTCRAFT_HOME/config/main.json. Configuration example:

caution

Please generate a stronger password. Do not use abcdefghijklmnopqrstuvwxyzABCDEF from the example.

{
"BASEDIR": "/altcraft",
"DEFAULT_LOG_LEVEL": "WARN",

"WEBAPI_PRIVATE_KEY": "abcdefghijklmnopqrstuvwxyzABCDEF",
"WEBCONTROL_HOSTNAME": "altcraft.example.com",
"WEBCONTROL_PUBLIC_IP": "0.0.0.0",
"WEBCONTROL_PUBLIC_PORT": 8080,

"TRACKING_CRYPT_KEY": "abcdefghijklmnopqrstuvwxyzABCDEF",
"TRACKING_PREFIX": "click",
"TRACKING_PUBLIC_IP": "0.0.0.0",
"TRACKING_PUBLIC_PORT": 8085,

"COOKIESAVER_PUBLIC_HOSTNAME": "pixel.altcraft.example.com",
"COOKIESAVER_PUBLIC_IP": "0.0.0.0",
"COOKIESAVER_PUBLIC_PORT": 8090,
"COOKIESAVER_SSL_ON": false,

"CONTROLDB_IP": "192.168.20.1",
"CONTROLDB_NAME": "control",
"CONTROLDB_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"CONTROLDB_PORT": 27017,
"CONTROLDB_USER": "altcraft",

"CLICKHOUSE_SYSTEM": {
"HOST": "192.168.20.1",
"PORT": 9000,
"USER": "altcraft",
"MAX_CONNECTION": 100,
"CONN_TIMEOUT": 15,
"PASSWORD": "abcdefghijklmnopqrstuvwxyzABCDEF",
"IS_DEBUG": false
},

"RABBITMQ_HOST": "192.168.20.1",
"RABBITMQ_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"RABBITMQ_USER": "altcraft",

"SSDB_HBSUPP_IP": "192.168.20.1",
"SSDB_HBSUPP_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"SSDB_HBSUPP_PORT": 4420,

"SSDB_NOTIFY_IP": "192.168.20.1",
"SSDB_NOTIFY_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"SSDB_NOTIFY_PORT": 4430,

"PRIVATE_KEY": "abcdefghijklmnopqrstuvwxyzABCDEF",
"PRODUCT_NAME": "Altcraft Marketing Platform",

"NOREPLY_MAILER": {
"server": "mail.example.com",
"port": 587,
"email": "altcraft@example.com",
"login": "altcraft@example.com",
"pass": "abcdefghijklmnopqrstuvwxyzABCDEF"
}
}

Running the platform using Docker Engine​

After preparing the directories according to your requirements, you can run the image:

sudo docker run --detach \
--name altcraft \
--publish <WEBCONTROL_PUBLIC_PORT>:<WEBCONTROL_PUBLIC_PORT> \
--publish <TRACKING_PUBLIC_PORT>:<TRACKING_PUBLIC_PORT> \
--publish <COOKIESAVER_PUBLIC_PORT>:<COOKIESAVER_PUBLIC_PORT> \
--volume $ALTCRAFT_HOME/config/main.json:/altcraft/config/main.json \
--restart always \
altcraft:<TAG>

If you are using SELinux, run this instead:

sudo docker run --detach \
--name altcraft \
--publish <WEBCONTROL_PUBLIC_PORT>:<WEBCONTROL_PUBLIC_PORT> \
--publish <TRACKING_PUBLIC_PORT>:<TRACKING_PUBLIC_PORT> \
--publish <COOKIESAVER_PUBLIC_PORT>:<COOKIESAVER_PUBLIC_PORT> \
--volume $ALTCRAFT_HOME/config/main.json:/altcraft/config/main.json:Z \
--restart always \
altcraft:<TAG>

This will ensure that the Docker process has sufficient rights to create files on the mounted volumes.

Optional: If you want to collect logs from the container's STDOUT, set the LOG_STDOUT environment variable to true.

sudo docker run --detach \
--name altcraft \
--publish <WEBCONTROL_PUBLIC_PORT>:<WEBCONTROL_PUBLIC_PORT> \
--publish <TRACKING_PUBLIC_PORT>:<TRACKING_PUBLIC_PORT> \
--publish <COOKIESAVER_PUBLIC_PORT>:<COOKIESAVER_PUBLIC_PORT> \
--volume $ALTCRAFT_HOME/config/main.json:/altcraft/config/main.json:Z \
--env LOG_STDOUT=true \
--restart always \
altcraft:<TAG>

Running the platform using Docker Compose​

  1. Install Docker Compose following the instructions from the minimum requirements section.

  2. Prepare docker-compose.yml file, example:

version: '3.4'

services:
altcraft:
image: altcraft:<TAG>
container_name: altcraft
restart: always
environment:
- GIN_MODE=release
- LOG_STDOUT=true
volumes:
- /opt/altcraft/account_files:/altcraft/account_files:Z
- /opt/altcraft/data:/altcraft/data:Z
- /opt/altcraft/logs:/altcraft/logs:Z
- /opt/altcraft/config/main.json:/altcraft/config/main.json:Z
networks:
altcraft:
aliases:
- altcraft
ulimits:
nofile:
soft: 256000
hard: 256000
expose:
- <WEBCONTROL_PUBLIC_PORT>
- <TRACKING_PUBLIC_PORT>
- <COOKIESAVER_PUBLIC_PORT>
ports:
- <WEBCONTROL_PUBLIC_PORT>:<WEBCONTROL_PUBLIC_PORT>
- <TRACKING_PUBLIC_PORT>:<TRACKING_PUBLIC_PORT>
- <COOKIESAVER_PUBLIC_PORT>:<COOKIESAVER_PUBLIC_PORT>

networks:
altcraft:
driver: bridge
  1. Run Altcraft Platform:
sudo docker-compose up --detach

Changing main.json configuration​

After making the necessary changes, you must restart the container to reconfigure Altcraft Platform:

sudo docker restart altcraft

Update​

Update using Docker Engine​

  1. Download the new version of the image:
sudo docker load --input altcraft*.tar.gz
  1. Remove the existing container:
sudo docker rm altcraft
  1. Create the container again with the parameters specified earlier:
sudo docker run --detach \
--name altcraft \
--publish <WEBCONTROL_PUBLIC_PORT>:<WEBCONTROL_PUBLIC_PORT> \
--publish <TRACKING_PUBLIC_PORT>:<TRACKING_PUBLIC_PORT> \
--publish <COOKIESAVER_PUBLIC_PORT>:<COOKIESAVER_PUBLIC_PORT> \
--volume $ALTCRAFT_HOME/config/main.json:/altcraft/config/main.json:Z \
--restart always \
altcraft:<NEW_TAG>

Update using Docker Compose​

  1. Download the new version of the image:
sudo docker load --input altcraft*.tar.gz
  1. Remove the previous container:
sudo docker-compose down
  1. In the docker-compose.yml file set the new version of the image:
version: '3.4'

services: altcraft:
image: altcraft:<NEW_TAG>
container_name: altcraft
...

  1. Restart Altcraft Platform:
sudo docker-compose up --detach
Last updated on Jun 26, 2020
Previous
Manual installation
Next
Platform configuration
  • Installation
    • Minimum requirements
    • Volume locations
    • Minimal main.json configuration
    • Running the platform using Docker Engine
    • Running the platform using Docker Compose
    • Changing main.json configuration
  • Update
    • Update using Docker Engine
    • Update using Docker Compose
© 2015 - 2026 Altcraft, LLC. All rights reserved.