πͺNomie API Server
In order to enable the API capability, a server is needed to store the entries send to the api until the Nomie app on your device pulled the data into Nomie.
As Nomie is fully Open Source and aimed for self hosting, you should preferably setup your own little private API server.
If you do not want to self host an API Server, you can try to use api.dailynomie.com as your api server. It is hosted by me, on best effort and as long as it can cope with the load.
Installing the server
My instantiation of the server is build with Node Red and can be deployed in many ways. You can find the source code at:
https://github.com/RdeLange/nomie-server-api
The most easy way of deploying the server is via a docker container. It can -for instance- be hosted on your Synology Nas.
The Docker image is available at: ghcr.io/rdelange/nomie-server-api:main
An example of deployment stack is as follows:
version: '3' services: s4eapiserver: image: ghcr.io/rdelange/nomie-server-api:main container_name: dailynomie-apiserver-docker volumes: - /volume1/docker/nomieapiserver:/home ports: - "1880:1880"
where the volumes line points to a directory on your server to persist data.
More installation instructions can be found following above link to the Nomie API Server GitHub page.
Using the Server
You can reach the server GUI by using your domain, followed by /ui (example: https://api.mydomain.com/ui)
You will be provided with the following screen:
The default login codes are given in above introduction screen, please change them immediately to prevent easy login by others…..
Change your credentials
You can chage your credentials by logging in with the default credentials via the Log In option at the menu at the left top corner:
Once you have changed your credentials and logged on again with your new password, you can enter the server dashboard by choosing the API Management option in the menu.
The API Server Dashboard
The API server dashboard consists of 2 sections:
- Managing the registered keys
- Managing the pending logs
For both sections you have the option to create the backend database table. When everything is running fine you should not have to use this option as the databases are automatically setup when the server is deployed.
You can remove individual keys or flush all keys which are not used for longer then a month.
For the pending logs you have the option to flush them all or only the logs older then a Month.
In the future I might add some additional management options, but as the server is intended to be self hosted for you / your family / your friends, these simple options should be enough.
Managing accounts
If you want to co-manage the server with somebody else, you have the option to give other users access to the server. You can do this via the account section in the menu.
Please be aware that this is a very simple implementation of account management. It works, but as this server is intended to be privately hosted with limitted usage and workload it is not likely that this section will be further developped in the future.
Why Node-Red
I mentioned above that this server is build using Node-Red. I am fully aware that there are much better ways of implementing the same functionality, but I like to experiment and learn…and this was one of these journies.
Have fun with it!