Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-hosted <open-vehicle-server v3> as a Docker container ? #21

Open
IamMattM opened this issue Mar 2, 2024 · 8 comments
Open

Self-hosted <open-vehicle-server v3> as a Docker container ? #21

IamMattM opened this issue Mar 2, 2024 · 8 comments

Comments

@IamMattM
Copy link

IamMattM commented Mar 2, 2024

Hi,

I am looking into OVMS for my Ioniq (no EV app), and was wondering if anyone had any suggestions as to how to run the "open-vehicle-server v3" as a docker container ?

I would be looking at running the docker container on a Synology DS920+ NAS , under DSM7.2:
Linux DiskStation 4.4.302+ #69057 SMP Mon Nov 13 14:19:30 CST 2023 x86_64 GNU/Linux synology_geminilake_920+

I must say that I am not a developer/software person but thought to perhaps ask if such a Docker Image had perhaps already been created that would run on platform above ?

I did come across a similarly named docker image called "ovms-server" and thought great !
https://registry.hub.docker.com/r/jkalapati/ovms-server/

however, I don't think it has anything to do with the open-vehicle-server ;-)

I had been hoping to run the "real" open-vehicle-server through Docker, like I do, for example, for the evcc.io server which uses a docker-compose.yaml and volume mounts with docker image available :
https://registry.hub.docker.com/r/evcc/evcc/

and supports vehicles under the ovms template:
https://docs.evcc.io/en/docs/devices/vehicles#open-vehicle-monitoring-system

I have asked evcc.io whether an additional field for a custom url would be possible when trying to make api calls to a self-hosted ovms-server:
evcc-io/evcc#12612

@IamMattM
Copy link
Author

IamMattM commented Mar 20, 2024

@dexterbg

Could a docker container for the server be created easily enough/possible at all ?

I had understood that you hosted the dexters-web.de in the cloud on a VPS and thought that perhaps you already had made use of a containerised version of the server ?

I would be hosting on a personal NAS from Synology and because of the way Synology restricts some of the "services" , the docker route would be the best course of acion for me as the alternative would be a more ressource-heavy VirtualMachine running on the NAS native linux O.S (called DSM)

Thank you for your help.

@markwj
Copy link
Member

markwj commented Mar 21, 2024

I don't think there is any reason a docker implementation could not be built. It would also need access to a mysql (presumably running in another container).

That said:

  1. This is not a standalone install and run server. Somebody needs to implement the connection to the chosen authentication system, and presumably some UI to maintain users/passwords.
  2. There is an example UI and authenticator for Drupal, but that is probably overkill for a single user.
  3. Somebody with an itch to scratch needs to create the docker definitions, and publish them.

Longer term, the v2 server is not the way forward. We are migrating to MQTT, and that will then just need a basic MQTT server.

@IamMattM
Copy link
Author

IamMattM commented Mar 21, 2024

@markwj
Thank you for your reply.

I followed your advice and implemented a TLS-secured mosquitto MQTT broker with username/password authorisation and accessible from the outside.

I will "bridge" this new mosquitto container to my existing local-facing-only Mosquitto container (I did not want to have the same container dealing with both local and public end-points and possibly break things in the process...)

I believe also, that the bridging might offer me some extra degrees of security by only allowing specific topics through the bridge (i.e only the vehicleid specific one. so as ot not make the mistake of exposing my loca-facing only broker to the outside world)

Seems to be working well at first glance...

Just need to figure out how I "plumb" the received MQTT json data into both and <EVCC.io> as for the time being I was using the v2 API integrations to make it work.

Thank you for your pointer.

@markwj
Copy link
Member

markwj commented Mar 22, 2024

Well, I did say that the v2 -> MQTT migration is 'longer term'. But MQTT works today. Just be aware that data usage will be significantly higher than v2 protocol (which is optimised for extremely low data volumes).

@enoch85
Copy link

enoch85 commented Jan 24, 2025

@IamMattM

I was trying to setup a strict small hardened Alpine VM today with V2, but got stuck with Perl modules. I'm sure I can get it working somehow, but reading this made me thinking maybe the better option is to aim for a MQTT server as yourself.

Do you have any notes on how you set it up, just to push me in the right direction? My OVMS V3 module will arrive on Monday.

@IamMattM
Copy link
Author

IamMattM commented Jan 24, 2025

@enoch85

I ended up leaving only the v2 config active in the OVMS box and connecting to dexters-web.de v2 server because of the limited amount of Data it would use as per @markwj recommendations. I am using an Hologram.io SIM for that.

Never got around to understand how to put together a v2 or v3 server in a docker container form,
from the source files...so left it at that.

@enoch85
Copy link

enoch85 commented Jan 26, 2025

@IamMattM Aah I see. Understandable.

I just finished my POC on the V2 server actually: https://www.techandme.se/ovms-open-vehicle-monitoring-system/

I plan to add all of this to the documentation, and in the long run maybe use my connections from other projects and make a docker out of it. We'll see what time allows and what @dexterbg and @markwj says.

This project really got me hooked. It solves a real problem for many car owners.

@IamMattM
Copy link
Author

@enoch85

Wow ! Amazing work.
Hope you get you VW eUP back online with the effort you have put into it.

This OVMS vehicle project is indeed really good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants