Railway Tailscale Internal Communication
Anonymous
TRIALOP

2 years 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?

49 Replies

Anonymous
TRIALOP

2 years ago

7a5090f7-4590-4318-aa16-c721a3fb704f


Anonymous
TRIALOP

2 years 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

2 years ago

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


Anonymous
TRIALOP

2 years 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.


2 years ago

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


Anonymous
TRIALOP

2 years ago

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


2 years ago

okay gotcha


Anonymous
TRIALOP

2 years ago

Yep.


Anonymous
TRIALOP

2 years ago

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


2 years ago

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


Anonymous
TRIALOP

2 years ago

On my hardware I have no problems.


Anonymous
TRIALOP

2 years ago

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



2 years ago

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


Anonymous
TRIALOP

2 years ago

Oh yea


Anonymous
TRIALOP

2 years ago

These


2 years ago

can you send that as a regular image please


Anonymous
TRIALOP

2 years ago

1267291126344319000


Anonymous
TRIALOP

2 years ago

Here.


Anonymous
TRIALOP

2 years ago

The ip is a valid tailscale ip.

1267291326538449000


2 years 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?


Anonymous
TRIALOP

2 years ago

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


2 years ago

this pertains far more to tailscale than railway tbh


Anonymous
TRIALOP

2 years ago

Hm


Anonymous
TRIALOP

2 years ago

Okay. Just one more thing.


Anonymous
TRIALOP

2 years ago

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


Anonymous
TRIALOP

2 years ago

1267291811249000400


Anonymous
TRIALOP

2 years ago

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


Anonymous
TRIALOP

2 years ago

1267291907621519400


2 years ago

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


Anonymous
TRIALOP

2 years ago

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


2 years ago

would that not be tailscale itself


Anonymous
TRIALOP

2 years ago

Uhm idk


Anonymous
TRIALOP

2 years ago

I mean the railway ip of the container is 100.83.185.48


Anonymous
TRIALOP

2 years ago

Mine is 100.121.149.44


Anonymous
TRIALOP

2 years ago

So yea.


2 years ago

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


Anonymous
TRIALOP

2 years ago

Hm weird.


2 years 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

Anonymous
TRIALOP

2 years ago

Weird.


2 years ago

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


Anonymous
TRIALOP

2 years ago

Yes they have a forum.


Anonymous
TRIALOP

2 years ago

Ig I'm gonna ask there then.


2 years ago

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


Anonymous
TRIALOP

2 years ago

👍


Anonymous
TRIALOP

2 years 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


Anonymous
TRIALOP

2 years ago

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


2 years ago

railway does not provide that


Anonymous
TRIALOP

2 years ago

Okay.


Loading...