Quickstart (Docker)
A single container, a config file, a partnerships file, your keys, and your license. Working AS2 endpoint in five minutes.
1. Lay out a config directory
as2d/
├── config.toml
├── partnerships.toml
├── license.lic # issued to you at purchase
└── keys/
├── me.key.pem # your private key
├── me.cer.pem # your certificate
└── partner.cer.pem # each partner's certificate
config.toml:
listen = "0.0.0.0:8080"
[storage]
kind = "local"
data_dir = "/data"
partnerships_file = "/config/partnerships.toml"
keys_dir = "/keys"
[license]
path = "/config/license.lic"
[limits]
max_body_mb = 256
decompress_limit_mb = 512
partnerships.toml (one inbound + outbound partner; see
Partnerships for every option):
[[partnership]]
id = "acme-inbound"
local_id = "MYCOMPANY"
remote_id = "ACME"
cert_aliases = { local = "me", remote = "partner" }
[partnership.security]
sign = "sha-256"
encrypt = "aes256-cbc"
[[partnership]]
id = "acme-outbound"
local_id = "MYCOMPANY"
remote_id = "ACME"
remote_url = "https://as2.acme.example/as2"
cert_aliases = { local = "me", remote = "partner" }
[partnership.security]
sign = "sha-256"
encrypt = "aes256-cbc"
[partnership.mdn]
request = true
signed_micalg = "sha-256"
2. Run
docker run -d --name as2d \
-p 8080:8080 \
-v $PWD/as2d:/config:ro \
-v $PWD/as2d/keys:/keys:ro \
-v as2d-data:/data \
-e AS2D_CONFIG=/config/config.toml \
<registry>/as2d:<tag>
3. Check
curl http://localhost:8080/healthz
# → ok
If it prints degraded: unlicensed, the license file was not found — the
server is alive but refuses AS2 traffic until it is; see
Installing your license.
The startup log also tells you: which license is loaded and for how long, any certificate expiring within 30 days, and any partnership configured with an algorithm known to be problematic with certain partners.
4. Expose
Put your TLS-terminating reverse proxy (nginx, Caddy, a cloud load
balancer) in front of port 8080 and give partners the resulting URL —
messages POST to /as2 (or /), asynchronous receipts to /as2/mdn.