O4
Storage Azure

OpenAS2 4.15 on Ubuntu 26.04 on Azure User Guide

| Product: OpenAS2 4.15 on Ubuntu 26.04 LTS on Azure

Overview

OpenAS2 is an open source (GNU GPL v3) Java implementation of AS2 (RFC 4130), the protocol businesses use to exchange EDI documents (X12, EDIFACT) and other files with their trading partners over HTTP. Every message is signed and encrypted with the two sides' certificates, and the receiver answers with a signed receipt (an MDN) that proves the file arrived intact. This image runs OpenAS2 4.15 as a systemd service on Ubuntu 26.04 LTS, ready to receive on port 10080, with keys, passwords and a tracking database made for your VM alone at its first boot. cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours.

What is included:

  • OpenAS2 4.15.0, upstream's own binary release (OpenAS2Server-4.15.0.zip), unmodified, its checksum verified when the image was built, in /opt/openas2
  • OpenJDK 21 (openjdk-21-jre-headless) from the Ubuntu 26.04 archive, so Ubuntu's security updates and unattended upgrades patch the Java runtime with the operating system
  • OpenAS2 run by systemd as openas2.service, under its own unprivileged openas2 account, started at boot
  • The AS2 receiver on TCP port 10080 and the asynchronous MDN receiver on TCP port 10081
  • No key or password in the image: first boot makes three 3072-bit RSA key pairs with self-signed SHA-256 certificates (your station MyCompany_OID and the two example partners) in a PKCS#12 keystore with a random password, and a random password for the H2 message-tracking database
  • Unsigned messages are refused, the remote command console, the REST API and the H2 database's TCP server are off, and received files, headers and receipts are stored under names made of the date and a random id, never a name the sender chose
  • The example partnerships use AES-256 encryption and SHA-256 signatures
  • A self-test, sudo openas2-selftest, that sends a signed and encrypted AS2 message from your station to itself and checks the signed receipt
  • cloudimg's support team on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours

Platform: Microsoft Azure, Ubuntu 26.04 LTS (Gen2, x64) Default user: the administrator user name you choose when you deploy the VM (azureuser in this guide), signing in with your SSH key Configuration: /etc/openas2/config.xml and /etc/openas2/partnerships.xml

Prerequisites

An active Azure subscription, an SSH key pair, and the public IP addresses your trading partners send AS2 from (they can tell you), so you can open port 10080 to them only. Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting point: OpenAS2's Java heap is capped at 1 GB, enough for a typical trading-partner workload. NSG inbound: allow 22/tcp from your management network and 10080/tcp from your trading partners; add 10081/tcp only if a partner sends its receipts asynchronously.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for OpenAS2 4.15 on Ubuntu 26.04 by cloudimg, and select Create. On Basics pick your subscription, resource group, region and size; under Administrator account choose SSH public key and paste your key; under Inbound port rules allow SSH (22). On the Networking tab consider a static public IP address: your trading partners will configure your AS2 URL with it. Then Review + create -> Create. After deployment, add an NSG rule for 10080 scoped to your trading partners' addresses.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn cloudimg1647283583153:openas2-ubuntu-26-04:default:latest

az vm create \
  --resource-group <your-rg> \
  --name openas2 \
  --image cloudimg1647283583153:openas2-ubuntu-26-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --public-ip-sku Standard

az network nsg rule create \
  --resource-group <your-rg> \
  --nsg-name openas2NSG \
  --name allow-as2-from-partners \
  --priority 1010 \
  --direction Inbound --access Allow --protocol Tcp \
  --destination-port-ranges 10080 \
  --source-address-prefixes <partner-ip-1>/32 <partner-ip-2>/32

az vm create names the network security group after the VM (<vm-name>NSG); check its name with az network nsg list --resource-group <your-rg> -o table.

Step 3 - Connect to your VM

ssh azureuser@<vm-public-ip>

The login message names your AS2 receiver URL, your station and the self-test.

Step 4 - Confirm OpenAS2 is installed and running

OpenAS2 runs as openas2.service, as the openas2 account, and listens on 10080 and 10081. Check the service, its account, the listeners, the Java runtime and the OpenAS2 version:

systemctl is-active openas2
ps -o user=,args= -C java | cut -c1-60
ss -Hltn | awk '{print $4}' | grep -E ':1008[01]$' | sort
java -version 2>&1 | head -1
ls /opt/openas2/lib | grep '^openas2-server'
active
openas2  /usr/bin/java -Xms64m -Xmx1024m -XX:-UsePerfData -D
*:10080
*:10081
openjdk version "21.0.13.1" 2026-11-17
openas2-server-4.15.0.jar

OpenAS2 4.15.0 active as the openas2 account, listening on TCP 10080 and 10081, on Ubuntu's OpenJDK 21

Step 5 - Your AS2 station and certificate

Your VM's first boot made its AS2 set-up and wrote the details your trading partners need to a root-only credentials file:

sudo cat /root/openas2-credentials.txt
# OpenAS2 4.15 on Ubuntu 26.04 LTS (cloudimg Azure Marketplace image): this VM's own AS2 set-up, made at first boot.
# Guide: https://www.cloudimg.co.uk/guides/openas2-4-15-on-ubuntu-26-04-azure/
# Give your trading partners AS2_LOCAL_STATION_ID, AS2_RECEIVER_URL and the certificate AS2_PUBLIC_CERT; keep the
# passwords to yourself (config.xml holds them for the service).

AS2_LOCAL_STATION_ID=MyCompany_OID
AS2_RECEIVER_URL=http://<VM address>:10080
AS2_ASYNC_MDN_URL=http://<VM address>:10081
AS2_PUBLIC_CERT=/etc/openas2/mycompany.cer
AS2_KEYSTORE_FILE=/etc/openas2/as2_certs.p12
AS2_KEYSTORE_ALIASES=mycompany (your station), partnera and partnerb (the example partners)
AS2_KEYSTORE_PASSWORD=********************************
AS2_TRACKING_DB=jdbc:h2:/var/lib/openas2/DB/openas2 (stop openas2 before opening it)
AS2_TRACKING_DB_USER=sa
AS2_TRACKING_DB_PASSWORD=********************************

The receiver URLs carry your VM's public IP address (shown here as <VM address>); the two passwords are this VM's own random values (shown here as stars). Store them in your secrets manager.

The keystore holds three key pairs, each made on your VM. The command reads its password from the credentials file into an environment variable, so it never appears on the command line:

sudo sh -c 'export OA2_KSPW="$(grep -m1 "^AS2_KEYSTORE_PASSWORD=" /root/openas2-credentials.txt | cut -d= -f2-)"
  keytool -list -keystore /etc/openas2/as2_certs.p12 -storepass:env OA2_KSPW'
Keystore type: PKCS12
Keystore provider: SUN

Your keystore contains 3 entries

mycompany, Dec 3, 2026, PrivateKeyEntry, 
Certificate fingerprint (SHA-256): D2:3F:C9:EA:D3:89:14:03:67:B8:0A:25:D4:33:14:7A:00:82:99:D0:72:97:E9:67:5D:9D:19:7C:7E:72:87:F3
partnera, Dec 3, 2026, PrivateKeyEntry, 
Certificate fingerprint (SHA-256): A1:84:7C:DA:F7:E2:DA:B4:38:3D:20:FF:FB:7F:A5:A2:32:C8:40:BD:73:4C:3E:68:B8:EA:4D:9C:19:E9:E1:89
partnerb, Dec 3, 2026, PrivateKeyEntry, 
Certificate fingerprint (SHA-256): D1:31:95:CC:BE:91:22:6C:E3:4B:DA:E3:25:0D:57:AB:8D:80:14:94:9A:9A:60:64:1C:CE:5A:2E:4C:EA:97:0C

mycompany is your station's key. partnera and partnerb belong to upstream's two example partners: partnera lets the self-test (Step 6) send a message from your station to itself. A real partner's entry holds only their certificate (Step 8).

Your public certificate, /etc/openas2/mycompany.cer, is the file you send your trading partners. It is valid for ten years, with a 3072-bit RSA key and a SHA-256 signature:

sudo openssl x509 -in /etc/openas2/mycompany.cer -noout -subject -dates -fingerprint -sha256
sudo openssl x509 -in /etc/openas2/mycompany.cer -noout -text | grep -E 'Public-Key|Signature Algorithm' | sort -u
subject=C=US, O=MyCompany, OU=AS2, CN=as2.mycompany.local
notBefore=Dec  3 07:57:00 2026 GMT
notAfter=Nov 30 07:57:00 2036 GMT
sha256 Fingerprint=D2:3F:C9:EA:D3:89:14:03:67:B8:0A:25:D4:33:14:7A:00:82:99:D0:72:97:E9:67:5D:9D:19:7C:7E:72:87:F3
                Public-Key: (3072 bit)
        Signature Algorithm: sha256WithRSAEncryption
    Signature Algorithm: sha256WithRSAEncryption

/etc/openas2 is readable by root and the openas2 account only, so to copy the certificate to your own machine, put a copy in your home folder on the VM first:

sudo install -m 0644 -o "$USER" /etc/openas2/mycompany.cer ~/mycompany.cer

then, from your own machine, scp azureuser@<vm-public-ip>:mycompany.cer .

The credentials file with this VM's station ID and receiver URLs, and the public certificate's subject, ten-year validity, 3072-bit key and SHA-256 signature

Step 6 - Run the self-test

The self-test drops a small EDI file in the outbox for the example partner PartnerA_OID. OpenAS2 signs and encrypts it, sends it over AS2 to its own receiver on port 10080, receives, decrypts and verifies it, and answers with a signed receipt. The script waits for both and checks the receipt is signed and says processed:

sudo openas2-selftest
SELFTEST_OK message 20261203080003401-QQxojTRDS7Go43rzfFNWipAieie received, decrypted and verified; signed MDN 20261203080003440-HDXUoVMhSeqVMUCtqgJyyQieie

OpenAS2 made its data folders as it went:

sudo find /var/lib/openas2/data -type d | sort
/var/lib/openas2/data
/var/lib/openas2/data/MyCompany_OID-PartnerA_OID
/var/lib/openas2/data/MyCompany_OID-PartnerA_OID/inbox
/var/lib/openas2/data/MyCompany_OID-PartnerA_OID/msgheaders
/var/lib/openas2/data/MyCompany_OID-PartnerA_OID/msgheaders/2026-12-03
/var/lib/openas2/data/mdn
/var/lib/openas2/data/mdn/2026-12-03
/var/lib/openas2/data/outbox
/var/lib/openas2/data/outbox/PartnerA_OID
/var/lib/openas2/data/outbox/error
/var/lib/openas2/data/outbox/error/2026-12-03
/var/lib/openas2/data/outbox/error/2026-12-03/PartnerA_OID
/var/lib/openas2/data/pendingMDN3
/var/lib/openas2/data/pendinginfoMDN3
/var/lib/openas2/data/resend
/var/lib/openas2/data/temp

The received file is in the inbox for that pair of stations (MyCompany_OID-PartnerA_OID/inbox), its AS2 headers in msgheaders beside it, and the receipt in mdn. OpenAS2's own log shows each step of the exchange (the latest log is /var/log/openas2/log-<date>.txt):

sudo sh -c 'tail -n 12 "$(ls -t /var/log/openas2/log-*.txt | head -1)"' | cut -c1-150
07:58:48.355 [AS2DirectoryPollingModule] INFO  org.openas2.processor.sender.AS2SenderModule -- Save Original mic & message id information into file:
07:58:48.360 [AS2DirectoryPollingModule] INFO  org.openas2.processor.sender.AS2SenderModule -- Connecting to: http://localhost:10080 [<2026120307584
07:58:48.379 [pool-3-thread-2] INFO  org.openas2.processor.receiver.AS2ReceiverHandler -- received 2331 bytes in 0.14 seconds at 162.612 KBps 127.0.0
07:58:48.402 [pool-3-thread-2] INFO  org.openas2.processor.receiver.AS2MDNReceiverHandler -- DISPOSITION MIC ALG: SHA-256   IMPORTANCE: optional
07:58:48.404 [pool-3-thread-2] INFO  org.openas2.processor.storage.MessageFileModule -- stored message to /var/lib/openas2/data/MyCompany_OID-Partn
07:58:48.405 [pool-3-thread-2] INFO  org.openas2.processor.storage.MessageFileModule -- stored headers to /var/lib/openas2/data/MyCompany_OID-Partn
07:58:48.405 [pool-3-thread-2] INFO  org.openas2.processor.receiver.AS2MDNReceiverHandler -- DISPOSITION MIC ALG: SHA-256   IMPORTANCE: optional
07:58:48.421 [AS2DirectoryPollingModule] INFO  org.openas2.processor.sender.AS2SenderModule -- Message sent and response received in 59 milliseconds
07:58:48.424 [pool-3-thread-2] INFO  org.openas2.processor.sender.MDNSenderModule -- sent MDN [automatic-action/mdn-sent-automatically; processed] [<
07:58:48.430 [AS2DirectoryPollingModule] INFO  org.openas2.util.AS2Util -- Partner PartnerA_OID responded with MDN [automatic-action/MDN-sent-automat
07:58:48.432 [AS2DirectoryPollingModule] INFO  org.openas2.util.AS2Util -- Message sent and MDN received successfully.
07:58:48.433 [AS2DirectoryPollingModule] INFO  org.openas2.util.AS2Util -- Pending MDN MSG FILE deleted: /var/lib/openas2/data/pendingMDN3/202612030

sudo openas2-selftest reporting SELFTEST_OK, and the received message, its headers and the signed receipt on disk

Step 7 - Confirm the secure defaults

The main settings in config.xml show what the image turns on and off:

sudo grep -oE '(console|restapi)\.command\.processor\.enabled="[a-z]+"|module\.AS2(MDN)?ReceiverModule\.http\.port="[0-9]+"|tcp_server_start="[a-z]+"|reject_unsigned_messages="[a-z]+"' /etc/openas2/config.xml
console.command.processor.enabled="false"
restapi.command.processor.enabled="false"
module.AS2ReceiverModule.http.port="10080"
module.AS2MDNReceiverModule.http.port="10081"
tcp_server_start="false"
reject_unsigned_messages="true"

An unsigned message is answered with an error receipt and never reaches an inbox. Send one to your own receiver and read the receipt OpenAS2 sent back:

curl -s -o /dev/null -w 'HTTP %{http_code}\n' -X POST http://127.0.0.1:10080 \
  -H 'AS2-Version: 1.2' -H 'AS2-From: PartnerA_OID' -H 'AS2-To: MyCompany_OID' \
  -H 'Message-ID: <unsigned-test@example.com>' -H 'Content-Type: application/EDI-X12' \
  --data-binary 'an unsigned message'
sleep 3
sudo sh -c 'grep -h "unsigned-test@example.com" /var/log/openas2/log-*.txt' | grep -o 'sent MDN \[[^]]*\]' | tail -1
HTTP 200
sent MDN [automatic-action/mdn-sent-automatically; processed/error:signed-message-required]

The refused message is kept in /var/lib/openas2/data/inbox/error/ for you to inspect.

systemd runs the service with a read-only system, write access only to its own data and log folders, no way to gain privileges, and no route to Azure's platform addresses (the WireServer 168.63.129.16 and the link-local range 169.254.0.0/16, which holds the instance metadata service). An AS2 sender may ask for its receipt at any URL it likes, and your trading partners are never at those addresses:

systemctl show openas2 -p User -p IPAddressDeny -p ProtectSystem -p NoNewPrivileges -p ReadWritePaths
IPAddressDeny=168.63.129.16/32 169.254.0.0/16
User=openas2
ReadWritePaths=/var/lib/openas2 /var/log/openas2
ProtectSystem=strict
NoNewPrivileges=yes

The keystore and config.xml (which holds the passwords for the service) are readable by root and the openas2 group only, and the credentials file by root only:

sudo ls -l /etc/openas2
sudo stat -c '%a %U:%G %n' /root/openas2-credentials.txt
total 72
-rw-r----- 1 root openas2  9940 Dec  3 07:57 as2_certs.p12
-rw-r----- 1 root openas2  2106 Dec  3 07:56 commands.xml
-rw-r----- 1 root openas2 17590 Dec  3 07:57 config.xml
-rw-r----- 1 root openas2    58 Dec  3 07:56 content_type_mappings.properties
-rw-r----- 1 root openas2  3586 Dec  3 07:56 db_ddl.sql
-rw-r----- 1 root openas2   157 Dec  3 07:56 emailtemplate.txt
-rw-r----- 1 root openas2  2289 Dec  3 07:56 logback.xml
-rw-r----- 1 root openas2    55 Dec  3 07:56 messages.xml
-rw-r--r-- 1 root openas2  1555 Dec  3 07:57 mycompany.cer
-rw-r----- 1 root openas2  8703 Dec  3 07:56 partnerships.xml
600 root:root /root/openas2-credentials.txt

The hardened config.xml settings, an unsigned message answered with signed-message-required, and the service's systemd sandbox

Step 8 - Add a real trading partner

You and your partner exchange three things: your AS2 ID, AS2 URL and certificate (Step 5) for theirs. Then, on the VM:

1. Import the partner's certificate (say acme.cer, copied to your home folder) into the keystore under an alias of your choice:

sudo sh -c 'export OA2_KSPW="$(grep -m1 "^AS2_KEYSTORE_PASSWORD=" /root/openas2-credentials.txt | cut -d= -f2-)"
  keytool -importcert -noprompt -alias acme -file '"$HOME"'/acme.cer -keystore /etc/openas2/as2_certs.p12 -storepass:env OA2_KSPW'

2. Describe the partner and both directions in /etc/openas2/partnerships.xml (sudo nano /etc/openas2/partnerships.xml). Copy the example PartnerA entries and change the names, AS2 ID, alias and URL:

<partner name="Acme" as2_id="ACME_AS2" x509_alias="acme" email="edi@acme.example"/>

<partnership name="MyCompany-to-Acme">
    <sender name="MyCompany"/>
    <receiver name="Acme"/>
    <pollerConfig enabled="true"/>
    <attribute name="protocol" value="as2"/>
    <attribute name="content_transfer_encoding" value="binary"/>
    <attribute name="compression_type" value="ZLIB"/>
    <attribute name="subject" value="File $attributes.filename$ sent from $sender.name$ to $receiver.name$"/>
    <attribute name="as2_url" value="https://as2.acme.example:4080"/>
    <attribute name="as2_mdn_to" value="edi@yourcompany.example"/>
    <attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, $attribute.sign$"/>
    <attribute name="encrypt" value="AES256"/>
    <attribute name="sign" value="SHA-256"/>
    <attribute name="resend_max_retries" value="3"/>
</partnership>

<partnership name="Acme-to-MyCompany">
    <sender name="Acme"/>
    <receiver name="MyCompany"/>
    <attribute name="reject_unsigned_messages" value="true"/>
</partnership>

Use the encryption and signing algorithms your partner supports (AES128, AES192 or AES256; SHA-256, SHA-384 or SHA-512). To use your own organisation's AS2 ID instead of MyCompany_OID, change as2_id on the MyCompany partner, and tell your partners.

3. Restart the service so it reads both files at once:

sudo systemctl restart openas2

To send a file, copy it into /var/lib/openas2/data/outbox/ACME_AS2/ as the openas2 account (create the folder if it is not there yet), for example sudo -u openas2 cp invoice.edi /var/lib/openas2/data/outbox/ACME_AS2/. OpenAS2 checks the folder every 5 seconds and sends what it finds; a file it could not send goes to data/outbox/error/.

Files you receive from Acme land in /var/lib/openas2/data/ACME_AS2-MyCompany_OID/inbox/, under a name made of the date and a random id; the AS2 headers that came with each are in msgheaders/ beside it. A message that is refused (unsigned, or from an AS2 ID with no partnership) is kept in data/inbox/error/.

Asynchronous receipts: if a partner wants to send its receipts back separately, set as2_async_mdn_url in config.xml to the AS2_ASYNC_MDN_URL from your credentials file and uncomment the as2_receipt_option attribute in your partnership, then open 10081 to that partner.

HTTPS: to receive over HTTPS, put a TLS certificate and key in a PKCS#12 file under /etc/openas2/ (group openas2, mode 0640), set ssl_keystore and ssl_keystore_password in config.xml, set module.AS2ReceiverModule.https.enabled to true (its port is module.AS2ReceiverModule.https.port), allow that port in the network security group, and restart the service.

A different address: if the address in the credentials file is not the one your partners use (a VM without a public IP, a load balancer, or a DNS name), point the VM at the right one; it rewrites the credentials file and the login message:

sudo cloudimg-set-public-address <your-ip-or-dns-name>

Step 9 - Keeping Ubuntu and OpenAS2 up to date

Ubuntu and Java: unattended upgrades are on, so Ubuntu's security updates, including OpenJDK 21's, install by themselves. Run sudo apt update && sudo apt upgrade for everything else, then sudo systemctl restart openas2 so OpenAS2 runs on the updated Java runtime. A partner sending while the service restarts retries (OpenAS2 itself retries up to resend_max_retries times).

OpenAS2: new versions and their release notes are on GitHub and SourceForge. An upgrade replaces the .jar files in /opt/openas2/lib/; your configuration and keys in /etc/openas2/ and your messages in /var/lib/openas2/ stay as they are. Read the release notes for configuration changes first, then, with the new release unpacked in ~/openas2-new:

sudo systemctl stop openas2
sudo rm /opt/openas2/lib/*.jar
sudo cp ~/openas2-new/lib/*.jar /opt/openas2/lib/
sudo systemctl start openas2
sudo openas2-selftest

The self-test's SELFTEST_OK line confirms the new version sends and receives.

Server components

Component Version or setting Where
OpenAS2 4.15.0 (upstream's binary release) /opt/openas2/lib/
Java runtime OpenJDK 21.0.13.1 (openjdk-21-jre-headless 21.0.13.1+2-1~26.04.1, Ubuntu archive) /usr/lib/jvm/
Service openas2.service, user openas2, enabled, 1 GB Java heap /etc/systemd/system/openas2.service
AS2 receiver HTTP, TCP 10080 config.xml
Asynchronous MDN receiver HTTP, TCP 10081 config.xml
AS2 keys three 3072-bit RSA keys made at first boot, PKCS#12 /etc/openas2/as2_certs.p12
Message tracking H2 2.5.252 embedded database, its TCP server off /var/lib/openas2/DB/
Operating system Ubuntu 26.04.1 LTS, kernel 7.0 (linux-azure)

Filesystem layout

Path What it holds
/opt/openas2/ lib/ (OpenAS2 and its libraries), bin/, config-template/ (the image's starting configuration), LICENSE.txt (GPL v3), README.txt
/etc/openas2/ config.xml (made at first boot, holds this VM's passwords), partnerships.xml, logback.xml, commands.xml, the keystore as2_certs.p12 and your public certificate mycompany.cer
/var/lib/openas2/data/ outbox/<partner AS2 ID>/ (to send), <sender>-<receiver>/inbox/ and msgheaders/ (received), mdn/ (receipts), inbox/error/ (refused)
/var/lib/openas2/DB/, /var/lib/openas2/temp/ The tracking database and the service's temporary files
/var/log/openas2/ OpenAS2's logs, log-<date>.txt
/root/openas2-credentials.txt Your station's details and the two passwords (root only)
/usr/local/bin/openas2-selftest The self-test

The OS disk is a 30 GB disk with / (28 GB), /boot and /boot/efi; /mnt is the Azure temporary disk, whose contents are lost when the VM is stopped.

Managing the service

sudo systemctl status openas2
sudo systemctl restart openas2
sudo journalctl -u openas2 -n 50

sudo systemctl stop openas2 and start stop and start it; disable keeps it stopped across restarts (enable to undo). Messages your partners send while it is stopped are refused at the network, and their AS2 software retries them later.

On startup

At the first start of your VM, openas2-firstboot.service runs once, before OpenAS2:

  1. It makes this VM's keystore password and database password, the three key pairs and your public certificate, and writes config.xml from the image's template
  2. It creates the tracking database, as the openas2 account
  3. It writes /root/openas2-credentials.txt and the login message with your VM's public address
  4. It writes /var/lib/cloudimg/openas2-firstboot.done, and OpenAS2 starts

What it did is in its journal: sudo journalctl -u openas2-firstboot. It runs only once (the marker file stops it), so there is nothing to turn off.

Troubleshooting

The service is not running: sudo systemctl status openas2 and sudo journalctl -u openas2 -n 50 show why; OpenAS2's own log is the latest /var/log/openas2/log-<date>.txt. The service starts only once first boot has finished (/var/lib/cloudimg/openas2-firstboot.done exists).

A partner's message is refused: look at the latest log and at the refused copy in data/inbox/error/. The usual causes: the AS2-From or AS2-To ID does not match a partnership in partnerships.xml exactly (IDs are case-sensitive); the message is not signed (this image refuses unsigned messages); or the partner's certificate in the keystore is not the one they sign with.

Your message to a partner fails: the log names the step that failed. Check the partner's as2_url is reachable from the VM (curl -sv https://as2.acme.example:4080), that their certificate is in the keystore under the x509_alias your partner entry names, and that they have your current certificate. A file that could not be sent is moved to data/outbox/error/.

OpenAS2 cannot write a file: the service may write only under /var/lib/openas2 and /var/log/openas2. Files you put in an outbox must be readable by the openas2 account (copy them with sudo -u openas2 cp).

Security recommendations

  • Open port 10080 to your trading partners' addresses only, and SSH to your own, or use Azure Bastion
  • Use HTTPS (Step 8) when a partner supports it: AS2 signs and encrypts the message itself, but HTTPS also hides its headers
  • Keep your private keys on this VM. Send partners only mycompany.cer; never copy as2_certs.p12 or the credentials file off the VM
  • Once your own partners work, you may remove the example partner PartnerB and its partnerships from partnerships.xml; the self-test uses PartnerA
  • Keep unattended upgrades on, and read OpenAS2's release notes for security fixes

Support

cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours, covering deployment, the AS2 set-up, trading partner configuration and upgrades.

OpenAS2 is released under the GNU General Public License version 3. All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.