Self-Hosting
Connect the Trainstack app to your own server.
This page is for self-hosters only. If you're using the official Trainstack app at trainstack.app, you can skip this entirely — everything is already configured.
The Trainstack app connects to any Trainstack-compatible server through a single config endpoint. No rebuilds needed.
Server Setup
Your server automatically exposes a config endpoint at /app.json that returns:
{
"environment": "prod",
"apiBaseUrl": "https://your-server.example.com"
}No additional configuration is required on the server side — this works out of the box.
App Setup
- Open the Trainstack app
- On the login screen, tap the ... menu (top right)
- Tap Server Settings
- Enter your server's config URL (e.g.
https://your-server.example.com/app.json) - Tap Connect
The app will fetch your server's config and show a green "Connected" status with the environment name. You can now log in with your self-hosted account.
How It Works
The app stores your config URL locally. On each launch, it fetches fresh config from your endpoint to stay in sync. If the fetch fails (e.g. you're offline), it uses the last successful config — so the app still works.
To switch back to the official server, tap Reset to Default in Server Settings.