Railway Tailscale Internal Communication

AnonymousTRIAL

10 months ago

Hey, I setup a own docker image which includes Uptime Kuma and Tailscale.

Almost everything works, it connects to tailscale and everything, but I have the following issue:

I can connect from devices in the Tailscale network to railway.
But cannot connect from railway to devices in the Tailscale network.

E.g. I can ping the railway container from my server, but cannot ping my server from the railway container

Does anyone have an idea how I could fix that?

0 Replies

AnonymousTRIAL

10 months ago

7a5090f7-4590-4318-aa16-c721a3fb704f


AnonymousTRIAL

10 months ago

Dockerfile

# Use the Uptime Kuma base image
FROM louislam/uptime-kuma:latest

# Install necessary dependencies for Tailscale
RUN apt-get update && \
    apt-get install -y curl iproute2 iptables && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

# Download and install Tailscale
RUN curl -fsSL https://tailscale.com/install.sh | sh

# Expose Uptime Kuma port
EXPOSE 3001

# Copy entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Set entrypoint
ENTRYPOINT ["/entrypoint.sh"]

entrypoint.sh

#!/bin/bash

# Start Tailscale with userspace networking and proxy settings
/usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock --tun=userspace-networking --socks5-server=localhost:1055 --outbound-http-proxy-listen=localhost:1055 &
until /usr/bin/tailscale up --authkey=${TAILSCALE_AUTHKEY} --hostname=${TAILSCALE_HOSTNAME}
do
    sleep 0.1
done

# Start Uptime Kuma
node server/server.js

10 months ago

I don't have any ideas, but I am very curious to know the use case for this?


AnonymousTRIAL

10 months ago

I want to monitor stuff on my server like the Database which I dont wanna expose to the public, and as I already use tailscale to connect to the database from other Servers in my network, I thought about also monitoring via this.


10 months ago

if you already have the knowhow to run databases on your own hardware, why not run kuma there too?


AnonymousTRIAL

10 months ago

And to avoid my status page going down when everything goes down, I wanna host it externally.


10 months ago

okay gotcha


AnonymousTRIAL

10 months ago

Yep.


AnonymousTRIAL

10 months ago

Because I had stuff going down lately and then I only receive the notifications when everythings back up.


10 months ago

what exactly are the errors you are getting when trying to have kuma ping the stuff you are running on your own hardware?


AnonymousTRIAL

10 months ago

On my hardware I have no problems.


AnonymousTRIAL

10 months ago

I just cannot Ping, http request, etc to my hardware from railway.



10 months ago

you said you can't have kuma on railway ping the stuff you run on your hardware, what specifically are the errors though


AnonymousTRIAL

10 months ago

Oh yea


AnonymousTRIAL

10 months ago

These


10 months ago

can you send that as a regular image please


AnonymousTRIAL

10 months ago

1267291126344319000


AnonymousTRIAL

10 months ago

Here.


AnonymousTRIAL

10 months ago

The ip is a valid tailscale ip.

1267291326538449000


10 months ago

not the most helpful error message, I think you might find the help you need in some kind of tailscale community if one exists?


AnonymousTRIAL

10 months ago

<:shrug:1217734590547099719> idk, the best place to ask would be here I assumed.


10 months ago

this pertains far more to tailscale than railway tbh


AnonymousTRIAL

10 months ago

Hm


AnonymousTRIAL

10 months ago

Okay. Just one more thing.


AnonymousTRIAL

10 months ago

Could it be that the railway and tailscale networks are interfering?


AnonymousTRIAL

10 months ago

1267291811249000400


AnonymousTRIAL

10 months ago

As I saw the 100.x IP range in the logs of railway.


AnonymousTRIAL

10 months ago

1267291907621519400


10 months ago

your container does not have a 100x IP, so that would be tailscale


AnonymousTRIAL

10 months ago

Hm weird. because I dont have any 100.64.x ip in my Tailscale network.


10 months ago

would that not be tailscale itself


AnonymousTRIAL

10 months ago

Uhm idk


AnonymousTRIAL

10 months ago

I mean the railway ip of the container is 100.83.185.48


AnonymousTRIAL

10 months ago

Mine is 100.121.149.44


AnonymousTRIAL

10 months ago

So yea.


10 months ago

I'm looking at it right now and the container ips are 10.x


AnonymousTRIAL

10 months ago

Hm weird.


10 months ago

interface name: railnet0
├─ flags: up, broadcast, multicast
├─ ipv4 address: 10.250.10.122
├─ ipv6 addresses: fd12:74d7:7e85::a4:ee15:a937, fe80::a0aa:eeff:fe15:a937
└─ hardware address: a2:aa:ee:15:a9:37

AnonymousTRIAL

10 months ago

Weird.


10 months ago

likely some small misconfiguration with tailscale, do they have a forum or community you can ask?


AnonymousTRIAL

10 months ago

Yes they have a forum.


AnonymousTRIAL

10 months ago

Ig I'm gonna ask there then.


10 months ago

perfect, let me know how that goes and if you need any railway specific information you can ask me


AnonymousTRIAL

10 months ago

👍


AnonymousTRIAL

10 months ago

http://100.83.185.48:60582/
One last quick thing.
It must have some sort of connection. As it knows my tailscale IP, plus my tailscale hostname.

1267293812330336500


AnonymousTRIAL

10 months ago

Btw can I somehow ssh into the container?
To make debugging easier?


10 months ago

railway does not provide that


AnonymousTRIAL

10 months ago

Okay.


Railway Tailscale Internal Communication - Railway Help Station