No

Node.js UDP proxy for Valheim server Systemd socket activation

Hacker News

Node.js UDP proxy for Valheim server Systemd socket activation

I wanted to host Valheim[0] for my friends using a dedicated server on my home box. The server can be heavy, so I didn't want it running 24/7. Systemd has a feature called "socket activation" where it listens to sockets on behalf of your service and then starts it up on-demand when there is traffic on the socket. Unfortunately Valheim's server does not support this, so a proxy must be used. Double unfortunately, the Systemd provided systemd-socket-proxyd[1] doesn't support UDP, which the game uses. To resolve this, and half as a learning exercise, I wrote my own small UDP proxy[2]. It opens a socket to the Valheim server for every incoming client address/port combination, so that replies can be routed back to the originating client. I would have written it in Erlang (using Gleam), but Erlang is not currently able to use the socket provided by Systemd. Node.js was a pragmatic choice based on ease of installation/setup and familiarity with JavaScript and the APIs. The proxy seems to be running smoothly, and the server is started and shut down automatically by Systemd (as the proxy shuts itself down after a period of inactivity). The only remaining problem currently is that the server takes too long to start in the eyes of the game client, and thus the first connection attempt will always fail. For a server between friends, this is a minor issue. I have also written a more detailed post about the process on my blog[3] if someone happens to be interested, but this post already contains most of the important stuff. [0] https://www.valheimgame.com [1] https://man.archlinux.org/man/core/systemd/systemd-socket-pr... [2] https://git.ahlcode.fi/nicd/valproxy [3] https://blog.nytsoi.net/2024/07/18/valheim-systemd-socket-ac...

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: started · Missing: supports, reddit linkedin, podcasting
87%87% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: activity, using, code · Missing: mac, agents, macos
61%61% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
56%56% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Strong signals: host · Missing: plus, platform, intuitive
43%43% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
37%37% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
15%15% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Ka
Kamote Node.js RPC Server now supports callbacks20%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Kamote Node.js RPC Server now supports callbacks

Hacker News2
No
Node.Js server-side framework52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Node.Js server-side framework

Hacker News1
Vi
Vim2html for node.js43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Vim2html for node.js

Hacker News2
TD
TDD Given-When-Then for Node.js48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TDD Given-When-Then for Node.js

Hacker News1
Co
Coolx5 - Node.js, Websockets, MongoDB and a clickable zombie50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Coolx5 - Node.js, Websockets, MongoDB and a clickable zombie

Hacker News2
Ye
Yet Another Node.js Logger – femto-logger37%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Yet Another Node.js Logger – femto-logger

Hacker News1
HT
HTML5 MMORPG – Node.js54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

HTML5 MMORPG – Node.js

Hacker News11
Re
Regex Expansion in Node.js47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Regex Expansion in Node.js

Hacker News1
No
Norby – Call your Ruby libraries from Node.js47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Norby – Call your Ruby libraries from Node.js

Hacker News5
A
A Node.js delta encoder43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Node.js delta encoder

Hacker News3