Prerequisites
Before you begin, please install Docker if you have not done it already.
Step 1: Pull argosoft/agms container from the docker hub
Execute the following command:
sudo docker pull argosoft/agms
Step 2: Start the container
Execute the following command recommended, for linux
sudo docker run -d --name agms --restart=unless-stopped -e TZ=America/Toronto -v /var/lib/agms:/app/data/ \
-v /var/log/agms:/app/logs/ -v /var/lib/certs:/app/certs/ -e CERT_PATH=certs/mycertificate.crt -e CERT_KEY_PATH=certs/mycertificate.key \
--network=host argosoft/agms
We recommend using --network=host
instead of --network=bridge
. In bridge mode, the container cannot see the real
external IP addresses of incoming connections, which prevents IP-based filtering features from working correctly.
If you are using Docker on Linux, the host mode is the preferred option as it allows the container to use the host's network stack directly.
This way, agms can bind to the necessary ports (25, 587, 110, 143) without any additional port mapping.
Make sure that no other services are using these ports on the host machine. The default port for the web interface is 8080 (HTTP) and 8081 (HTTPS).
If you wish to change those, you can do so by modifying the Kestrel settings using the environment parameters
-e Kestrel__Endpoints__Http__Url=http://:::7050
and -e Kestrel__Endpoints__Https__Url=https://:::7051
. It will make
the web interface available on ports 7050 (HTTP) and 7051 (HTTPS).
If you are using Docker on Windows or Mac, or if you have specific networking requirements, you may need to use the bridge mode. In that case, make sure to map the necessary ports as shown in the next command.
sudo docker run -d --name agms --restart=unless-stopped -e TZ=America/Toronto -v /var/lib/agms:/app/data/ \
-v /var/log/agms:/app/logs/ -v /var/lib/certs:/app/certs/ -e CERT_PATH=certs/mycertificate.crt -e CERT_KEY_PATH=certs/mycertificate.key \
-p 25:25 -p 587:587 -p 110:110 -p 143:143 -p 5000:5000 -p 5001:5001 argosoft/agms
Note: Replace /var/lib/agms
, /var/log/agms
, and /var/lib/certs
with your desired host paths for data persistence and certificates.
This command will start agms in a detached mode, with automatic restart unless stopped, and map necessary volumes for data persistence.
Make sure to adjust the volume paths and environment variables as needed for your setup.
Alternatively, you can run the container through compose.yaml file.
services:
agms:
image: argosoft/agms
container_name: agms
restart: unless-stopped
network_mode: host
environment:
TZ: America/Toronto
CERT_PATH: certs/mycertificate.crt
CERT_KEY_PATH: certs/mycertificate.key
Kestrel__Endpoints__Http__Url: http://:::7050
Kestrel__Endpoints__Https__Url: https://:::7051
volumes:
- /var/lib/agms:/app/data/
- /var/log/agms:/app/logs/
- /certs:/app/certs/
Then run the following command to start the container:
sudo docker compose up -d
Once the container is running, you can access the agms web interface by navigating to http://localhost:5000 in your web browser.
Step 3: Managing the container
To stop the container, use the following command:
sudo docker stop agms
For other operating systems, please refer to the official Docker installation guide for specific instructions.
Contact if you have questions.