# docker-i2psnark I2P Snark standalone Docker image ## Usage You can start the container like this: ```bash docker volume create i2psnark_state docker run --restart=unless-stopped -d --name=i2psnark \ -v /my/torrents/path:/snark/downloads \ -v i2psnark_state:/snark/config \ -e I2CP_HOST="172.17.0.1" \ ypopovych/i2psnark ``` The container needs a volume to cache some data and save config. In the example above a Docker volume is used for that. You can also map the cache to some host folder. ## Configuration You can configure the container using the following environment variables: | Environment Variable | Description | Default Value | | ------------- | ------------- | ------------- | | `I2CP_HOST` | REQUIRED!. I2P instance host. Can be internal docker ip from bridge netwok or container name. | `""` | | `I2CP_PORT` | I2CP interface port on I2P host. | `7654` | | `HOSTNAMES` | Hostnames allowed for Web UI. Comma separated list. | `""` | | `HOST_UID` | UID of the host user from which i2psnark will be run. | `1000` | | `HOST_GID` | GID of the host group from which i2psnark will be run. | `1000` | `i2psnark.conf` file can be found in the configuration volume of the container. Or from the Web UI. ## Supported Architectures The following Docker architectures are supported: `linux/arm64`, `linux/arm/v7` and `linux/amd64` ## Docker Compose with PurpleI2P/i2pd ```yml version: "3.9" services: daemon: image: purplei2p/i2pd:latest volumes: - daemon_state:/home/i2pd/data # where to save i2pd data networks: - internal ports: - "4444:4444" # http proxy - "4447:4447" # socks proxy - "7070:7070" # web ui - "12345:12345" # port for incoming connections. Should be set in i2pd.conf file - "12345:12345/udp" # udp port for incoming connections. Should be set in i2pd.conf file restart: "on-failure" ulimits: nofile: soft: 30000 hard: 40000 snark: image: ypopovych/i2psnark:latest depends_on: - daemon volumes: - snark_state:/snark/config - /path/to/host/downloads:/snark/downloads networks: - internal ports: - "8002:8002" # web ui environment: HOST_UID: 1000 # host user which will be used for downloaded torrent files HOST_GID: 1000 # host group which will be used for downloaded torrent files HOSTNAMES: "" # add your hostnames/IPs if you use it from network (not a localhost) I2CP_HOST: daemon # name of "daemon" container restart: "on-failure" networks: internal: volumes: snark_state: daemon_state: ```