Deploy Spring Boot
Spring Boot should be run on your own machine or server, then exposed with Mekong on its local port.
This is also the general rule for backend apps in MekongTunnel:
- Spring Boot
- Go servers
- FastAPI
- Flask
- PHP / Laravel
- ASP.NET
- Express / Fastify
- any other backend that listens on an HTTP port
Backend support is not limited to Spring Boot. If the app starts a server on a port like 8080, 8000, 3000, or 5000, Mekong can expose that port from your local computer.
Backend + frontend split
You can split the app into two parts:
- Frontend: upload a built static frontend through
/dashboard/deploy - Backend: run the backend locally or on your own VM, then expose its port with
mekong <port>
Example split:
Frontend: React / Vue / static site
Backend: Spring Boot / Go / FastAPI / PHP / ASP.NETIn that setup, the frontend can stay hosted online while the backend is exposed from the running server where the API lives.
Spring Boot Maven workflow
Build the JAR:
./mvnw clean packageRun it locally:
java -jar target/app.jarExpose the running app:
mekong 8080Spring Boot Gradle workflow
Build the JAR:
./gradlew bootJarRun it locally:
java -jar build/libs/app.jarExpose the running app:
mekong 8080Other backend examples
The same pattern works for many other stacks:
# Go
go run main.go
mekong 8080
# FastAPI
uvicorn main:app --host 0.0.0.0 --port 8000
mekong 8000
# PHP / Laravel
php artisan serve --host=127.0.0.1 --port=8000
mekong 8000
# ASP.NET
dotnet run
mekong 5000The exact framework does not matter. The only important part is the local port your backend is listening on.
Optional one-time project setup
Save the default port and start command in .mekong.json:
mekong init --port 8080 --start "java -jar target/app.jar"After that, plain mekong can reuse the saved settings.
When to use dashboard deploy instead
Use /dashboard/deploy when you already have a packaged frontend or app archive ready to upload.
Use a normal tunnel when:
- the app should run from your local machine
- the backend needs live code execution
- you want to expose your dev server directly
- you are testing APIs, webhooks, or local services