Guide · Open source
How to use skynet: build, run the example and get started
Updated · written with AI from the project's own documentation and checked against our catalogue data
Skynet is an open-source multi-user framework written around the actor model, where separate units of logic exchange messages instead of sharing state. Its services are written in Lua and its core is in C, and it is often used for online games. This guide walks through building it from source, running the bundled example, and deciding whether it suits your project.
Quick start
- 1Install prerequisites. Make sure you have a C compiler, make, git and, on Linux, autoconf.
- 2Clone the repository. Run git clone on the cloudwu/skynet repository and cd into the skynet directory.
- 3Build for your platform. Run make with your platform, such as linux, macosx, freebsd or openbsd. Use gmake on FreeBSD.
- 4Start the example node. Run ./skynet examples/config in one terminal to launch the gate server and skynet-master.
- 5Run the example client. In a second terminal, run ./3rd/lua/lua examples/client.lua and type hello.
- 6Read the wiki. Use the English or Chinese wiki pages for documentation, translating as needed.
Check the prerequisites before you start
Skynet is installed by cloning the repository and building it, not with a packaged installer. The source lists three prerequisites: a C compiler and make, autoconf (needed on Linux for jemalloc), and git.
- C compiler and make
- autoconf, required on Linux for jemalloc
- git
Build skynet for your platform
Clone the repository, enter the directory, and run make with your platform name. The README lists linux, macosx, freebsd and openbsd as supported values. For FreeBSD, use gmake instead of make.
The README also shows an alternative: set the PLAT environment variable and run make without arguments.
git clone https://github.com/cloudwu/skynet.git
cd skynet
make 'PLATFORM' # PLATFORM can be linux, macosx, freebsd, openbsd nowRun the example node and a test client
The README's test section uses two terminals. In the first, launch a skynet node from the bundled example config, which starts a gate server and a skynet-master (the config file notes a standalone option). In the second, start the example client and type hello to try it out.
- Terminal 1: start the node with the example config
- Terminal 2: start the example client
./skynet examples/config
./3rd/lua/lua examples/client.luaUnderstand the Lua version setup
Skynet uses a modified version of Lua 5.5.0 from the ejoy project to support multiple Lua states. The README says official Lua versions can also be used, provided you edit the Makefile.
Find documentation in the wiki
The main documentation lives in the project wiki, which is written in both English and Chinese. The wiki also hosts a FAQ that is currently in Chinese; the README suggests translating it with a tool such as Google Translate or DeepL. English speakers can ask questions in the project Discussions or open issues in English, and the README says almost all contributors speak English.
- Wiki: https://github.com/cloudwu/skynet/wiki
- FAQ: https://github.com/cloudwu/skynet/wiki/FAQ
- Discussions: https://github.com/cloudwu/skynet/discussions
What people use it for
- Building multiplayer or online game server backends that run many concurrent services
- Structuring server logic as actors that communicate through messages
- Prototyping a Lua-based networked service using the bundled example config and client
- Exploring the actor model in a production-tested framework heavily used in the Chinese game industry
Frequently asked questions
Is skynet free to use?
Skynet is released under the MIT licence, according to the project information. The README does not describe any paid tier.
What do I need to install skynet?
You need a C compiler, make, git and, on Linux, autoconf for jemalloc. You then clone the repository and build with make for your platform.
How do I run skynet after building it?
Run ./skynet examples/config to start a node with the gate server and skynet-master. Then run ./3rd/lua/lua examples/client.lua in another terminal to launch a test client.
Does skynet support Windows?
The README lists linux, macosx, freebsd and openbsd as platform options for the build. It does not mention Windows, so check the wiki before planning a Windows setup.
Can I use skynet with Python or JavaScript?
Skynet is built around Lua for its services, so it is not a fit if your team needs a Python, JavaScript or Go ecosystem. Its services are written in Lua and the core is in C.
Is there a beginner tutorial for skynet?
The README does not include a beginner-oriented tutorial, and the wiki is mostly in Chinese. Translating the wiki pages or asking in the English-friendly Discussions are the main ways to get started.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Skynet suits developers building multiplayer or online game servers who are comfortable with Lua and can read Chinese or translate the wiki. If you want a simple web framework, a packaged installer, or a Python, JavaScript or Go ecosystem, pick a different tool.
Install options & downloads