- Install podman.
sudo dnf install podman # fedora
or
sudo apt install podman # debian/ubuntu
- setup podman container.
mkdir -p ~/Downloads/aria2-pro-downloads
mkdir -p ~/.config/containers/systemd
mkdir -p ~/.config/aria2
touch ~/.config/containers/systemd/aria2-pro.container
nano ~/.config/containers/systemd/aria2-pro.container
copy paste the following:
[Unit]
Description=Podman Aria2-pro.service
Wants=network-online.target
After=network-online.target
[Service]
Restart=on-failure
TimeoutStartSec=900
[Container]
ContainerName=aria2-pro
Environment=PUID=1000 PGID=1000 UMASK_SET=022 RPC_SECRET=123456 RPC_PORT=6800 LISTEN_PORT=6888
Image=docker.io/p3terx/aria2-pro:latest
PodmanArgs=--log-opt 'max-size=1m'
AutoUpdate=registry
PublishPort=6800:6800
PublishPort=6888:6888
PublishPort=6888:6888/udp
Volume=%h/.config/aria2:/config:Z
Volume=%h/data/downloads/aria2-pro-downloads:/downloads:Z
[Install]
WantedBy=default.target
- Let's run the container using systemd.
systemctl --user daemon-reload
systemctl --user start aria2-pro.service
- Before we use the container. we have to fix some permissions. Enter the container and fix permissions.
podman exec -it aria2-pro /bin/sh
chown -R p3terx:p3terx /downloads
chmod 777 /downloads
-
Install browser extension. We are going to use aria2-extension by @zluo01 Github page
Chrome: https://chromewebstore.google.com/detail/aria2-integration-extensi/chehmbmmchaagpilhabnocngnmjllgfi?hl=en&authuser=0
Firefox: https://addons.mozilla.org/en-US/firefox/addon/aria2-integration-extension/ -
Open the extension 3 dot menu. Aria2NG UI will open up. Go to AriaNG settings -> RPC tab -> RPC protocol "websocket" -> RPC token = 123456.
This should connect with our podman container.
- Now let's enable the podman container at system startup.
systemctl --user enable aria2-pro.service