Skip to content

GodotSteam: setting up Steamworks in a Godot 4 game

5 min readBy Eduardo Orellana ·

GodotSteam is the open-source Steamworks integration for Godot: a GDExtension plug-in from the Asset Library or a pre-compiled editor with matching export templates, both giving GDScript a global Steam singleton. Set your App ID (480, Valve's Spacewar, while testing) in Project Settings under Steam > Initialization, call Steam.steamInitEx() from an autoload's _ready(), and call Steam.run_callbacks() every frame from a node that never pauses. A status of 0 means Steam is ready; most failures are the Steam client not running, an unset App ID or a missing steam_api library. Ship steam_api64.dll (and godotsteam.dll for the plug-in) beside a Windows .exe, and never ship steam_appid.txt. The current release is GodotSteam 4.23 on Steamworks SDK 1.65.

AppImage, x86_64. Ubuntu 22.04, Debian 12, Fedora 39 or newer.

Intel or AMD Chromebook, with Linux turned on.

Download for macOSDownload for WindowsDownload for Linux

Godot has no Steam support built in; GodotSteam is how everyone adds it

Godot ships with no Steamworks integration, by design: the engine stays platform-neutral. GodotSteam fills the gap and has since the Godot 2 era. Achievements, stats, leaderboards, lobbies, the overlay, cloud files, rich presence and Steam networking all come through it, as one Steam singleton your GDScript calls with the same names Valve's C++ API uses.

The obvious worry is that a third-party bridge makes Steam fragile. In practice the work is small and the failures are predictable: nearly every "GodotSteam doesn't work" report comes down to one of four things, an App ID, the Steam client, a missing library or callbacks that stopped running. This guide covers each, in the order you meet them.

Which flavour

GodotSteam comes in two main forms for Godot 4, and you pick one; the project's own docs warn against mixing them:

Source: godotsteam.com, Introduction and Exporting and Shipping, read 18 October 2026. Both Godot 4 flavours have in-editor docs and a global Steam object.
FlavourHow you get itExport withBest for
GDExtension plug-inGodot's Asset Library or GodotSteam's releases, added to a normal Godot 4 projectGodot's regular export templates, plus the plug-in's librariesMost Godot 4 projects; the easiest start
Pre-compiled editor and templatesA Godot build with GodotSteam compiled in as a moduleGodotSteam's own export templatesTeams who want the module build, and Godot 3 projects
ServerA separate build for dedicated and master serversIts own templatesDedicated servers

Sources: GodotSteam: Introduction.

Initialize Steam

  1. App ID. Set it in Project Settings under Steam > Initialization (GodotSteam 4.14 and later), or pass it to the init call. Use 480, Valve's Spacewar sample, until you have your own. GodotSteam's docs advise against steam_appid.txt and environment variables, and the text file must never ship.
  2. An autoload (for example steamworks.gd) that calls Steam.steamInitEx() in _ready(). It returns a dictionary with status and verbal: 0 means initialized, 1 another failure, 2 cannot connect (Steam is not running), 3 the Steam client is out of date.
  3. Callbacks every frame: Steam.run_callbacks() in _process(), in a node that always processes. In a node that can pause, callbacks stop and achievements, lobbies and overlay events fail silently. GodotSteam can also embed callbacks (the second argument of steamInitEx, or a Project Settings option), but its docs note problems with that option in some releases, so manual polling is the safe default.

Steam itself must be running and signed in while you test, even from the editor.

Sources: GodotSteam: Initializing Steam.

GDScript
extends Node

func _ready() -> void:
	process_mode = Node.PROCESS_MODE_ALWAYS
	var result: Dictionary = Steam.steamInitEx()
	if result['status'] > Steam.STEAM_API_INIT_RESULT_OK:
		push_error('Steam did not start: %s' % result['verbal'])

func _process(_delta: float) -> void:
	Steam.run_callbacks()

Testing with app 480, and its limits

App 480 lets you test initialization, achievements calls, lobbies and the overlay before your own App ID exists. GodotSteam's docs list what it cannot do: Inventory and Workshop features, and anything that needs settings on Steamworks' back end, need your own App ID; and lobbies created under 480 get lost among everyone else's Spacewar lobbies, so filter lobby searches by a key of your own. Move to your real App ID as soon as you have paid the Steam Direct fee, and define your achievements and stats in Steamworks before testing them.

Sources: GodotSteam: Introduction, GodotSteam: Initializing Steam.

Exporting and shipping

From GodotSteam's Exporting and Shipping tutorial, what must sit beside the exported game:

  • Windows: steam_api64.dll (steam_api.dll for 32-bit) next to the .exe, plus godotsteam.dll if you use the GDExtension plug-in.
  • Linux: libsteam_api.so from the matching architecture folder, plus libgodotsteam.so for the plug-in.
  • macOS: the Steam redistributable is already in the app bundle; the plug-in also needs libgodotsteam.dylib. Mac exports have extra steps of their own.
  • Always: the executable and its .pck. Never: steam_appid.txt.

With the pre-compiled flavour, set GodotSteam's templates as custom export templates; a regular Godot template produces a parse error that the identifier Steam is not declared. With the plug-in, use Godot's regular templates and ship the extra libraries Godot exports. Each platform is its own depot in Steamworks, and beta and dev packages must include every depot, or testers get a broken build. Uploading is your own SteamPipe step; see uploading a build with SteamPipe.

Sources: GodotSteam: Exporting and Shipping.

When it does not work

  • Status 2, cannot connect: the Steam client is not running or not signed in.
  • Status 1 on a fresh project: no App ID set, or the steam_api library missing beside the editor or the export.
  • Parse error: Steam not declared in an export: a module build exported with a regular Godot template.
  • Achievements never unlock, lobby signals never fire: run_callbacks() is not being called, often because its node paused.
  • Works in the editor, fails in the export: a library was not shipped beside the executable.
  • Works for you, not for testers: a missing depot in their package, or a build on a branch they cannot see.

Keeping versions in step

GodotSteam releases track both Godot and Valve's Steamworks SDK, and a mismatch is a quiet source of trouble. Use the GodotSteam release built for your Godot minor version; when you upgrade Godot, upgrade GodotSteam in the same commit and re-test initialization, an achievement and a lobby before anything else. For the pre-compiled flavour, the editor and the export templates must come from the same GodotSteam release. Read the release notes before upgrading in the weeks before a launch or a festival: a working, slightly older version beats a new one you have not shipped with.

Sources: GodotSteam: GDExtension Changelog.

What you can build on it

Achievements and stats, which GodotSteam 4.14 and later sync at boot on their own; leaderboards; lobbies and invites through the overlay; Steam networking through SteamMultiplayerPeer; cloud saves; rich presence; the floating gamepad keyboard for Steam Deck text entry. Our guides cover achievements, lobbies and multiplayer, cloud saves and Godot on Steam Deck.

Where Flockbay fits

Flockbay builds games on the official Godot engine, and when a game should play online on Steam, its AI writes GodotSteam into it as an ordinary autoload you own: the lobby, the overlay invite, Join Game and SteamMultiplayerPeer. Flockbay's Windows export ships GodotSteam's libraries beside the .exe. The Steamworks account, App ID and uploads stay yours. Building is free to start.

Questions

Is GodotSteam free?
Yes. It is an open-source project; Steamworks itself needs a Steamworks account and the $100 Steam Direct fee per game.
What App ID do I use to test GodotSteam?
480, Valve's Spacewar sample, until your game has its own App ID. Inventory, Workshop and back-end settings need your own.
Which files do I ship with a GodotSteam game on Windows?
steam_api64.dll beside the .exe, plus godotsteam.dll if you use the GDExtension plug-in, along with the .exe and .pck. Do not ship steam_appid.txt.
Why does Steam.steamInitEx() return status 2?
GodotSteam could not connect to Steam: the client is not running or not signed in. Start Steam and run the game again.

Flockbay builds Godot games, free to start, and writes GodotSteam into them for online play on Steam.

Download Flockbay free

AppImage, x86_64. Ubuntu 22.04, Debian 12, Fedora 39 or newer.

Intel or AMD Chromebook, with Linux turned on.

Download for macOSDownload for WindowsDownload for Linux

Flockbay

The free AI game maker for Windows, macOS and Linux.