-
Notifications
You must be signed in to change notification settings - Fork 26
Docker
If you want to run MuWire in a standalone container you need to have an I2P or I2Pd router running on the host machine, and not in a container.
The Docker image is based on the wonderful work in jlesage/docker-baseimage-gui. You can refer to it for environment variables to pass to the container.
If you don't want to use the image on dockerhub, build an image yourself.
MUWIRE_VERSION=`awk -F "=" '/^version/ { gsub(" ","") ; print $2}' gradle.properties`
docker build -t muwire:latest,muwire:${MUWIRE_VERSION} .
Necessary configuration
Since MuWire will be running in a container, it won't have direct access to the host's localhost.
By default, the wizard will choose 172.17.0.1
as the target host.
You'll need to open the I2CP port on that interface.
If you're running I2P on the localhost, navigate to http://localhost:7657/configi2cp and make the necessary changes.
Running
# Create directories to put data into
mkdir -p config incompletes output
docker run \
-p 5800:5800 \
-v ./config:/muwire/.MuWire \
-v ./incompletes:/incompletes \
-v ./output:/output \
--name muwire \
zlatinb/muwire
You will then be able to access the muwire GUI over a browser at http://localhost:5800
Options
Option | Description |
---|---|
-v ./config:/muwire/.MuWire |
This is where the config files will be stored |
-v ./incompletes:/incompletes |
The /incompletes volume should be used to store MuWire's incomplete download/upload data * |
-v ./output:/output |
The /output volume should be used to store MuWire's download/upload data |
The fastest way to get MuWire up and running is by using Docker Compose, assuming you are familiar with it. The following file will fetch and start an I2P service and a MuWire service.
version: "3.5"
services:
i2p:
image: geti2p/i2p
volumes:
- ./i2pconfig:/i2p/.i2p
networks:
- outside
- i2cp
ports:
- "7654:7654"
- "7657:7657"
muwire:
image: zlatinb/muwire
network_mode: "host"
volumes:
- ./mwconfig:/muwire/.MuWire
- ./mwoutput:/output
- ./mwincompletes:/incompletes
ports:
- "5800:5800"
networks:
- i2cp
links:
- i2p
networks:
outside:
i2cp:
Before going through the MuWire set up wizard you need to bind the I2CP interface to 0.0.0.0
. Then in the "external router" wizard step put i2p
as hostname.
Here is another docker-compose.yml
file that starts I2Pd, I2PSnark standalone and MuWire in one go:
version: "3.9"
services:
daemon:
image: purplei2p/i2pd:latest
volumes:
- /srv/dev-disk-by-label-1TB/i2p/daemon:/home/i2pd/data
networks:
- internal
ports:
- "4444:4444"
- "7070:7070"
- "12345:12345"
- "12345:12345/udp"
user: "1001"
ulimits:
nofile:
soft: 30000
hard: 40000
restart: "on-failure"
logging:
driver: "journald"
snark:
image: ypopovych/i2psnark:latest
depends_on:
- daemon
volumes:
- /srv/dev-disk-by-label-1TB/i2p/snark:/snark/config
- /srv/dev-disk-by-label-1TB/i2p/torrents:/snark/downloads
- /srv/dev-disk-by-label-1TB/Music:/Music
networks:
- internal
ports:
- "8002:8002"
environment:
HOST_UID: 1001
HOST_GID: 100
HOSTNAMES: "i2p.lan"
I2CP_HOST: daemon
restart: "on-failure"
logging:
driver: "journald"
muwire:
image: zlatinb/muwire
depends_on:
- daemon
volumes:
- /srv/dev-disk-by-label-1TB/i2p/muwire/config:/muwire/.MuWire
- /srv/dev-disk-by-label-1TB/i2p/muwire/incompletes:/incompletes
- /srv/dev-disk-by-label-1TB/i2p/downloads:/output
- /srv/dev-disk-by-label-1TB/i2p/muwire/xconf:/config
- /srv/dev-disk-by-label-1TB/Music:/mnt/Music
- /srv/dev-disk-by-label-1TB/Video:/mnt/Video
- /srv/dev-disk-by-label-1TB/Series:/mnt/Series
ports:
- "5800:5800"
- "5900:5900"
networks:
- internal
environment:
USER_ID: 1001
GROUP_ID: 100
DISPLAY_WIDTH: 1400
DISPLAY_HEIGHT: 800
restart: "on-failure"
logging:
driver: "journald"
networks:
internal: