Install OCTO Server with WuKongIM and MySQL
Build OCTO Server from source, configure MySQL and WuKongIM, verify its APIs, and provide secure remote HTTP access with Localtonet.
In this article 11 sections
Build a reproducible OCTO backend and connect it to operator-managed database and messaging services
This tutorial pins OCTO Server to release v1.21.0, commit 32ffcff, instead of building a moving branch. It explains the verified source-build workflow, shows how to inspect the revision-specific configuration, separates the OCTO HTTP API from MySQL, WuKongIM, and callback listeners, and adds controlled remote access with Localtonet after local testing. The available release evidence does not document exact supported MySQL or WuKongIM versions, a complete dependency bootstrap procedure, an exact database grant set, or a universal unauthenticated health route. For that reason, this guide does not invent those details and scopes the installation to building OCTO Server against compatible services that you provision and validate separately.
📋 What's in this guide
Pinned revision, evidence boundary, and tutorial scope
Reproducible installation instructions must describe one identifiable source revision. This guide uses
OCTO Server release v1.21.0,
whose release commit is 32ffcff. The release notes identify changes to categories, project groups, on-behalf-of behavior, unread counts, user-profile authorization, OIDC recovery, and opt-in authentication and payload bounds for gRPC callbacks.
All OCTO file references in this tutorial are pinned to that commit:
- QUICKSTART.md at 32ffcff
- BUILDING.md at 32ffcff
- go.mod at 32ffcff
- configs/tsdd.yaml at 32ffcff
- SECURITY.md at 32ffcff
Pinning these links prevents a future change on main from silently changing the build instructions, Go declaration, YAML structure, migration behavior, security guidance, or listener settings readers see while following this article.
The verified evidence supplied for this revision does not contain enough detail to reproduce the full installation and initialization of MySQL and WuKongIM without guessing. It also does not establish an exact supported version range for either dependency. This tutorial therefore covers the revision-pinned OCTO Server source build and its connection to operator-managed, compatible MySQL and WuKongIM services. If you need the complete platform, review the official OCTO deployment repository and select deployment definitions compatible with your chosen server revision.
Do not interpret the phrase “MySQL-compatible” as confirmation that OCTO supports every database implementing part of the MySQL protocol. Unless the selected OCTO documentation explicitly names another database product and version, use MySQL and validate the exact version against the release's deployment definitions or maintainer guidance.
How OCTO Server, MySQL, WuKongIM, and Localtonet fit together
OCTO is an open-source collaboration platform designed around shared work between people and AI agents. Its organization describes spaces, categories, channels, and threads as the collaboration hierarchy. The OCTO Server repository identifies the Go backend as providing REST and WebSocket APIs, Lobster agent orchestration, and a WuKongIM real-time messaging control plane.
These responsibilities cross several distinct network boundaries. Treating every port as interchangeable can expose an internal dependency or produce misleading tests.
A listening OCTO socket proves only that a process opened a port. It does not prove that the database schema is ready, credentials are accepted, WuKongIM is reachable, callback authentication is aligned, application authorization works, or a WebSocket client can exchange frames.
| Connection | Purpose | Exposure decision |
|---|---|---|
| Client to OCTO HTTP | Application REST requests and any WebSocket endpoint implemented by the selected revision. | Candidate for a Localtonet HTTP tunnel after local verification. |
| OCTO to MySQL | Persistent database operations. | Keep private and allow only trusted application hosts. |
| OCTO to WuKongIM | Messaging control and related integration. | Keep private unless OCTO's documented architecture explicitly requires otherwise. |
| WuKongIM to OCTO callback | Internal callback delivery where configured. | Keep private and protect according to the pinned revision's security model. |
| Localtonet client to relay | Outbound tunnel connection from the selected device. | No inbound router port forwarding is required. |
Requirements you must establish before building
Prepare the build host, MySQL, and WuKongIM before starting OCTO Server. The Localtonet client is intentionally deferred until the application works locally.
| Requirement | Revision-specific authority | Validation |
|---|---|---|
| Git | The source repository is checked out at commit 32ffcff. |
git --version |
| Go | The go and any toolchain declarations in the pinned go.mod. |
go version and grep -E '^(go|toolchain) ' go.mod |
| MySQL | The exact supported version is not established by the supplied release evidence. | Confirm version compatibility before deployment, then test from the OCTO host. |
| WuKongIM | The exact supported version is not established by the supplied release evidence. | Confirm compatibility with OCTO v1.21.0 and test every configured endpoint from the OCTO host. |
| OCTO configuration | The pinned configs/tsdd.yaml file. |
Review the complete YAML structure before editing values. |
| Writable build directory | Required for the checkout, downloaded modules, and compiled binary. | Build as a non-privileged user with access to the selected directory. |
Confirm the Go declaration instead of guessing
The supplied evidence does not include the contents of go.mod, so this article cannot responsibly state an exact Go version. After checking out the pinned commit, read the declaration directly:
grep -E '^(go|toolchain) ' go.mod
go version
Install a toolchain compatible with that declaration before building. If go.mod contains both go and toolchain lines, account for both rather than comparing only the first number.
Confirm dependency compatibility before production use
Neither the release page nor the supplied repository summary establishes an exact MySQL or WuKongIM version matrix for OCTO Server v1.21.0. Do not choose versions solely because they are the newest releases, and do not assume protocol similarity establishes support. Check the matching deployment definitions, release documentation, or maintainer guidance before using production data.
At minimum, record the OCTO commit, Go version, MySQL version, WuKongIM version, configuration checksum, and deployment-definition revision in your operational notes. That record makes later troubleshooting and rollback substantially clearer.
Database passwords, WuKongIM credentials, callback tokens, OCTO application tokens, cookies, and Localtonet device tokens must remain private. Use safe placeholders while editing examples, then supply real values through the mechanism supported by the selected deployment. Restrict the populated configuration file to the account that runs OCTO.
Clone and build OCTO Server v1.21.0
The important correction to a normal git clone workflow is the explicit checkout. Cloning without checking out a release leaves the build on whatever commit the default branch contains at that moment.
Clone the official repository
Create a local checkout from the Mininglamp-OSS OCTO Server repository.
git clone https://github.com/Mininglamp-OSS/octo-server.git
Enter the checkout
Run the remaining source commands from the repository root.
cd octo-server
Check out the verified release commit
Use the commit attached to release v1.21.0 so the source and linked documentation remain aligned.
git checkout --detach 32ffcff
Verify the selected revision and toolchain declaration
Confirm that Git reports the intended commit, then compare the repository declaration with the installed Go toolchain.
git rev-parse HEAD
grep -E '^(go|toolchain) ' go.mod
go version
Build the server binary
Compile the root package into an executable named octo-server. Go may download the modules recorded by the revision.
go build -o octo-server .
The first command below should print the full commit represented by 32ffcff. The second confirms that a binary was produced:
git rev-parse HEAD
ls -l ./octo-server
A successful build confirms source and toolchain compatibility at compile time. It does not validate configuration, migrations, MySQL permissions, WuKongIM connectivity, callback behavior, or application routes.
Prepare MySQL and WuKongIM without making unsupported assumptions
OCTO Server must receive dependency values that correspond to services it can actually reach. Because the available revision evidence does not document complete MySQL and WuKongIM installation procedures, this section defines the required outcomes rather than publishing unsupported package-manager commands or container tags.
MySQL preparation outcomes
Before launching OCTO, you need a running MySQL service, a database reserved for OCTO, and a non-administrative account that can connect from the OCTO host. Use a strong generated password and do not reuse the MySQL root account as the routine application identity.
The exact schema name, account name, connection options, and grants must match the pinned OCTO configuration and migration process. The supplied evidence does not establish a safe universal GRANT statement. In particular, migration tooling may require schema-changing permissions that exceed ordinary runtime query permissions. Determine whether OCTO performs migrations itself before separating migration and runtime identities.
Validate the service from the same network context that will run OCTO. A successful local login on the database host does not prove that the OCTO host, container, or service account can connect.
mysql --version
mysql -h <mysql-host> -P <mysql-port> -u <octo-db-user> -p
Enter the password interactively. Do not put it on the command line, where it can be retained in shell history or exposed to local process inspection.
WuKongIM preparation outcomes
A compatible WuKongIM service must be running and reachable from OCTO. Record the exact WuKongIM version, every endpoint OCTO needs, and the authentication material expected by both sides. If the integration sends callbacks to OCTO, the callback destination must resolve from WuKongIM's network context, not merely from your browser or the OCTO host.
Do not infer listener roles from port numbers. A WuKongIM API endpoint, an internal messaging listener, and an OCTO callback listener are different interfaces even when they reside on the same machine.
Schema initialization and migration
The available evidence confirms that database behavior is part of the installation, but it does not prove whether OCTO v1.21.0 automatically initializes an empty schema, automatically advances an existing schema, exposes a dedicated migration command, or delegates migration to the deployment repository.
Before pointing v1.21.0 at valuable data, inspect the pinned quickstart, build guide, source tree, and matching deployment definitions for the migration entry point. Back up the database first. Do not manually create guessed tables, mark migrations complete, or grant unrestricted privileges merely to make an error disappear.
For a safe first run, use an empty test database that contains no production information. Capture the complete startup log and compare the database before and after startup. If the application reports missing tables and no documented migration action occurs, stop and resolve the revision-specific migration procedure before continuing.
Configure the pinned YAML and keep each listener distinct
Start with
the v1.21.0 configs/tsdd.yaml file.
Make a protected working copy before inserting environment-specific values:
cp ./configs/tsdd.yaml ./configs/tsdd.local.yaml
chmod 600 ./configs/tsdd.local.yaml
Use the exact keys and nesting present in that pinned file. The evidence supplied to this article does not include the YAML contents, so reproducing supposed database, WuKongIM, HTTP, or callback keys here would risk publishing a configuration for a different revision. The safe placeholder pattern is to replace only values already represented by the template:
# Illustrative values only.
# Preserve the actual keys and nesting from configs/tsdd.yaml at commit 32ffcff.
<database-host-key>: "<private-mysql-host>"
<database-port-key>: <mysql-port>
<database-name-key>: "<octo-database>"
<database-user-key>: "<least-privilege-user>"
<database-password-key>: "<supply-securely>"
<wukongim-endpoint-key>: "<private-wukongim-endpoint>"
<wukongim-credential-key>: "<supply-securely>"
<http-listener-key>: "<local-bind-address-and-port>"
<callback-listener-key>: "<private-callback-address-and-port>"
This block is a value checklist, not valid OCTO configuration. Do not paste angle-bracket keys into the YAML. Match each value to a real key already present in the pinned template.
Identify addresses by role
Search the configuration and then inspect every match in context:
grep -nEi 'mysql|database|wukong|grpc|callback|http|websocket|listen|addr|address|port' ./configs/tsdd.local.yaml
Classify each result as one of the following:
- The client-facing OCTO HTTP listener.
- A MySQL connection destination.
- A WuKongIM connection destination.
- An OCTO callback listener used by another service.
- A metrics, administration, or other internal listener.
Do not choose a Localtonet target merely because a value looks like a port. The target must be the OCTO HTTP listener confirmed by configuration, process output, and a local HTTP request.
Choose a safe bind address
If Localtonet runs on the same host as OCTO, a loopback listener may be sufficient and avoids unnecessary LAN exposure. If our client runs on another device, OCTO must listen on an address reachable from that device, and local network controls must permit only the intended path.
Remember that 127.0.0.1 always refers to the machine or container initiating the connection. It does not automatically refer to the physical host, another container, or another LAN device.
Review callback security against the pinned release
Release v1.21.0 includes an opt-in authentication mode and payload bounds for gRPC callbacks. The release summary does not provide enough detail to state exact environment-variable names, defaults, token format, or startup behavior. Read the pinned configuration, security policy, and implementation before enabling that mode. Keep callback traffic private even when authentication is enabled.
The Localtonet target later in this guide must be the verified application HTTP listener. MySQL, WuKongIM internals, and callback listeners should remain on trusted networks unless a separately reviewed architecture explicitly requires public reachability.
Start OCTO Server and verify each layer locally
Start MySQL and WuKongIM using the service-management method appropriate to your deployment. Confirm both remain running, then launch OCTO from the repository root with your protected configuration copy:
./octo-server --config ./configs/tsdd.local.yaml
This command follows the configuration argument pattern in the existing source-build workflow while avoiding edits to the tracked template. Keep the first-run terminal visible and save the complete output securely. Redact credentials before sharing logs.
1. Confirm the process remains alive
An immediate exit usually indicates a configuration, dependency, listener, or startup-initialization failure. Read the first meaningful error rather than only the final line.
2. Confirm the intended listening socket
On Linux:
ss -ltnp
On systems with lsof:
lsof -nP -iTCP -sTCP:LISTEN
Match the OCTO process to the HTTP address in the pinned configuration. Separately identify any callback listener. Recording both prevents the callback port from being tunneled by mistake.
3. Make a local HTTP reachability request
The supplied revision evidence does not identify a universal unauthenticated health route or its expected JSON response. Do not invent /health, /api/health, or another path. Select a route documented in the pinned quickstart, registered by the pinned source, or called by the matching official client.
Once you have identified that route, make the request against the confirmed local origin:
curl -i http://<octo-http-host>:<octo-http-port>/<documented-route>
Compare the actual status and response body with the selected route's documented contract. A 401 or 403 may establish HTTP reachability when authentication is intentionally absent, but it is not a successful functional test. A connection refusal means the HTTP path is not ready.
4. Perform an authenticated database-backed test
Use the matching OCTO client or a documented authenticated API route to read or create application data. Verify all of the following:
- The HTTP response has the expected status and body.
- The operation is visible through a second supported read.
- OCTO reports no SQL authentication, permission, missing-table, or schema-version error.
- MySQL logs do not show rejected connections or failed statements.
This test is necessary because a generic HTTP response can succeed before a database-dependent code path runs.
5. Perform a messaging test
Use the official client combination compatible with OCTO Server v1.21.0. Authenticate, enter a permitted collaboration context, and perform a documented messaging action. Confirm that the action reaches the intended recipient or channel and remains visible after a refresh or reconnect.
Review OCTO and WuKongIM logs together. A failure after OCTO accepts the request may belong to the OCTO-to-WuKongIM connection, callback delivery, callback authentication, or version compatibility rather than the client-to-OCTO HTTP path.
6. Test WebSocket behavior separately
The OCTO repository describes WebSocket APIs, but a normal REST request does not validate a WebSocket upgrade, frame authentication, reconnect behavior, or long-lived traffic. Use the official client or the revision's documented WebSocket route and authentication method. Do not guess a path or place a real token directly in a command that will be retained in shell history.
Process, socket, HTTP, authenticated database, messaging, callback, and WebSocket checks prove different things. Keep their results separate so a partial success is not mistaken for a healthy OCTO installation.
Expose only the verified OCTO HTTP listener with Localtonet
Add Localtonet only after the local HTTP, database-backed, and messaging tests behave as expected. Our client establishes an outbound connection to a Localtonet relay, so you can expose the selected application service without inbound router port forwarding, firewall changes, VPN setup, or a public IP address.
Use the current Localtonet HTTP tunnel documentation for the client download and current platform-specific installation path. The available installation methods can change, so this article does not invent a package command or executable URL.
Install and run the Localtonet client
Install our client on the OCTO host or another device that can reach the verified OCTO HTTP listener. If it runs elsewhere, test the OCTO address from that exact device first.
Authenticate or select the device
Use the device-specific authentication token associated with the client that will run the tunnel. Keep it private. Never place it in the OCTO YAML, source repository, screenshots, shell examples, or support logs.
Select an available relay server
Choose a currently available server or region from the dashboard. Obtain the value from the current product interface rather than copying a hardcoded server code from an article.
Create the HTTP tunnel
Select an HTTP tunnel and enter the local IP address and port of the verified OCTO HTTP listener. Do not enter the MySQL port, WuKongIM endpoint, or callback listener.
Start the tunnel
Creating the tunnel does not start it. Press Start and wait for the selected client and tunnel to show the appropriate connected state.
Test the assigned public URL
Repeat the documented OCTO HTTP test against the assigned public HTTPS origin. Then repeat the authenticated database-backed operation using a suitable test account.
Stop or delete access when finished
Stop the tunnel to remove active public reachability while retaining its configuration, or delete it when the endpoint should no longer exist.
WebSocket support must be verified, not assumed
The supplied first-party Localtonet product context confirms HTTP tunneling but does not explicitly document WebSocket forwarding behavior for this exact workflow. Therefore, this article does not promise that OCTO WebSocket traffic will work through every HTTP tunnel configuration. Check the current HTTP tunnel documentation and test an authenticated OCTO WebSocket connection through the assigned public address before relying on it.
If ordinary REST requests work but WebSocket traffic fails, do not expose WuKongIM or the callback listener as a workaround. Instead, verify the OCTO WebSocket route, public-origin configuration, authentication during upgrade, allowed-origin handling, and current Localtonet HTTP tunnel behavior.
A tunnel provides network reachability to the configured local service. OCTO must still authenticate users and enforce the permissions appropriate to your revision and deployment. Test with non-administrative accounts and avoid exposing development defaults or administrative routes that assume a trusted network.
Security and operational controls
Expose one application boundary
Point Localtonet only to the OCTO HTTP listener required by remote clients. Keep MySQL, WuKongIM internals, callback listeners, caches, object-storage administration interfaces, and other companion services private.
Use least-privilege identities
Use a dedicated database account rather than the MySQL root account. Separate migration and runtime identities only if the OCTO v1.21.0 migration procedure supports that model. Give OCTO users, agents, adapters, and administrators only the access they need.
Protect secrets and logs
Restrict the local YAML copy and any environment files. Redact passwords, tokens, cookies, authorization headers, connection strings, and public shareable URLs before attaching logs to an issue. Rotate a secret after accidental exposure rather than relying on deletion from a visible page or commit.
Back up before migration or upgrade
Back up the database and other persistent state before changing OCTO, MySQL, WuKongIM, or deployment definitions. Record the deployed commit and dependency versions. Test the target combination with a copy of representative data before production cutover.
Follow the project's reporting policy
Review the security policy pinned to commit 32ffcff before reporting a vulnerability. Do not publish credentials, private endpoints, customer data, or exploitable details in a public issue.
Troubleshooting the build, dependencies, and tunnel
The build fails before producing a binary
Confirm that git rev-parse HEAD identifies the expected release commit, the current directory contains go.mod, and the installed Go toolchain satisfies its declarations. Read the first module or compiler error. A toolchain mismatch, unavailable module source, changed local file, and network failure require different remedies.
OCTO exits immediately
Check YAML syntax and nesting, file permissions, dependency addresses, credentials, occupied listeners, and startup initialization output. Compare your local file with the pinned template:
git diff -- ./configs/tsdd.yaml
diff -u ./configs/tsdd.yaml ./configs/tsdd.local.yaml
The second command may display secrets, so run it only in a private terminal and do not paste its output into public support channels.
MySQL works locally but OCTO cannot connect
Test from the OCTO execution environment. Check host, port, account host restrictions, password, database name, transport settings, firewall policy, and name resolution. In a container, 127.0.0.1 normally refers to that container rather than the database container or physical host.
OCTO reports missing tables
Stop and resolve the v1.21.0 migration procedure. Do not create guessed tables or grant unrestricted database privileges. Verify whether the matching deployment definitions run a migration job, whether the server has a documented migration entry point, and whether your database started empty.
The HTTP socket listens but the documented route fails
Confirm that you selected the client-facing HTTP listener rather than a callback or internal listener. Check the exact route, HTTP method, request body, headers, authentication, and expected status against the pinned source or matching client. A reachable port does not imply that every path exists.
Database-backed requests fail
Inspect the OCTO and MySQL logs for authentication errors, missing schema objects, denied statements, transaction failures, or incompatible SQL behavior. Confirm the database version against the deployment combination you selected.
Messaging fails after an API request succeeds
Separate the client-to-OCTO path from the OCTO-to-WuKongIM and WuKongIM-to-callback paths. Verify endpoint values, credentials, name resolution, callback reachability, callback authentication, payload limits, and component versions. Avoid making an internal service public merely to hide a private-network configuration error.
The Localtonet public URL times out
Check the layers in order:
- OCTO is running.
- The documented route responds locally.
- The device running our client can reach the configured OCTO target.
- The Localtonet client is connected.
- The correct tunnel is started.
- The tunnel target is the OCTO HTTP port.
If our client runs on another machine, never use 127.0.0.1 to refer to the OCTO host. Use a private address reachable from that client and restrict local network access appropriately.
REST works publicly but WebSocket does not
Confirm the WebSocket route and authentication against the pinned OCTO revision. Check how the client constructs its public WebSocket URL, whether OCTO accepts the public origin, and whether the current Localtonet HTTP tunnel documentation supports the required upgrade behavior. Keep dependency listeners private while diagnosing the application path.
The public URL stopped working after previously succeeding
The public endpoint is available only while the selected Localtonet device is connected and the tunnel is running. Also verify that OCTO did not stop, change its listener, or fail during a dependency outage.
Frequently asked questions
Which OCTO Server revision does this tutorial use?
It uses release v1.21.0 at commit 32ffcff. The build explicitly checks out that commit, and links to OCTO files use revision-specific URLs.
What exact Go version is required?
Read the go and any toolchain declarations from go.mod at commit 32ffcff. The supplied evidence does not include those values, so this article does not publish an unverified version number.
Which MySQL and WuKongIM versions should I install?
The supplied OCTO v1.21.0 evidence does not establish an exact supported version matrix. Select versions documented by the matching deployment definitions or confirmed by the project maintainers, then record and test the complete combination before production use.
Does OCTO Server automatically create or migrate its schema?
That behavior is not established by the supplied evidence. Inspect the pinned quickstart, build guide, source, and matching deployment definitions before first use or upgrade. Test with an empty non-production database and back up existing data before any migration.
What port should the Localtonet tunnel target?
Target the OCTO client-facing HTTP port found in the pinned YAML and confirmed through the running process and a local HTTP request. Do not target MySQL, WuKongIM, a callback listener, or a port copied from another release.
Will OCTO WebSocket traffic work through the HTTP tunnel?
The supplied Localtonet context does not explicitly confirm WebSocket forwarding for this workflow. Check the current HTTP tunnel documentation and run an authenticated WebSocket test through the assigned public origin before relying on it.
Should I expose MySQL or WuKongIM through Localtonet?
Not for this workflow. Publish only the verified OCTO HTTP listener. Keep MySQL, WuKongIM internals, and callback listeners private and accessible only to the systems that require them.
Can the Localtonet client run on another device?
Yes. That device must be able to reach the OCTO HTTP address and port. Use a private address reachable from the client device because its 127.0.0.1 refers to itself, not the OCTO host.
Publish the verified OCTO HTTP service when you are ready
After the pinned OCTO build passes local HTTP, database-backed, messaging, and required WebSocket checks, install our client and create an HTTP tunnel to that one confirmed application listener.
Get Started Free →Corrections & updates
Substantive changes approved by the Localtonet editorial team are listed transparently below.
Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.