I found it in `/var/lib/docker/volumes/potato-mesh_potatomesh_data/_data/mesh.db`
_Originally posted by @varna9000 in https://github.com/l5yth/potato-mesh/pull/316#discussion_r2430232007_
<!-- github-sync-id:3515290696 -->
~/potato-mesh$ docker compose up web
Attaching to web-1
web-1 | /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/resultset.rb:100:in `step': UNIQUE constraint failed: instances.domain (SQLite3::ConstraintException)
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/resultset.rb:100:in `next'
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/resultset.rb:125:in `each'
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/database.rb:230:in `to_a'
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/database.rb:230:in `block in execute'
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/database.rb:181:in `prepare'
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/database.rb:221:in `execute'
web-1 | from /app/lib/potato_mesh/application/federation.rb:489:in `block in upsert_instance_record'
web-1 | from /app/lib/potato_mesh/application/database.rb:41:in `with_busy_retry'
web-1 | from /app/lib/potato_mesh/application/federation.rb:488:in `upsert_instance_record'
web-1 | from /app/lib/potato_mesh/application/federation.rb:72:in `ensure_self_instance_record!'
web-1 | from /app/lib/potato_mesh/application.rb:132:in `block in <class:Application>'
web-1 | from /usr/local/bundle/gems/sinatra-4.2.1/lib/sinatra/base.rb:1582:in `configure'
web-1 | from /app/lib/potato_mesh/application.rb:108:in `<class:Application>'
web-1 | from /app/lib/potato_mesh/application.rb:56:in `<module:PotatoMesh>'
web-1 | from /app/lib/potato_mesh/application.rb:55:in `<top (required)>'
web-1 | from app.rb:15:in `require_relative'
web-1 | from app.rb:15:in `<main>'
web-1 exited with code 1 (restarting)
Looks like something is wrong with the domain row in the table. I've set DOMAIN_INSTANCE in the .env file to my domain and initially it worked. Then this happened overnight and it's now not starting at all, just keep repeating this error.
Might be connected to the same issue
```
~/potato-mesh$ docker compose up web
Attaching to web-1
web-1 | /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/resultset.rb:100:in `step': UNIQUE constraint failed: instances.domain (SQLite3::ConstraintException)
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/resultset.rb:100:in `next'
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/resultset.rb:125:in `each'
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/database.rb:230:in `to_a'
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/database.rb:230:in `block in execute'
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/database.rb:181:in `prepare'
web-1 | from /usr/local/bundle/gems/sqlite3-1.7.3/lib/sqlite3/database.rb:221:in `execute'
web-1 | from /app/lib/potato_mesh/application/federation.rb:489:in `block in upsert_instance_record'
web-1 | from /app/lib/potato_mesh/application/database.rb:41:in `with_busy_retry'
web-1 | from /app/lib/potato_mesh/application/federation.rb:488:in `upsert_instance_record'
web-1 | from /app/lib/potato_mesh/application/federation.rb:72:in `ensure_self_instance_record!'
web-1 | from /app/lib/potato_mesh/application.rb:132:in `block in <class:Application>'
web-1 | from /usr/local/bundle/gems/sinatra-4.2.1/lib/sinatra/base.rb:1582:in `configure'
web-1 | from /app/lib/potato_mesh/application.rb:108:in `<class:Application>'
web-1 | from /app/lib/potato_mesh/application.rb:56:in `<module:PotatoMesh>'
web-1 | from /app/lib/potato_mesh/application.rb:55:in `<top (required)>'
web-1 | from app.rb:15:in `require_relative'
web-1 | from app.rb:15:in `<main>'
web-1 exited with code 1 (restarting)
```
Looks like something is wrong with the domain row in the table. I've set `DOMAIN_INSTANCE` in the .env file to my domain and initially it worked. Then this happened overnight and it's now not starting at all, just keep repeating this error.
<!-- github-comment-id:3404497999 -->
I opened the sql database and it turned out that the app recorded two domains in the instances.domain table. Because of reverse DNS (I'm behind mDNS vpn) it recorded also the local dns resolved name. As it appears the error shows because there should be only one unique row in the domain table
I've removed the second entry and the app is now up and running again. The problem with the location of the DB when using docker is still valid though.
PS: I ran the ./configure script few times, this might be also the reason. It's good idea to check if there's already a domain in the table before creating new entry.
I opened the sql database and it turned out that the app recorded **two** domains in the instances.domain table. Because of reverse DNS (I'm behind mDNS vpn) it recorded also the local dns resolved name. As it appears the error shows because there should be only one unique row in the domain table
I've removed the second entry and the app is now up and running again. The problem with the location of the DB when using docker is still valid though.
PS: I ran the ./configure script few times, this might be also the reason. It's good idea to check if there's already a domain in the table before creating new entry.
<!-- github-comment-id:3404521532 -->
I'm actually just trying to set it up again but the ingestor is giving me 403 Forbidden on the POST requests e.g [warn] POST https://potato.varna.radio/api/messages failed: HTTP Error 403: Forbidden
I've put the API key in .env and also I'm passing it to the env of the ingestor, but not sure where is the problem. I can see the map online but it's empty.
EDIT: OK this is weird. Despite I've put INSTANCE_DOMAIN=potato.varna.radio in .env, it still tries to reverse dns the wrong domain. This might be the problem with the 403. What's the right way to tell the container the domain to listen to?
EDIT 2: I can't find a way to pass INSTANCE_DOMAIN=potato.varna.radio to the container. I'm looking at the debug messages. It always does reverse dns to the wrong local VPN domain I have.
@l5yth , sorry forgot to tag you here.
I'm actually just trying to set it up again but the ingestor is giving me 403 Forbidden on the POST requests e.g
`[warn] POST https://potato.varna.radio/api/messages failed: HTTP Error 403: Forbidden`
I've put the API key in .env and also I'm passing it to the env of the ingestor, but not sure where is the problem. I can see the map online but it's empty.
EDIT: OK this is weird. Despite I've put INSTANCE_DOMAIN=potato.varna.radio in .env, it still tries to reverse dns the wrong domain. This might be the problem with the 403. What's the right way to tell the container the domain to listen to?
EDIT 2: I can't find a way to pass INSTANCE_DOMAIN=potato.varna.radio to the container. I'm looking at the debug messages. It always does reverse dns to the wrong local VPN domain I have.
@l5yth , sorry forgot to tag you here.
<!-- github-comment-id:3408179343 -->
Damn that Docker... You can clearly see I'm not using Docker. :(
It's late here, I'll try to have a patch by tomorrow.
Damn that Docker... You can clearly see I'm not using Docker. :(
It's late here, I'll try to have a patch by tomorrow.
<!-- github-comment-id:3408315228 -->
If you make detailed instructions for Ruby installation, I won't bother you with docker anymore 😂 I don't like it much myself, but for this app I have no choice.
If you make detailed instructions for Ruby installation, I won't bother you with docker anymore 😂 I don't like it much myself, but for this app I have no choice.
<!-- github-comment-id:3409359156 -->
It's in the readme:
https://github.com/l5yth/potato-mesh?tab=readme-ov-file#web-app
Install `ruby` package from your package manager (homebrow, apt, pacman, etc...)
Then do install deps:
```
git clone https://github.com/l5yth/potato-mesh.git
cd potato-mesh/web
gem install sinatra sqlite3 rackup puma rspec rack-test rufo prometheus-client
bundle install
```
And then just run in _production_:
```
RACK_ENV="production" APP_ENV="production" API_TOKEN="SuperSecureTokenReally" INSTANCE_DOMAIN="https://example.com" ./app.sh
```
Don't forget to add the other variables such as name and map center to the command.
You can even add them to the app.sh, like that:
```
#!/usr/bin/env bash
set -euo pipefail
export SITE_NAME="My Meshtastic Network"
export CHANNEL="#LongFast"
export FREQUENCY="915MHz"
export MAP_CENTER="38.761944,-27.090833"
export MAX_DISTANCE="42"
export CONTACT_LINK='#potatomesh:dod.ngo'
export RACK_ENV="production"
export APP_ENV="production"
export API_TOKEN="SuperSecureTokenReally"
export INSTANCE_DOMAIN="https://example.com"
bundle install
exec ruby app.rb -p 41447 -o 0.0.0.0
```
<!-- github-comment-id:3409886788 -->
Yeah, is not that simple. This is what I meant in my comment. I'm using Debian.
Fetching nio4r-2.7.4.gem
Building native extensions. This could take a while...
ERROR: Error installing puma:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/3.1.0/gems/nio4r-2.7.4/ext/nio4r
/usr/bin/ruby3.1 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20251016-1676252-4i5w01.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Fetching sqlite3-2.7.4.gem
Successfully installed mini_portile2-2.8.9
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/3.1.0/gems/sqlite3-2.7.4/ext/sqlite3
/usr/bin/ruby3.1 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20251016-1676252-nvvhsf.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/3.1.0/gems/sqlite3-2.7.4 for inspection.
Results logged to /var/lib/gems/3.1.0/extensions/x86_64-linux/3.1.0/sqlite3-2.7.4/gem_make.out
and after in the suggestion to install ruby-dev package:
/var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:603:in `spawn': No such file or directory
- make (Errno::ENOENT)
from /var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:603:in `block in execute'
from /var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:594:in `chdir'
from /var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:594:in `execute'
from /var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:195:in `compile'
from /var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:238:in `cook'
from extconf.rb:74:in `block in configure_packaged_libraries'
from <internal:kernel>:90:in `tap'
from extconf.rb:51:in `configure_packaged_libraries'
from extconf.rb:17:in `configure'
from extconf.rb:297:in `<main>'
extconf failed, exit code 1
and
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/3.1.0/gems/sqlite3-2.7.4/ext/sqlite3
/usr/bin/ruby3.1 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20251016-1676936-s0yf72.rb extconf.rb
Building sqlite3-ruby using packaged sqlite3.
Extracting sqlite-autoconf-3500400.tar.gz into tmp/x86_64-linux-gnu/ports/sqlite3/3.50.4... OK
Running 'configure' for sqlite3 3.50.4... OK
Running 'compile' for sqlite3 3.50.4... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Yeah, is not that simple. This is what I meant in my comment. I'm using Debian.
```
Fetching nio4r-2.7.4.gem
Building native extensions. This could take a while...
ERROR: Error installing puma:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/3.1.0/gems/nio4r-2.7.4/ext/nio4r
/usr/bin/ruby3.1 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20251016-1676252-4i5w01.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
```
```
Fetching sqlite3-2.7.4.gem
Successfully installed mini_portile2-2.8.9
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/3.1.0/gems/sqlite3-2.7.4/ext/sqlite3
/usr/bin/ruby3.1 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20251016-1676252-nvvhsf.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/3.1.0/gems/sqlite3-2.7.4 for inspection.
Results logged to /var/lib/gems/3.1.0/extensions/x86_64-linux/3.1.0/sqlite3-2.7.4/gem_make.out
```
and after in the suggestion to install ruby-dev package:
```
/var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:603:in `spawn': No such file or directory
- make (Errno::ENOENT)
from /var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:603:in `block in execute'
from /var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:594:in `chdir'
from /var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:594:in `execute'
from /var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:195:in `compile'
from /var/lib/gems/3.1.0/gems/mini_portile2-2.8.9/lib/mini_portile2/mini_portile.rb:238:in `cook'
from extconf.rb:74:in `block in configure_packaged_libraries'
from <internal:kernel>:90:in `tap'
from extconf.rb:51:in `configure_packaged_libraries'
from extconf.rb:17:in `configure'
from extconf.rb:297:in `<main>'
extconf failed, exit code 1
```
and
```
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/3.1.0/gems/sqlite3-2.7.4/ext/sqlite3
/usr/bin/ruby3.1 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20251016-1676936-s0yf72.rb extconf.rb
Building sqlite3-ruby using packaged sqlite3.
Extracting sqlite-autoconf-3500400.tar.gz into tmp/x86_64-linux-gnu/ports/sqlite3/3.50.4... OK
Running 'configure' for sqlite3 3.50.4... OK
Running 'compile' for sqlite3 3.50.4... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
```
<!-- github-comment-id:3409934380 -->
Oh, bummer. Debian is really a pain to deal with. I'm sorry. There is not much guidance I can give except for never using Debian in future anymore lol, but that won't help you.
In that case, Docker is indeed you best option.
Oh, bummer. Debian is really a pain to deal with. I'm sorry. There is not much guidance I can give except for never using Debian in future anymore lol, but that won't help you.
In that case, Docker is indeed you best option.
<!-- github-comment-id:3410344292 -->
Nevertheless I still get 403 on POST requests and I'm pretty sure the API key is the same on both web and the ingestor 😩
Can you give me an example in curl for a valid POST request so I can troubleshoot on my side?
I managed to run the app natively on Debian 🎉 Here are all other things I had to install:
1. `sudo apt install ruby ruby-dev build-essential pkg-config`
2. `gem install sinatra sqlite3 rackup puma rspec rack-test rufo prometheus-client`
3. `gem install bundler`
Nevertheless I still get 403 on POST requests and I'm pretty sure the API key is the same on both web and the ingestor 😩
Can you give me an example in curl for a valid POST request so I can troubleshoot on my side?
<!-- github-comment-id:3410650758 -->
It made an empty node, put at least I know that post works.
The API key is the same as in the environment variable, but the ingestor can't make POSTS where with the above curl query it clearly works. Not sure if only I have this problem. I'll have to dig into the python code and see what causes this.
Sorry to pollute this tread but with this curl request, I was able to post info to the web app:
```
curl -X "POST" "https://potato.varna.radio/api/nodes" \
-H 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"node": "cc00ffee"
}'
```
It made an empty node, put at least I know that post works.
<img width="413" height="149" alt="Image" src="https://github.com/user-attachments/assets/e4950172-1755-4563-9829-3bcd00164dfe" />
The API key is the same as in the environment variable, but the ingestor can't make POSTS where with the above curl query it clearly works. Not sure if only I have this problem. I'll have to dig into the python code and see what causes this.
<!-- github-comment-id:3410796356 -->
So you got the app running on bare metal. Are you still running the ingestor on Docker? I sense that it might post to a stale machine. Can you double check?
Running the ingestor is even easier, just do API_TOKEN="foo" POTATOMESH_INSTANCE="https://bar ./mesh.sh
So you got the app running on bare metal. Are you still running the ingestor on Docker? I sense that it might post to a stale machine. Can you double check?
Running the ingestor is even easier, just do `API_TOKEN="foo" POTATOMESH_INSTANCE="https://bar ./mesh.sh`
<!-- github-comment-id:3411368318 -->
I run the ingestor on separate machine, connected to a node with serial. I just cloned the project there, installed virtual environment in data/ directory and run the ingestor from there. No docker, just python.
I run the `ingestor` on separate machine, connected to a node with serial. I just cloned the project there, installed virtual environment in data/ directory and run the ingestor from there. No docker, just python.
<!-- github-comment-id:3411382726 -->
The web app is behind Cloudflare sub domain.
EDIT: They do some proxying, and the server ip is not publicly shown, only the cloudflare one. If you get the real server ip (from within the web app) and reverse dns to the domain, there might be a problem.
The web app is behind Cloudflare sub domain.
EDIT: They do some proxying, and the server ip is not publicly shown, only the cloudflare one. If you get the real server ip (from within the web app) and reverse dns to the domain, there might be a problem.
<!-- github-comment-id:3411451799 -->
I can't make the ingestor to make the posts. I've debugged the python file and literally cloned the post request attributes (headers and payload) to a Curl request. With Curl it works perfectly - with the ingestor - it doesn't.
Wasted few hours trying to debug this but I'm going back to 0.3.0 - the last version which worked ok.
I give up.
```
[2025-10-16T16:18:14.474Z] [potato-mesh] [info] context=daemon.interface target='/dev/serial0' Using mesh interface
[2025-10-16T16:18:34.958Z] [potato-mesh] [warn] context=queue.post_json error_class='HTTPError' error_message='HTTP Error 403: Forbidden' url='https://potato.varna.radio/api/nodes' POST request failed
```
I can't make the ingestor to make the posts. I've debugged the python file and literally cloned the post request attributes (headers and payload) to a Curl request. With Curl it works perfectly - with the ingestor - it doesn't.
Wasted few hours trying to debug this but I'm going back to 0.3.0 - the last version which worked ok.
<!-- github-comment-id:3411675188 -->
What is the app saying? You should see the 403 also on the app side. Can you run the app with DEBUG=1 and tell if you see it emitting 403s?
Are you sure Cloudflare is not blocking the script?
What is the app saying? You should see the 403 also on the app side. Can you run the app with DEBUG=1 and tell if you see it emitting 403s?
Are you sure Cloudflare is not blocking the script?
<!-- github-comment-id:3411827962 -->
I just downgraded to v0.3.0 and the 403 is also there. This is the log from v.0.3.0 ingestor with debug=1. It is the same amount of info in 0.5.1-rc ingestor too.
This is getting frustrated. You might be right. I'll look on the Cloudflare side...
[warn] POST https://potato.varna.radio/api/nodes failed: HTTP Error 403: Forbidden
I just downgraded to v0.3.0 and the 403 is also there. This is the log from v.0.3.0 ingestor with debug=1. It is the same amount of info in 0.5.1-rc ingestor too.
This is getting frustrated. You might be right. I'll look on the Cloudflare side...
```
[warn] POST https://potato.varna.radio/api/nodes failed: HTTP Error 403: Forbidden
```
<!-- github-comment-id:3411846701 -->
I guess I'll pull the latest version again and try :)
🤬😡🤬 Cloudflare!!! The headers of ingestor's POST requests are very minimal and Cloudflare seems to not like them hence blocked all its requests.
We need to add [HERE](https://github.com/l5yth/potato-mesh/blob/81335cbf7b33a3f571796f8aa95335f5203a64bf/data/mesh_ingestor/queue.py#L76) more headers.
This is working fine:
```
req = urllib.request.Request(
url,
data=data,
headers={
"Content-Type": "application/json",
"Authorization": f"Bearer {API_TOKEN}",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Accept": "application/json",
"Accept-Language": "en-US,en;q=0.9",
"Origin": "https://potato.varna.radio",
"Referer": "https://potato.varna.radio/"
}
)
```
I guess I'll pull the latest version again and try :)
<!-- github-comment-id:3412068240 -->
It's live on our instance now. Let's see how it behaves tonight and I will drop a comment if I see something unusual.
It's live on our instance now. Let's see how it behaves tonight and I will drop a comment if I see something unusual.
<!-- github-comment-id:3412797113 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I found it in
/var/lib/docker/volumes/potato-mesh_potatomesh_data/_data/mesh.dbOriginally posted by @varna9000 in https://github.com/l5yth/potato-mesh/pull/316#discussion_r2430232007
Might be connected to the same issue
Looks like something is wrong with the domain row in the table. I've set
DOMAIN_INSTANCEin the .env file to my domain and initially it worked. Then this happened overnight and it's now not starting at all, just keep repeating this error.I opened the sql database and it turned out that the app recorded two domains in the instances.domain table. Because of reverse DNS (I'm behind mDNS vpn) it recorded also the local dns resolved name. As it appears the error shows because there should be only one unique row in the domain table
I've removed the second entry and the app is now up and running again. The problem with the location of the DB when using docker is still valid though.
PS: I ran the ./configure script few times, this might be also the reason. It's good idea to check if there's already a domain in the table before creating new entry.
Yeah, sorry for that. I'll have a patch release ready by end of day.
Should be fixed in https://github.com/l5yth/potato-mesh/releases/tag/v0.5.1 @varna9000
I'm actually just trying to set it up again but the ingestor is giving me 403 Forbidden on the POST requests e.g
[warn] POST https://potato.varna.radio/api/messages failed: HTTP Error 403: ForbiddenI've put the API key in .env and also I'm passing it to the env of the ingestor, but not sure where is the problem. I can see the map online but it's empty.
EDIT: OK this is weird. Despite I've put INSTANCE_DOMAIN=potato.varna.radio in .env, it still tries to reverse dns the wrong domain. This might be the problem with the 403. What's the right way to tell the container the domain to listen to?
EDIT 2: I can't find a way to pass INSTANCE_DOMAIN=potato.varna.radio to the container. I'm looking at the debug messages. It always does reverse dns to the wrong local VPN domain I have.
@l5yth , sorry forgot to tag you here.
Damn that Docker... You can clearly see I'm not using Docker. :(
It's late here, I'll try to have a patch by tomorrow.
If you make detailed instructions for Ruby installation, I won't bother you with docker anymore 😂 I don't like it much myself, but for this app I have no choice.
It's in the readme:
https://github.com/l5yth/potato-mesh?tab=readme-ov-file#web-app
Install
rubypackage from your package manager (homebrow, apt, pacman, etc...)Then do install deps:
And then just run in production:
Don't forget to add the other variables such as name and map center to the command.
You can even add them to the app.sh, like that:
Yeah, is not that simple. This is what I meant in my comment. I'm using Debian.
and after in the suggestion to install ruby-dev package:
and
Oh, bummer. Debian is really a pain to deal with. I'm sorry. There is not much guidance I can give except for never using Debian in future anymore lol, but that won't help you.
In that case, Docker is indeed you best option.
I managed to run the app natively on Debian 🎉 Here are all other things I had to install:
sudo apt install ruby ruby-dev build-essential pkg-configgem install sinatra sqlite3 rackup puma rspec rack-test rufo prometheus-clientgem install bundlerNevertheless I still get 403 on POST requests and I'm pretty sure the API key is the same on both web and the ingestor 😩
Can you give me an example in curl for a valid POST request so I can troubleshoot on my side?
Sorry to pollute this tread but with this curl request, I was able to post info to the web app:
It made an empty node, put at least I know that post works.
The API key is the same as in the environment variable, but the ingestor can't make POSTS where with the above curl query it clearly works. Not sure if only I have this problem. I'll have to dig into the python code and see what causes this.
So you got the app running on bare metal. Are you still running the ingestor on Docker? I sense that it might post to a stale machine. Can you double check?
Running the ingestor is even easier, just do
API_TOKEN="foo" POTATOMESH_INSTANCE="https://bar ./mesh.shI run the
ingestoron separate machine, connected to a node with serial. I just cloned the project there, installed virtual environment in data/ directory and run the ingestor from there. No docker, just python.[2025-10-16T11:51:12.067Z] [potato-mesh] [warn] context=ingest.register domain="potato.varna.radio" reason="domain mismatch" Instance registration rejected
(IP) - - [16/Oct/2025:13:51:12 +0200] "POST /api/instances HTTP/1.0" 400 - 0.2053
Here is the federation log btw. Not sure why we get a domain mismatch.
The web app is behind Cloudflare sub domain.
EDIT: They do some proxying, and the server ip is not publicly shown, only the cloudflare one. If you get the real server ip (from within the web app) and reverse dns to the domain, there might be a problem.
I give up.
I can't make the ingestor to make the posts. I've debugged the python file and literally cloned the post request attributes (headers and payload) to a Curl request. With Curl it works perfectly - with the ingestor - it doesn't.
Wasted few hours trying to debug this but I'm going back to 0.3.0 - the last version which worked ok.
What is the app saying? You should see the 403 also on the app side. Can you run the app with DEBUG=1 and tell if you see it emitting 403s?
Are you sure Cloudflare is not blocking the script?
I just downgraded to v0.3.0 and the 403 is also there. This is the log from v.0.3.0 ingestor with debug=1. It is the same amount of info in 0.5.1-rc ingestor too.
This is getting frustrated. You might be right. I'll look on the Cloudflare side...
🤬😡🤬 Cloudflare!!! The headers of ingestor's POST requests are very minimal and Cloudflare seems to not like them hence blocked all its requests.
We need to add HERE more headers.
This is working fine:
I guess I'll pull the latest version again and try :)
Great. Do you want to submit a PR or shall I patch it?
I'll pull the latest and submit a PR
I also found out why your node does not federate. I'll have another patch ready soon :-)
🐞
Looks like we squashed everything. Let me know if it works now.
I'll make a release tomorrow.
It's live on our instance now. Let's see how it behaves tonight and I will drop a comment if I see something unusual.
Federation also WORKS 🚀
Do you plan to have the federated instances show somewhere to the user?
Yes, I was wondering to have a drop-down where you can select a city and jump from instance to instance.