habitica-ios icon indicating copy to clipboard operation
habitica-ios copied to clipboard

Connect to self-hosted backend?

Open kianenigma opened this issue 4 years ago β€’ 31 comments

I am planning on running a self-hosted version of Habitica api/frontend for personal use. It seems like, the mobile applications do not provide an option by default to connect to a different endpoint.

It would be helpful to some if you'd have an option to provide your own API address to the mobile app, with the default being the publicly hosted Habitica.

kianenigma avatar Apr 18 '20 08:04 kianenigma

Currently it’s possible to configure a custom server url through the apps config files and compiling it again. Adding something in the UI to do this would be an interesting feature, but not something I would have the time to implement anytime soon, so I’ll tag this as help wanted.

phillipthelen avatar Apr 18 '20 08:04 phillipthelen

Cool! glad to hear it is easily configurable.

I'm not much into IOS dev, would it be possible to install a modified binary on a device? I recall that some years ago this was quite an annoyance due to app signing restrictions.

kianenigma avatar Apr 18 '20 08:04 kianenigma

If we do this, I would like it to be a hidden feature that isn't visible to the average user since it is a very small use case. It could be through a button that only appears after switching on a 'developer mode' in app settings, or only appears when shaking your phone on the login screen or tapping a certain thing like the melior logo 5 times.

Then we would post documentation on how to do this on the habitica wiki, or provide explanation through email if someone were to reach out.

saraolson avatar Apr 22 '20 13:04 saraolson

I'm interested in such a configuration possibility, to!

maxkratz avatar Aug 26 '20 13:08 maxkratz

Is this being worked on? Currently the reason holding me back from using Habitica is the lack of self hosting.

szethh avatar Feb 09 '22 23:02 szethh

@phillipthelen @saraolson What is the likelihood of getting this merged in if I were to work on a PR for it? It might take me a while as I'm not a Swift developer, but I'm sure I can figure it out eventually. I like the idea of making it a hidden feature - like only showing the text field for a custom server URL if the logo is tapped 5 times. As @szethh said, the lack of ability to set a customer server URL is a major blocker. I'm running it on Kubernetes myself, so I feel the pain!

villasenor avatar Jul 10 '22 05:07 villasenor

I am sure I could implement this in a short amount of time. πŸ‘πŸ½

EricMiddelhove avatar Jul 10 '22 14:07 EricMiddelhove

That would be amazing @EricMiddelhove!! When do you think you'll have time to work on it?

villasenor avatar Jul 10 '22 22:07 villasenor

Depends, i'll probably get this done until the end of the week. (17th July)

EricMiddelhove avatar Jul 10 '22 22:07 EricMiddelhove

That would be awesome @EricMiddelhove! If you need me to do any testing, please let me know.

villasenor avatar Jul 11 '22 03:07 villasenor

I was really busy with work this week, therefore wasn't able to implement it yet and probably wont until next weekend. I will do it then.

EricMiddelhove avatar Jul 17 '22 20:07 EricMiddelhove

Sadly work does not give me the time to implement this, therefore I need to give this free ... :/

EricMiddelhove avatar Aug 22 '22 01:08 EricMiddelhove

just another voice in favor of helping test this if ever implemented. kthx.

victort avatar Oct 20 '22 21:10 victort

How could we compile this and load it into our iPhone? I can see the instruction to change debug.xcconfig, but am lost as to how to compile and load into my iPhone

bootymcjudy avatar Nov 05 '22 08:11 bootymcjudy

I got as far as building using my own free developer apple ID, but the build fails indicating there is a missing Secrets.swift file, it looks like something is suppose to use the swiftgen.yml file to output it but its missing. I also renamed secrets.yml.example to secrets.yml but no luck

bootymcjudy avatar Nov 16 '22 06:11 bootymcjudy

+1 here, I'd rather not re-sign the application on my phone and don't want to pay apple's ridiculous subscription. Would love the functionality if anyone is able to dedicate some time to it :)

nowjon avatar Dec 13 '22 03:12 nowjon

Hello, a new intrested user here. How is tge progress on selfhosting solution? Thanks

Shahin-rmz avatar Nov 28 '23 02:11 Shahin-rmz

@EricMiddelhove do you have time to implement this now?

Or is habitica just against this idea in general?

Scot-Survivor avatar Dec 25 '23 08:12 Scot-Survivor

Have not looked at this for a while now. I see what I can do :)

EricMiddelhove avatar Dec 25 '23 13:12 EricMiddelhove

Good Christmas gift :))

Shahin-rmz avatar Dec 25 '23 14:12 Shahin-rmz

Thank you :)), I figured I'd ask since it was a year since the last rely from a contributor I appreciate the help.

Scot-Survivor avatar Dec 25 '23 14:12 Scot-Survivor

Okay so just FYI to all of you patiently waiting πŸ™ˆ I have managed to find / implement the functionality to theoretically connect to a self hosted Backend. However I am not 100% sure on how the UI for this feature should be. Any Ideas / guidance?

EricMiddelhove avatar Jan 08 '24 15:01 EricMiddelhove

Okay so just FYI to all of you patiently waiting πŸ™ˆ I have managed to find / implement the functionality to theoretically connect to a self hosted Backend. However I am not 100% sure on how the UI for this feature should be. Any Ideas / guidance?

tailscale, jellyfin, immich all have locations to add a self-hosted url for example

Snuupy avatar Jan 08 '24 22:01 Snuupy

That were also ideas I had. However I ask myself where would fit such an option best in Habitica.

EricMiddelhove avatar Jan 09 '24 17:01 EricMiddelhove

If I had to put it somewhere I'd put it in settings, or if a logout is necessary since settings is only available once logged in, but how does the app know to log into the selfhosted server in the first place?

in that case, maybe under menu on the main page before you select login/logout that says:

logging in on: with options listed: habitica.com | self-hosted -> prompts user to input server URL

like bitwarden does it

my 2c

Snuupy avatar Jan 09 '24 18:01 Snuupy

Any updates on when this will be available?

Scot-Survivor avatar Apr 30 '24 10:04 Scot-Survivor