Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v73
  • v74
  • v73
  • v72
Login
  • Getting Started
  • Administrator documentation
  • Functional characteristics
  • Technology description
  • System requirements
  • Admin Panel
  • Platform installation
    • Automatic installation
    • Manual installation
    • Running the platform in a Docker container
  • Platform configuration
  • Platform maintenance
  • Custom channels guide
  • Extra
  • Processing HTTP/HTTPS traffic
  • Administrator API
This is documentation for Altcraft Platform v73. This documentation is no longer maintained.
The information for up-to-date platform version at this page is available (v74).
  • Platform installation
  • Manual installation
Documentation for version v73

Manual installation

Preparation​

Introduction​

Before starting the installation, it is strongly recommended to familiarize yourself with the architecture, technical requirements, and operation schemes.

tip

All further actions require root user privileges.

info

Instructions for configuring replications can be found on the Cluster Configuration, Replication page.

warning

For passwords and secret combinations, a set of characters is used - abcdefghijklmnopqrstuvwxyzABCDEF. Be sure to generate a more complex password consisting of at least 32 characters.

Archive Loading​

All clients are provided with a compressed archive with the extension .tar.gz. Unpack the archive and move its contents to the /opt/akd directory:

{
tar xzf <archive_name>.tar.gz
mv ak /opt/akd
}

Checking the Server Time​

Time synchronization between servers is critical: discrepancies can lead to malfunction and incorrect statistics. Configure an NTP server and verify synchronization:

timedatectl status

Setting System Limits​

Add the following limits in the /etc/security/limits.conf file:

*                -       nofile          1048576
root - nofile 1048576
root - memlock unlimited

Then reconnect to the server and verify that the limits have been updated:

ulimit -n

Installing Dependencies​

Installate the followibg dependencies:

{
apt update
apt install --no-install-recommends xvfb cutycapt unzip gcc g++ libsnappy-dev make autoconf libpcre3-dev libgomp1
}

Installation of MongoDB​

note

MongoDB database is used for storing system settings and user data. Below is the installation guide from the archive.

Additional info:

  • Install MongoDB Community Edition on Ubuntu
  • Self-Managed Configuration File Options
  • Run-time Database Configuration for Self-Managed Deployments

Go to the download page. Select the 8.0 version, your OS version and the .tgz package. Copy the download link and execute:

wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2404-8.0.10.tgz

Unpack the archive to the /usr/local and create a symbolic link:

{
tar xzf mongodb-linux-x86_64-ubuntu2404-8.0.10.tgz -C /usr/local
ln -s /usr/local/mongodb-linux-x86_64-ubuntu2404-8.0.10 /usr/local/mongodb
}

Install the dependencies:

{
apt update
apt install -y gnupg curl
}

Create a user, a group and working directories:

groupadd mongodb
useradd -r -g mongodb -s /bin/false mongodb
mkdir -p /var/{lib,log}/mongodb
chown -R mongodb:mongodb /var/{lib,log}/mongodb

Create the configuration file /etc/mongod.conf:

# mongod.conf

# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/

storage:
dbPath: /var/lib/mongodb
wiredTiger:
engineConfig:
directoryForIndexes: true

systemLog:
destination: file
logAppend: true
logRotate: reopen
path: /var/log/mongodb/mongod.log

net:
port: 27017
bindIp: 127.0.0.1
tip

By default, authentication is disabled in MongoDB. To improve security, you can enable authentication using the SCRAM mechanism (password authentication), which is supported by the Altcraft platform (see details).

tip

You can enable TLS support for connecting to MongoDB. To do this, add the following parameters to the /etc/mongod.conf file:

net:
tls:
mode: requireTLS
certificateKeyFile: <path to the file containing the server's private key and certificate (PEM)>
CAFile: <path to the certificate authority (CA) certificate>

After restarting the service, MongoDB will accept connections only from clients using TLS.

Create a systemd service at the path /etc/systemd/system/mongod.service:

[Unit]
Description=MongoDB Database Server
Documentation=https://docs.mongodb.org/manual
After=network.target

[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/local/mongodb/bin/mongod --config /etc/mongod.conf
PIDFile=/run/mongod.pid
Restart=always
LimitFSIZE=infinity
LimitCPU=infinity
LimitAS=infinity
LimitNOFILE=256000
LimitNPROC=256000
LimitMEMLOCK=infinity
TasksMax=infinity
TasksAccounting=false

[Install]
WantedBy=multi-user.target
tip

You can enable TLS support for working with MongoDB. To enable it, specify the following code in /etc/mongod.conf:

net:
tls:
mode: requireTLS
certificateKeyFile: <path to CA certificate in PEM format>
CAFile: <path to the key with certificate>

After restarting the mongod.service service, the database will work only with clients using TLS options.

Add the service to autostart, start it and check its status:

{
systemctl enable mongod.service
systemctl start mongod.service
systemctl status mongod.service
}

Download and install the MongoDB Shell, connect to the database, and create a user in the admin database:

use admin;
db.createUser({
"user": "altcraft",
"pwd": "abcdefghijklmnopqrstuvwxyzABCDEF",
"roles": [{
"role": "root",
"db": "admin"
}]
});

Update the connection parameters in the configuration file main.json:

{
"MONGO_AUTH_DB": "admin",
"CONTROLDB_IP": "127.0.0.1",
"CONTROLDB_PORT": 27017,
"CONTROLDB_NAME": "control",
"CONTROLDB_USER": "altcraft",
"CONTROLDB_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"FILEDB_ENABLE": true,
"FILEDB_IP": "127.0.0.1",
"FILEDB_NAME": "filedb",
"FILEDB_USER": "altcraft",
"FILEDB_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"FILEDB_PORT": 27017
}

Installation of ClickHouse​

note

ClickHouse database is used for storing history, statistics, and forming user reports. Below is the installation guide using DEB packages.

Install dependencies and add the official repository:

{
apt update
apt install -y apt-transport-https ca-certificates dirmngr gnupg
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754
echo "deb https://packages.clickhouse.com/deb stable main" | tee /etc/apt/sources.list.d/clickhouse.list
}

Install Clickhouse:

{
apt update
apt install -y clickhouse-server clickhouse-client
}

Add the service to autostart and start it:

```bash
{
systemctl enable clickhouse-server.service
systemctl start clickhouse-server.service
systemctl status clickhouse-server.service
}

Create the user configuration file altcraft at the path /etc/clickhouse-server/users.d/altcraft.xml:

<yandex>
<users>
<altcraft>
<password>abcdefghijklmnopqrstuvwxyzABCDEF</password>
<networks>
<ip>::/0</ip>
</networks>
<profile>default</profile>
<quota>default</quota>
<allow_databases>
<database>altcraft_system</database>
</allow_databases>
</altcraft>
</users>
</yandex>

Update the connection parameters in the configuration file main.json:

{
"CLICKHOUSE_SYSTEM": {
"HOST": "localhost",
"PORT": 9000,
"USER": "altcraft",
"PASSWORD": "abcdefghijklmnopqrstuvwxyzABCDEF",
"DATABASE_NAME": "altcraft_system"
}
}

Installation of SSDB​

note

SSDB databases are used for system notifications and storing hardbounce (non-existent) email addresses.

Install dependencies, clone the Git repository, then build and install:

{
apt update
apt install -y git build-essential cmake autoconf
git clone https://github.com/ideawu/ssdb.git /usr/local/ssdb
cd /usr/local/ssdb
make
}

Create the working directories:

mkdir -p /var/lib/ssdb/{hardbounces,notifications} /var/{log,lib}/ssdb /etc/ssdb

Create the configuration file /etc/ssdb/hardbounces.conf:

tip

Note: The configuration file should use a tab character for indentation instead of spaces.

# hardbounces.conf
# MUST indent by TAB!

work_dir = /var/lib/ssdb/hardbounces
pidfile = /run/ssdb@hardbounces.pid

server:
ip: 127.0.0.1
port: 4420
auth: abcdefghijklmnopqrstuvwxyzABCDEF

leveldb:
cache_size: 500
write_buffer_size: 64
compaction_speed: 1000
compression: yes

logger:
level: error
output: /var/log/ssdb/hardbounces.log
rotate:
size: 1000000000

Create the configuration file /etc/ssdb/notifications.conf:

tip

Note: The configuration file should use a tab character for indentation instead of spaces.

# notifications.conf
# MUST indent by TAB!

work_dir = /var/lib/ssdb/notifications
pidfile = /run/ssdb@notifications.pid

server:
ip: 127.0.0.1
port: 4430
auth: abcdefghijklmnopqrstuvwxyzABCDEF

leveldb:
cache_size: 500
write_buffer_size: 64
compaction_speed: 1000
compression: yes

logger:
level: error
output: /var/log/ssdb/notifications.log
rotate:
size: 1000000000

Create a systemd service at the path /etc/systemd/system/ssdb@.service:

[Unit]
Description=High performance NoSQL database
After=network.target

[Service]
User=root
Group=root
WorkingDirectory=/var/lib/ssdb/%i
ExecStart=/usr/local/ssdb/ssdb-server /etc/ssdb/%i.conf -s start -d
ExecStop=/usr/local/ssdb/ssdb-server /etc/ssdb/%i.conf -s stop -d
PIDFile=/run/ssdb@%i.pid
Restart=always
LimitFSIZE=infinity
LimitCPU=infinity
LimitAS=infinity
LimitNOFILE=256000
LimitNPROC=256000
Type=forking

[Install]
WantedBy=multi-user.target

Add the services to autostart and start them:

{
systemctl enable ssdb@hardbounces
systemctl enable ssdb@notifications
systemctl start ssdb@hardbounces
systemctl start ssdb@notifications
systemctl status ssdb@hardbounces
systemctl status ssdb@notifications
}

Update the connection parameters in the configuration file main.json:

{
"SSDB_HBSUPP_IP": "127.0.0.1",
"SSDB_HBSUPP_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"SSDB_HBSUPP_PORT": 4420,
"SSDB_NOTIFY_IP": "127.0.0.1",
"SSDB_NOTIFY_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"SSDB_NOTIFY_PORT": 4430
}

Installation of RabbitMQ​

note

RabbitMQ message broker is used for various interactions between platform services. Below is the instruction for installing from DEB packages hosted on Cloudsmith.

Add the required repositories to the system:

{
curl -1sLf https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/setup.deb.sh | bash
curl -1sLf https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/setup.deb.sh | bash
}

Install RabbitMQ:

{
apt update
apt install -y --fix-missing rabbitmq-server
}

Add the service to autostart and start it:

{
systemctl enable rabbitmq-server.service
systemctl start rabbitmq-server.service
systemctl status rabbitmq-server.service
}

Increase the default disk space limit (Learn more):

rabbitmqctl set_disk_free_limit 5GB

Create a user, virtual host, and assign permissions:

{
rabbitmqctl add_user "altcraft" "abcdefghijklmnopqrstuvwxyzABCDEF"
rabbitmqctl set_user_tags "altcraft" administrator
rabbitmqctl add_vhost "altcraft"
rabbitmqctl set_permissions -p "altcraft" "altcraft" ".*" ".*" ".*"
}

Update the connection parameters in the configuration file main.json:

{
"RABBITMQ_HOST": "127.0.0.1",
"RABBITMQ_VHOST": "altcraft",
"RABBITMQ_USER": "altcraft",
"RABBITMQ_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF"
}

Installing Kvrocks​

info

Kvrocks is an alternative to Redis, built on RocksDB. Unlike Redis, it stores data on disk, making it suitable for handling large volumes of data. In Altcraft, starting from version v2025.2.72, Kvrocks is used for deduplication in campaigns. Install the dependencies for the build:

{
apt update
apt install -y git build-essential cmake libtool python3
}

Go to the project's releases page on GitHub, download the latest version, and extract the archive:

{
wget https://github.com/apache/kvrocks/archive/refs/tags/v2.12.1.tar.gz
tar xzf v2.12.1.tar.gz
}

Build and install:

{
cd kvrocks-2.12.1
./x.py build -DPORTABLE=1 -DCMAKE_BUILD_TYPE=Release -j $(nproc)
mv build/kvrocks /usr/local/bin/
}

Create the user and directories:

{
groupadd kvrocks
useradd -r -g kvrocks -s /bin/false kvrocks
mkdir -p /var/{lib,log}/kvrocks /etc/kvrocks
chown -R kvrocks:kvrocks /var/{lib,log}/kvrocks
}

Create the configuration file /etc/kvrocks/kvrocks.conf:

# kvrocks.conf
bind 0.0.0.0
port 6666
db-name altcraft.db
dir /var/lib/kvrocks
log-dir /var/log/kvrocks
log-retention-days 7
backup-dir /var/lib/kvrocks/backup
requirepass abcdefghijklmnopqrstuvwxyzABCDEF
supervised systemd
workers 8

Create a systemd service file named kvrocks.service in the /etc/systemd/system directory:

[Unit]
Description=kvrocks SSD key-value database
Documentation=https://github.com/apache/kvrocks
Wants=network-online.target
After=network-online.target

[Service]
User=kvrocks
Group=kvrocks
Type=notify
ExecStart=/usr/local/bin/kvrocks -c /etc/kvrocks/kvrocks.conf
WorkingDirectory=/var/lib/kvrocks
Restart=on-failure
ExecStop=/bin/kill -s TERM $MAINPID
RestartSec=10s
LimitNOFILE=100000
LimitNPROC=4096
TimeoutSec=300
NoNewPrivileges=yes

[Install]
WantedBy=multi-user.target
Alias=kvrocks.service

Enable the service to start automatically and launch it:

{
systemctl enable kvrocks.service
systemctl start kvrocks.service
systemctl status kvrocks.service
}

Update the connection parameters in the configuration file main.json:

{
"CAMP_DUPLICATESDB": {
"MODE": "standalone",
"PASSWORD": "abcdefghijklmnopqrstuvwxyzABCDEF",
"NODES": [
{
"HOST": "127.0.0.1",
"PORT": 6666
}
]
},
"PROCWORKFLOW_DISTRIBUTED_CACHE_DB": {
"MODE": "standalone",
"PASSWORD": "abcdefghijklmnopqrstuvwxyzABCDEF",
"NODES": [
{
"HOST": "127.0.0.1",
"PORT": 6666
}
]
}
}

Platform Launch​

Before launching the platform, make sure you have completed the main.json configuration file. A description of all parameters is available on the Configuration File page. Example:

{
"BASEDIR": "/opt/akd",

"MONGO_AUTH_DB": "admin",
"CONTROLDB_IP": "127.0.0.1",
"CONTROLDB_PORT": 27017,
"CONTROLDB_NAME": "control",
"CONTROLDB_USER": "altcraft",
"CONTROLDB_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",

"FILEDB_ENABLE": true,
"FILEDB_IP": "127.0.0.1",
"FILEDB_PORT": 27017,
"FILEDB_USER": "altcraft",
"FILEDB_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"FILEDB_NAME": "filedb",

"COOKIESAVER_PUBLIC_HOSTNAME": "pxl.domain.com",
"COOKIESAVER_PUBLIC_IP": "192.168.0.3",
"COOKIESAVER_PUBLIC_PORT": 80,
"COOKIESAVER_SSL_ON": false,

"DEFAULT_LOG_LEVEL": "INFO",
"PRIVATE_KEY": "abcdefghijklmnopqrstuvwxyzABCDEF",

"PRODUCT_NAME": "Altcraft Platform",

"CLICKHOUSE_SYSTEM": {
"HOST": "127.0.0.1",
"PORT": 9000,
"USER": "altcraft",
"DATABASE_NAME": "altcraft_system",
"PASSWORD": "abcdefghijklmnopqrstuvwxyzABCDEF",
"IS_DEBUG": false
},

"SSDB_HBSUPP_IP": "127.0.0.1",
"SSDB_HBSUPP_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"SSDB_HBSUPP_PORT": 4420,
"SSDB_NOTIFY_IP": "127.0.0.1",
"SSDB_NOTIFY_PASS": "abcdefghijklmnopqrstuvwxyzABCDEF",
"SSDB_NOTIFY_PORT": 4430,

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

"TRACKING_CRYPT_KEY": "abcdefghijklmnopqrstuvwxyzABCDEF",
"TRACKING_HOSTNAME": "click.domain.com",
"TRACKING_PREFIX": "click",
"TRACKING_PUBLIC_IP": "192.168.0.2",
"TRACKING_PUBLIC_PORT": 80,

"WEBAPI_PRIVATE_KEY": "abcdefghijklmnopqrstuvwxyzABCDEF",
"WEBCONTROL_HOSTNAME": "altcraft.domain.com",
"WEBCONTROL_PUBLIC_IP": "192.168.0.1",
"WEBCONTROL_PUBLIC_PORT": 80
}

To manage platform services, use the akd executable. Command reference:

Usage:
akd [flags]
akd [command]

Available Commands:
list List platform information
start Start platform services
stop Stop platform services
restart Restart platform services
reload-nginx Reload nginx configuration
help Help about any command
completion Generate the autocompletion script for the specified shell

Flags:
--appname show application full name
--config string config path (default "/opt/akd/config/main.json")
--debug debug mode (for development purposes)
-h, --help help for akd
-v, --version version for akd

Use "akd [command] --help" for more information about a command.

This completes the installation. The platform is ready to launch and further configuration. To continue setup, follow the guide on the Getting Started page.

Last updated on Sep 12, 2025
Previous
Automatic installation
Next
Running the platform in a Docker container
  • Preparation
    • Introduction
    • Archive Loading
    • Checking the Server Time
    • Setting System Limits
    • Installing Dependencies
  • Installation of MongoDB
  • Installation of ClickHouse
  • Installation of SSDB
  • Installation of RabbitMQ
  • Installing Kvrocks
  • Platform Launch
© 2015 - 2025 Altcraft, LLC. All rights reserved.