Sites and apps
How to deploy a Spring Boot app without a VPS
In short
To deploy a Spring Boot app, upload your source code to Netrun: the platform builds the project from your pom.xml or build.gradle and gives you a public HTTPS link. You do not need to build a jar first, install a JDK anywhere, or rent a server. The one requirement is that the app listens on the port from the PORT environment variable and on all addresses, not only on localhost: a hard-coded port is the number one reason a build succeeds but the link stays blank. Expect the first Java build to take longer than it does in scripting languages, because every dependency is downloaded from scratch.
Normally, showing a Spring Boot app to anyone but yourself means renting a server, installing the right Java version on it, building a jar, working out how to run it in the background and restart it after a crash, putting a proxy in front of it and getting a certificate. That is a lot of work for a project that starts with one button in your editor, which is why Java app hosting tends to be the step where a side project stalls.
Netrun removes that part. You upload the source code, the platform sees a pom.xml or a build.gradle, builds the project itself and gives you a public link with HTTPS, the padlock in the browser included. Below is the path from a folder of code to a working link, plus the one mistake that most often leaves the page blank.
Keep pom.xml or build.gradle in the project root#
That file tells the platform this is a Java project and which tool to build it with, Maven or Gradle. You do not need to put a built jar into the archive: the sources are enough, the build runs on our side. Leave the target and build folders and your local dependency cache out of the archive as well, they only make the upload bigger and get recreated anyway.
Do not fix the port in your code#
The platform picks the port and passes it to your app in the PORT environment variable, so the app has to listen on that port and on all addresses, not only on localhost. In Spring Boot that is one line in application.properties: server.port=${PORT:8080}. If the port is written into the code instead, the build succeeds and the page stays blank, which is the most common reason a project that runs fine on your own machine does not open on the internet.
Move passwords and keys into secrets#
Keep the database connection string, passwords and third-party API keys in environment variables rather than in application.properties or in the code. During project setup Netrun asks for these values and stores them encrypted, so they never sit in the archive or in your GitHub repository. Spring Boot reads such values from the environment without any extra library.
Add a database if your app needs one#
There is no managed database as a separate service here, but a database can live inside your own project. Put a docker-compose.yml in the root and describe two services: your app and PostgreSQL or MySQL from a ready-made image. One project holds up to five connected services. Give the database a named volume, otherwise its data is wiped on the next publish. An external database works too: then a connection string in secrets is all you need.
Upload the code and wait for the first build#
Bring the project in as a ZIP archive or import a repository from GitHub, including a private one. No git and no terminal required. The first Java build takes noticeably longer than for scripting languages, because Maven or Gradle download every dependency from scratch. That is normal, and the build status and logs are visible in your dashboard in real time.
Open the link and check the logs#
When the build finishes you get a public HTTPS address you can open and send to anyone. If the page does not load, read the logs in your dashboard: they show whether Spring Boot actually started and which port it listens on. From then on you update the code in the dashboard, by uploading a new version or pulling from GitHub, and the link stays the same.
The result: your Java and Spring Boot app runs at a regular URL, with no rented server, no JDK to install and no certificate to renew. The Free plan gives you one project, and a web app on it sleeps while idle and wakes when someone opens the link. For a Java app that first visit after a pause is slower than for a lightweight script, because the process starts up again. If the service has to answer quickly at any moment, the Pro plan runs it without idle downtime. Current prices and limits are shown in your dashboard. Try Netrun.
Common questions
Do I need to build a jar before uploading?
No. Upload the source code together with pom.xml or build.gradle and the project is built for you. A prebuilt jar, the target and build folders, and your local dependency cache do not belong in the archive.
Are Maven and Gradle both supported?
Yes, both. The platform looks at which build file sits in the project root and runs the matching tool. If you have the mvnw or gradlew wrappers, you can leave them in place and they do no harm.
Why does the first Java build take so long?
Because Maven or Gradle download every dependency from scratch, and Java projects usually have many. It is a one-off cost: later publishes of the same project are faster. The progress is visible in the build logs, so you can tell the build is running rather than stuck.
The build succeeded but the link does not open. What should I check?
Start with the logs in your dashboard: quite often the app crashes on startup, for example because it cannot reach the database. The second most common cause is the port. If it is written into the code, or the app listens only on localhost, nothing can reach it from outside. Listen on all addresses and take the port from the environment.
How do I connect PostgreSQL to a Spring Boot app?
Two ways. Either describe the database as a second service in a docker-compose file next to the app and give it a named volume so the data survives code updates. Or use an external database and pass the connection string through secrets, which Spring Boot reads from the environment.
Which Java version should I specify?
The one you wrote the project on, stated explicitly in the build file: the java.version property in pom.xml or sourceCompatibility in build.gradle. Then the project is built on exactly that version instead of failing with a compiler complaint about an unsupported release.
Which languages and technologies are supported?
Python, Node.js, Go, Rust, Ruby, PHP, Java, .NET, Deno, Bun, Elixir, static sites and bash scripts. You can bring your own Dockerfile or docker-compose, but more often the stack is detected from your code automatically.
Do I need my own server or VPS?
No. Netrun deploys your project on its own servers. There is no VPS to rent, no systemd or nginx to configure and no certificates to renew — all of that runs for you.
Where do I set tokens and other secret values?
Every project has a Secrets tab where you set the values from your code — for example the token from BotFather. We store them encrypted: you can see the variable names, but the values are shown to no one, including you.
Why does my website sometimes sleep?
On the free plan, websites sleep after being idle and wake up in a couple of seconds on the first request. On the Pro plan your project runs without sleeping.