Replies: 2 comments 3 replies
-
Thanks for opening this discussion and sharing your experience. This could help feature travellers a lot! Let me react to some of your points.
This is odd. It seems like default version of java in debian 10 is 11 and Tolgee is built with Java 11. What version Java had you installed before installing v17?
Hmm, yep, but its described in configuraion section.
Websockets are not currently used on frontend. We will replace SocketIO with Spring's native approach. So there is currently no need to expose the port.
Yep, you're right. I'll write a blog post about self hosting this or the next week. Thanks a lot for sharing again. |
Beta Was this translation helpful? Give feedback.
-
I also wonder if you would be interested into writing an article about your experience. We would be glad to share it on our blog! :) |
Beta Was this translation helpful? Give feedback.
-
Hello,
Running Tolgee using Java isn't as simple as
java -jar tolgee-<version>.jar --server.port=""
like the documentation says.Here's what I had to do to make it work, on Debian 10 through an Apache proxy.
Java version
First, the
default-jre
package isn't enough, because the first error I got was similar to the following :So, I had to install a newer version, like this :
So that
java -version
would output this :java version "17.0.1" 2021-10-19 LTS
Database configuration
Then, I realized that making the program use my own PostgreSQL wasn't only about adding
tolgee.postgres-autostart.enabled=false
, but also specifying the following configuration items :spring.datasource.url
spring.datasource.username
spring.datasource.password
One could say that specifying the database's configuration is an obvious step, but I could have expected it to occur from the web UI, like most self-hostable web-based projects maintained by a company do.
I also experienced the following error :
So, I had to the following in
psql
:ALTER ROLE tolgee CREATEROLE SuperUser;
Which I reverted once the platform was running :
ALTER USER tolgee NOSUPERUSER;
Because, obviously, an app shouldn't have full control on a database that multiple apps (and maybe users) share.
Ideally, it would be nice not to need it at all.
WebSocket port
Once the app is successfully running, logs show a Socket.IO server running on a different port than the HTTP port.
But, when you want to specify the HTTP port, you might also want to specify the WebSocket port.
So, the following configuration item must be added :
tolgee.socket-io.port
Additional configuration
While browsing the server configuration page, I also added
tolgee.front-end-url
, because it felt useful, whether using Docker or not, as well astolgee.authentication.registrations-allowed=true
since the instance is meant to be public.For the same reason, I also added
tolgee.recaptcha.*
andtolgee.smtp.*
settings, but those are user-specific choices I gess.Result
Considering the number of configuration items to put, I created a
start.sh
script that looks like this :Perhaps I'll encounter other problems that could have been avoided if I knew all the configuration steps from the beginning, I'll keep you informed here.
Meanwhile, it would be nice to make an actual tutorial for self-hosting Tolgee without Docker.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions