Twitch Integration Setup for 7 Days to Die Servers
This guide walks you through connecting your 7 Days to Die server to Twitch, letting viewers use channel points or bits to trigger in-game events like spawning zombies, giving you items, or calling in a blood moon. You’ll need a Twitch account (with two-factor authentication enabled) and either a dedicated server or a hosted one where you can edit config files. The setup takes about 15 minutes and requires no coding experience.
What You’ll Need
- A Twitch account (free) – the one you stream with or a separate bot account.
- Two-factor authentication (2FA) enabled on that Twitch account (required by Twitch for API access).
- Access to your 7 Days to Die server’s config files – either via file manager (for hosted servers) or the server folder on your own machine.
- The server must be running version 1.0 or later (Twitch integration was added in A21, but 1.0 is current).
- Optional: a second Twitch account if you want to keep your main account separate from the bot.
Step-by-Step
- Enable Twitch integration in the server config. Navigate to your server’s
serverconfig.xmlfile. Look for the line<property name="TwitchEnabled" value="false"/>and change it tovalue="true". Save the file. - Set your Twitch channel name. In the same file, find
<property name="TwitchServerName" value=""/>and enter your Twitch channel name (the part after twitch.tv/). Save and close the file. - Restart your server. Apply the config changes by restarting the server. If you’re using a hosting panel, use the restart button; otherwise, stop and start the server process.
- Generate an authentication token. After restart, check the server console or log file for a message like “Twitch: Please visit https://www.twitch.tv/… to authorize”. It will contain a unique URL. Copy that URL.
- Authorize your Twitch account. Open the URL in a browser, log in with the Twitch account you want to use, and click “Authorize”. You’ll see a success message and the server will automatically receive the token.
- Verify connection. In the server console, look for a line like “Twitch: Authentication successful” or “Twitch: Connected to channel”. If you see an error, proceed to Troubleshooting.
- Configure reward actions. In the same
serverconfig.xml, you’ll find sections forTwitchActionsandTwitchRewards. By default, some actions are already defined (e.g., spawn a zombie, give a buff). You can edit these to customize what each reward does. For example, to change the zombie type, find the action withaction="spawnhorde"and adjust thevalueparameter. - Set channel points cost. For each reward, you can set the cost in channel points by modifying the
pointsattribute. Higher cost for more powerful effects. - Save and restart again. After editing actions, save the file and restart the server one more time to load the new settings.
- Test on stream. Go live on Twitch, open your channel points redemption panel, and redeem a reward to confirm it triggers in-game. You should see the event happen in the server console.
Common Mistakes
- Forgetting to enable 2FA: Twitch will reject the authorization if the account doesn’t have two-factor authentication enabled. Enable it in your Twitch security settings before starting.
- Editing the wrong config file: Some servers have multiple XML files (like
serverconfig.xmlandserverconfig_dedicated.xml). Make sure you’re editing the one the server actually reads – check your hosting panel or the server startup log. - Not restarting after enabling: The server must be restarted after changing
TwitchEnabledto true, otherwise the auth URL won’t appear. - Using a different Twitch account: The channel name in
TwitchServerNamemust match the account you authorize. If you use a bot account, set the channel name to your streaming channel, but authorize with the bot account. - Setting points cost too low: If a reward costs 1 point, viewers can spam it and overload your server. Set reasonable costs based on the effect’s power.
Tips
- Test with a second device: Before going live, redeem a reward from your phone or another browser to make sure it works without cluttering your stream.
- Start with simple actions: Use the default actions first to get comfortable, then customize. The default set includes spawning a zombie, giving a buff, and calling a blood moon.
- Set cooldowns: In the config, you can add a
cooldownattribute to actions to prevent spamming. For example,cooldown="300"would limit that action to once every 5 minutes. - Use a separate bot account: If you want to keep your main account clean, create a second Twitch account for the bot. Just make sure to authorize that account when prompted.
- Back up your config: Before making major changes, copy the original
serverconfig.xmlso you can revert if something breaks.
Troubleshooting
- No auth URL appears in console: Double-check that
TwitchEnabledis set to true and the server was fully restarted. Also, ensure the server has internet access (firewall might block the Twitch API). - Authorization fails with “Invalid token”: This usually means 2FA is off. Go to Twitch settings, enable 2FA, then restart the server and try again.
- Rewards don’t trigger in-game: Verify the action names are spelled correctly in the config. Check the server console for errors like “Unknown action”. Also, make sure the reward is enabled (not set to
enabled="false"). - Connection drops after a while: Twitch tokens can expire. The server usually re-authenticates automatically, but if it doesn’t, restart the server to get a new auth URL.
- Channel points cost doesn’t update: After changing costs, you must restart the server. Also, Twitch may cache the old cost for a few minutes – wait and refresh.
Frequently Asked Questions
Do I need to be partnered or affiliated?
No, any Twitch account with channel points enabled can use this. Channel points are available to all streamers.
Can I use bits instead of channel points?
Yes, the integration supports both channel points and bits. In the config, you can set the cost in bits by using the bits attribute instead of points.
Will this work on a single-player game?
No, Twitch integration requires a dedicated server. It won’t work in single-player or peer-to-peer multiplayer.
Can viewers redeem rewards without being subscribed?
Yes, channel points are available to all viewers, not just subscribers. You can set custom costs to control who can afford what.
How do I add a custom action?
In the TwitchActions section, add a new line with a unique name and the action command. For example: <action name="myaction" action="spawnzombie" value="zombieBoe" points="100"/>. Then in TwitchRewards, reference that action name.
Can I disable specific rewards?
Yes, set enabled="false" on the reward line, or simply remove it from the config. Restart the server after changes.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.