If you mean B4J non-UI or console app, it is build to run on server or computer which you can install jdk.
If you mean UI app, it requires JavaFX to be installed and probably a server with UI or desktop environment / window manager.
By default, a Linux server like Ubuntu server has no desktop environment.
If you mean by B4J server app, such as a http web server created by B4J server template then yes. You don't need to run it on any web server because it is a web server itself powered by jetty. You don't need Apache Tomcat, Weblogic or Glassfish.
You need to subscribe a VPS service (Linux or Windows) or use your own server that you can install openjdk and access to SSH. A shared hosting usually don't allow you to do that.