Hi, I am trying to setup OMV as a print server. Prefererably through docker, I have seen this page How to create a print Server in OMV and this https://hub.docker.com/r/olbat/cupsd but couldn't figure out how to follow the instruction. I have previously installed plex and qbittorent using the Services-Compose-Files method, but the above seems to be a completely different approach.
How to use OMV as print server?
-
- OMV 6.x
- kampua
-
-
ryecoaaron
Approved the thread. -
use this working cups.yml
Code
Display Morenetworks: my-net: external: true services: cups: container_name: cups networks: my-net: image: olbat/cupsd:latest volumes: - /var/run/dbus:/var/run/dbus:ro - CHANGE_TO_COMPOSE_DATA_PATH/Dockers/cups:/etc/cups ports: - 631:631 restart: unless-stopped
note: my-net is the bridge network that i use on all my dockers so can be resolved by swag, use it or delete apropiate lines like:
-
Thanks I used this code and installed CUPS, but when I pressed the "Up" button and the popup terminal box shows it as started, but the page still shows it as down, and when I try to access http://192.168.50.23:631 it says "This site can't be reached"
-
-
you need to post the logs to see what is faulting.
only thing that i can imagine is that "CHANGE_TO_COMPOSE_DATA_PATH/Dockers/cups" do not have enought privileges to write on it.
-
How do I post a log?
-
-
-
-
Works by deleting this whole line (with path amended):
- CHANGE_TO_COMPOSE_DATA_PATH/Dockers/cups:/etc/cups
If you had the line constructed correctly, it should have worked, as it is just mapping a directory into the container for data persistence. The fact that it is a directory mapping is invisible to the container.
-
To use OpenMediaVault (OMV) as a print server with Docker, you can set up CUPS (Common Unix Printing System) using the Docker image olbat/cupsd. Start by pulling the Docker image with the command docker pull olbat/cupsd. Then, create a Docker Compose file similar to what you used for Plex and qBittorrent. Include necessary configurations for CUPS like port mapping (e.g., 631:631 for web interface access) and volume mapping for persistent data. Once the Compose file is ready, deploy it through OMV’s Services > Compose section, and access the CUPS web interface to configure printers.
-
-
You should also add usb into your Volume section of the compose file to add an USB printer.
Also having /etc/cups as a volumes make sense, otherwise you have to add your printer after every container restart
-
Hi, on the old instance I've used cups directly installed on the omv/debian, but this made some mess in logs, etc
So as I'm doing everything from zero (fail of the disk), I probably also would prefer to do this via CUPS in docker, to have it isolated
But I have HP1005 (old HP printer, very good stuff) for which I need to do in the system some nasty things (like installing hplips, foo drivers, etc)
It can be done also in docker installaiton?
-
It can be done also in docker installaiton?
yes, but you need to define a writable path like described on post #4
-
-
yes, but you need to define a writable path like described on post #4
This is clear and obvious, as for any other docker (or most) persistant volume is needed.
I rather thinking of how to install those additional packages to not loose them - as they will not be stored on this volume I think.
-
Hi, on the old instance I've used cups directly installed on the omv/debian, but this made some mess in logs, etc
So as I'm doing everything from zero (fail of the disk), I probably also would prefer to do this via CUPS in docker, to have it isolated
But I have HP1005 (old HP printer, very good stuff) for which I need to do in the system some nasty things (like installing hplips, foo drivers, etc)
It can be done also in docker installaiton?
Have look at this docker image of cups
it has most of the stuff you need already included.
-
Have look at this docker image of cups
it has most of the stuff you need already included.
I'm trying to install it using following compose but it looks it is not starting at all
In portainer is described as "running", but there is nothing in "ports" to click and open GUI and also port 631 is not used anyway, also logs are empty.
Code
Display More--- networks: apps_default: external: true services: cups: container_name: cups image: olbat/cupsd:latest networks: - apps_default ports: - 631:631 volumes: - /var/run/dbus:/var/run/dbus:ro - ${CONTAINERS_DATA}/cups/:/etc/cups restart: unless-stopped
Of course path for variable CONTAINERS_DATa is correct
Logs of container are empty:
Any ideas what's going on?
Above 30docker apps installed without problems, but this one, which looks like piece of cake, doesn't work
edit:// fixed by puting .conf file into the persistant volume, as with it, cups is not creating it with first start.
Now it works, but is not finding my printer - I added devices by:
-
-
Try to plugin and switch on your printer first.
Then start the container.
You should then find your printer.
Hope that helps
-
Nope, it was needed to run it with --privileged flag
After that it discover my printer, but it can't be used for my case, as this not container hp-plugin which is needed for my device.
Looks that will not be possible for me to use this docker app
-
As I couldn't solve issue with hp-plugin on docker image of CUPS, I decided to put CUPS in my LXC container, used for another purpose.
After configuration, I works like a charm, but unfortunately when I switch off my printer and container needs to reboot (for example after power break) it can't, becuase of issue with missing USB device
My config for the USB is:
Code<hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x03f0'/> <product id='0x3d17'/> </source> </hostdev>
Error output:
CodeUnable to - poweroninternal error: Did not find USB device 03f0:3d17 OMV\Exception: Unable to - poweroninternal error: Did not find USB device 03f0:3d17 in /usr/share/openmediavault/engined/rpc/kvm.inc:2606 Stack trace: #0 [internal function]: OMVRpcServiceKvm->doCommand() #1 /usr/share/php/openmediavault/rpc/serviceabstract.inc(122): call_user_func_array() #2 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod() #3 /usr/sbin/omv-engined(544): OMV\Rpc\Rpc::call() #4 {main}
Is it possible somehow to make this USB as "optional" so the LXC will start no matter is the USB device is present or not?
-
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!