Deploy JuggleIM

Self-hosted IM server: private chat, groups, chatrooms, WebSocket and API

Deploy JuggleIM

/opt/data

MySQL

mysql:8

Just deployed

/var/lib/mysql

Deploy and Host JuggleIM on Railway

JuggleIM is an open-source (Apache-2.0) instant-messaging server written in Go. It handles private chats, groups, chatrooms, message history, push and moderation, and gives you a WebSocket endpoint for its Web, Android, iOS, Flutter and HarmonyOS SDKs, a signed server REST API and a web admin console.

About Hosting JuggleIM

This template runs JuggleIM v1.8.16 as one service built from a public GitHub repo, next to Railway's MySQL. JuggleIM normally listens on four ports (WebSocket, server API, navigator and admin console). Here a small launcher puts all four behind one HTTPS domain, routed by path. On first start it loads the database schema. On every start it sets the console password from a generated variable and tells client SDKs to connect to wss:// on your Railway domain. Users, messages and app settings live in MySQL. JuggleIM's local key-value store and message logs live on a volume. Nothing needs to be filled in at deploy time.

Common Use Cases

  • Add private and group chat to your own web or mobile app, with the data in your own database
  • Run chatrooms or live-event chat with many users in one room
  • Replace a hosted per-user chat API with a self-hosted server you control

Dependencies for JuggleIM Hosting

  • MySQL 8 (Railway's MySQL service, included)
  • A volume for JuggleIM's local key-value store and logs (included)

Deployment Dependencies

Implementation Details

After the deploy, open the Railway domain and log in to the console as admin with the JUGGLEIM_ADMIN_PASSWORD value from the JuggleIM service's Variables tab. Upstream's default password 123456 is never used. Change the password in that variable, not in the console, because the variable is applied again on every start.

Create an app in the console to get an app key and app secret. Your backend registers users and gets their tokens from https://YOUR-DOMAIN/apigateway/users/register. Each server API call is signed with the headers appkey, nonce, timestamp and signature (SHA-1 of the app secret, nonce and timestamp). Client SDKs then connect to https://YOUR-DOMAIN with the app key and the user's token.

PathPurpose
/imWebSocket for client SDKs
/apigateway/Signed server API
/navigator/Tells SDKs which WebSocket address to use
/healthHealth check
everything elseAdmin console

If you add a custom domain, set JUGGLEIM_CONNECT_ADDRESS to wss://YOUR-DOMAIN so SDKs connect through it. /metrics and the bundled JuggleChat demo API are not exposed. The admin console opens in Chinese, and you can switch it to English. The template follows upstream releases through its GitHub repo. Railway shows an update notice when a new version is merged.

Why Deploy JuggleIM on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying JuggleIM on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0