Mount USB HDD - Balena OS

Hi everyone,

I tried following your instructions.
I pushed whole folder balena-deluge-wifi into my app.

Altough I’m not able to access Deluge WebUI -> http://ipaddress:81112

Do you know why?

This is Deluge dockerfile:
FROM lsiobase/ubuntu:bionic

set version label

ARG BUILD_DATE
ARG VERSION
LABEL build_version=“Linuxserver.io version:- {VERSION} Build-date:- {BUILD_DATE}”
LABEL maintainer=“aptalca”

environment variables

ARG DEBIAN_FRONTEND=“noninteractive”
ENV PYTHON_EGG_CACHE="/config/plugins/.python-eggs"

install software

RUN
echo "**** add repositories " &&
apt-get update &&
apt-get install -y
gnupg &&
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C5E6A5ED249AD24C &&
echo “deb http://ppa.launchpad.net/deluge-team/stable/ubuntu bionic main” >>
/etc/apt/sources.list.d/deluge.list &&
echo “deb-src http://ppa.launchpad.net/deluge-team/stable/ubuntu bionic main” >>
/etc/apt/sources.list.d/deluge.list &&
echo "
install packages " &&
apt-get update &&
apt-get install -y
deluged
deluge-console
deluge-web
python3-future
python3-requests
p7zip-full
unrar
unzip &&
echo "
cleanup *" &&
rm -rf
/tmp/

/var/lib/apt/lists/

/var/tmp/

add local files

COPY root/ /

ports and volumes

EXPOSE 8112 58846 58946 58946/udp
VOLUME /config /downloads

Enable udev for detection of dynamically plugged devices

ENV UDEV=on

Hey there - looks like you’re making progress! We’re obviously happy to help you get up and running, but the best way to help is to guide your learning and make sure we don’t just do it for you. This way you learn how it works, which will help you for any future projects! :wink:

I think the next piece of your puzzle, is to read about networking in multicontainer applications:

You’ll see there that you need to decide which network mode your containers need, and expose any necessary ports, in the docker-compose file.

Keep going, it looks like you’re getting close.

Phil

I tried reading other forums but I always get “Connection refused” when accessing Deluge WebUI

Can you please help me?

Have you exposed the necessary port in your docker-compose file? In the networking doc mentioned earlier in the thread, note that “Multicontainer applications use a user-defined bridge network by default. No ports are exposed to the host and must be explicitly enabled through the ports keyword.” So in the deluge section of your docker-compose file, you’d need something like:

ports:
      - "8112:8112"

(Assuming the port is 8112. In your previous post you show an address of http://ipaddress:81112 but 81112 is probably an invalid port number; they are usually no higher than 65535, so please check for a typo. From what I’ve seen, the Deluge UI is on port 58846 so I would try exposing that.) Just to confirm, are you substituting the IP address of your device for ipaddress in the browser?

I can’t manage to make it start :frowning:

This is my docker-compose.yml:

version: “2.1”

services:
wifi-repeater:
restart: always
build: ./wifi-repeater-master
privileged: true
labels:
io.balena.features.dbus: ‘1’

docker-deluge:
restart: always
build: ./docker-deluge-master
privileged: true
ports:
- “58846:58846”

This is docker-deluge-master\Dockerfile:

FROM lsiobase/ubuntu:bionic

set version label

ARG BUILD_DATE
ARG VERSION
LABEL build_version=“Linuxserver.io version:- {VERSION} Build-date:- {BUILD_DATE}”
LABEL maintainer=“aptalca”

environment variables

ARG DEBIAN_FRONTEND=“noninteractive”
ENV PYTHON_EGG_CACHE="/config/plugins/.python-eggs"

install software

RUN
echo "**** add repositories " &&
apt-get update &&
apt-get install -y
gnupg &&
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C5E6A5ED249AD24C &&
echo “deb http://ppa.launchpad.net/deluge-team/stable/ubuntu bionic main” >>
/etc/apt/sources.list.d/deluge.list &&
echo “deb-src http://ppa.launchpad.net/deluge-team/stable/ubuntu bionic main” >>
/etc/apt/sources.list.d/deluge.list &&
echo "
install packages " &&
apt-get update &&
apt-get install -y
deluged
deluge-console
deluge-web
python3-future
python3-requests
p7zip-full
unrar
unzip &&
echo "
cleanup *" &&
rm -rf
/tmp/

/var/lib/apt/lists/

/var/tmp/

add local files

COPY root/ /

ports and volumes

EXPOSE 80 58846 58946 58946/udp
VOLUME /config /downloads

ENV UDEV=on

Hey. What is the situation right now? By “can’t manage to make it start”, do you mean that the deluge is not accessible on port 58846? Do you see the docker-deluge service as up and running in the dashboard? If not, what are the errors you encounter along the way?

I tried to set the ports correctly and in the dashboard both the services seems to run correcty
but when I enter in browser http://myipaddress:webguiport I get “ERR_CONNECTION_REFUSED”.

This are two projects I am using:


I don’t know if deluge has some strange settings on its configuration files,
cause wifi-repeater project works correctly!

hey there,
based on this

The admin interface is available at http://SERVER-IP:8112 with a default user/password of admin/deluge.

it seems like the admin interface is listening on port 8112
Can you please try exposing the port in your docker compose file like this:

version: "2.1"

services:
wifi-repeater:
restart: always
build: ./wifi-repeater-master
privileged: true
labels:
io.balena.features.dbus: '1'

docker-deluge:
restart: always
build: ./docker-deluge-master
privileged: true
ports:
- "58846:58846"
- "8112:8112"

You should definitely check out our documentation linked in this thread

Hope this helps
Thanks

Great, it worked!

I downloaded too this project ( Mounting external storage media) to try and learn how to map my external USB HDD to Deluge:

A project I’ve found is messing me up, so the procedure described in the article where do I have to insert them? Do I have to create any folder? Any file?

Thanks

Hi @virtus96

Glad to hear that your previous issue has been resolved!

I’m not exactly sure what you’re asking - are you referring to the instructions under Mounting external storage media? I see that there are instructions there to edit docker-compose.yml and Dockerfile for example. Can you perhaps clarify which part of the procedure is not clear?

Thanks, and kind regards
Alida

The section regarding auto-mount is for me unclear.
I mean,which are the steps?

Hi,

In order to setup automounting, you first need to create a usb.rules files with the specified UDev configuration and copy it to the container during the build. Maybe the following example can clarify the procedure?

Let us know if that helps you
Felipe

Oh damn! Ho do I delete services?? I tried purge data but nothing!

I can’t find anywhere how to delete services.

Hi again,

You cannot explicitely delete a service but if you push a new release it will update the service configuration on the device. For example if you have a release with two services ‘a’ and ‘b’ and you push a new release with just the service ‘a’, the device will know to delete the service b on the next update.

For info about pushing new releases see here

What about if I want to delete one project to clean push a new one?

Hi there – you can push any set of code to a balena Application; it will just overwrite whatever is there previously. This is the simplest way to go if you don’t have many devices. Alternately, you can find info on deleting an application on this page: https://www.balena.io/docs/learn/manage/actions/

Thanks,
Hugh