Install with Docker

Installation with Docker



To run an installation with Docker, you must have it installed.

Docker installation:

Mandatory Variables

In order to successfully install Syntropy with Docker, you must have an API Key

Variable Name



SYNTROPY Network Agent Token (String)


API Key Example


Docker Network Subnet Overlap

When installing the agent, and setting up your endpoints, you need to make sure there's no docker network subnet overlap, otherwise, it may cause conflict leading to non-functioning connections. Subnets shouldn't overlap.

So let's assume you have 4 endpoints, two GCP & two AWS. You have to set up a separate docker network with a different subnet for each. Here's a quick example:

# GCP Endpoints

- gcp-instance-1:
    - subnet:
    - services:
        - redis:
        - mysql:
        - php-fpm:

- gcp-instance-2:
    - subnet:,
    - services:
        - pgsql:
        - memcached:

        - nginx:

# AWS Endpoints

- aws-instance-1:
    - subnet:
    - services:
        - service-1:
        - service-2:
        - service-3:

- aws-instance-2:
    - subnet:
    - services:
        - service-1:
        - service-2:
        - service-3:

Install with Docker

The easiest way to start with Syntropy Platform is to install Syntropy Agent with Docker:

// Syntropy AGENT Token is Required

sudo docker run --network="host" --restart=on-failure:10 \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE -v /var/run/docker.sock:/var/run/docker.sock:ro \
--device /dev/net/tun:/dev/net/tun --name=syntropy-agent \
-e SYNTROPY_AGENT_TOKEN=<<agent_token>> -d syntropynet/agent:stable
FROM golang:alpine as builder
RUN apk update && apk add --no-cache --update git build-base
COPY . ./
RUN make

FROM alpine

RUN apk update && apk add --no-cache --update iptables wireguard-tools
COPY --from=builder ./app/syntropy_agent /syntropy_agent

ENTRYPOINT [ "./syntropy_agent"]
docker run --network="host" --restart=on-failure:10 --cap-add=NET_ADMIN \
   --cap-add=SYS_MODULE -v /var/run/docker.sock:/var/run/docker.sock:ro \
   --device /dev/net/tun:/dev/net/tun --name=syntropynet-agent \
   -e SYNTROPY_AGENT_TOKEN=<<agent_token>> \
   -e SYNTROPY_ALLOWED_IPS='[{"":"internet"}]' \
   -e SYNTROPY_TAGS=VPN -d syntropynet/agent:stable

Install with docker-compose

If you have multiple containers you are configuring for, you are able to use docker-compose for installation as well.

# Syntropy API Key is Required

version: ‘2’

    image: syntropynet/agent:stable
    container_name: syntropy-agent
      - NET_ADMIN
      - SYS_MODULE
      - SYNTROPY_AGENT_TOKEN=<<agent_token>>
    restart: always
    network_mode: “host”
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - “/dev/net/tun:/dev/net/tun”
FROM golang:1.14.1-alpine3.11 as builder

RUN apk add --update git build-base libmnl-dev iptables

RUN git clone && \
    cd wireguard-go && \
    make && \
    make install

RUN git clone && \
    cd wireguard-tools && \
    cd src && \
    make && \
    make install

FROM python:alpine3.10
COPY --from=builder /usr/bin/wireguard-go /usr/bin/wg* /usr/bin/
COPY . /agent
WORKDIR ./agent
RUN apk add wireguard-tools iproute2 \
  && apk --update add python py-pip openssl ca-certificates py-openssl wget \
  && apk --update add --virtual build-dependencies libffi-dev openssl-dev python-dev py-pip build-base \
  && pip install --upgrade pip \
  && python install \
  && rm -rf /agent \
  && apk del build-dependencies

ENTRYPOINT ["/usr/local/bin/noia_agent", "run"]

Run Docker Container

  • Start SYNTROPY Agent container in the background:
sudo docker-compose up -d

Next step

Customize your installation with Syntropy Agent Variables

Did this page help you?