Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make self-hosting easier #383

Open
elie222 opened this issue Mar 30, 2025 · 2 comments
Open

Make self-hosting easier #383

elie222 opened this issue Mar 30, 2025 · 2 comments

Comments

@elie222
Copy link
Owner

elie222 commented Mar 30, 2025

People are struggling to get set up atm, so making it as easy possible would help.

Ideally you just set some env vars and it works.
You will need to set up Google, but otherwise we should make it as easy as possible to start.

Improving README in areas where people run into pain points will help. And improved Docker Compose for production.

@blaine
Copy link

blaine commented Mar 30, 2025

I just found your project (via awesome-mcp), and addressing the bumps in the setup process would be huge. It seems like you've built something really great that's struck a chord!! Well done.

This issue is very timely – I literally opened the github issues here to see if there was some guidance for self-hosting, and this was the first issue I saw.

In my case, I'd ideally like to run this on my Portainer install with Ollama. Both cost of the commercial models and privacy are concerns, and while I'm confident I could get everything running on my laptop or a dev container, having a docker-compose infrastructure that simplifies upgrades and involves only minimal config would be better.

The two issues I've run into are:

  1. The UPSTASH_REDIS_TOKEN env var needs to be set. That's a trivial fix; I just generated a random UUIDv4 token and set it in the Portainer stack env vars section.
  2. I get the following error: /data/compose/{x}/apps/web/.env is missing. This issue is one I can't get past easily with Portainer specifically. My main option (afaik; I'm far from a docker expert) is to fork the docker-compose.yml and include a COPY directive or a custom mount point, but that would mean losing easy/automated upgrades. I think (?) the ideal fix here is to fix the web app so that it doesn't depend on the existence of the .env file, but instead uses environment variables provided in the stack config.

The issue I'm expecting to run into once I've gotten past the above is that the docker-compose currently doesn't include Ollama. This is easy to fix, but again requires forking the docker-compose. I'd probably start with this: https://github.com/mythrantic/ollama-docker

Unfortunately, I don't really have cycles to do a fork and get all this working, or to set up all this by hand on a dev container (my ultimate goal here is to do a one-time install and hit the ground running – email overload is real! ❤️😂), but I'm very happy to help test fixes and provide feedback/screenshots/loom recordings if that's helpful at all.

@sagararyal
Copy link

Really cool project. I managed to get it up and running on Coolify, and while it’s working decently now, I have a few thoughts:

It’d be great if we could have a published Docker image for the project.

1. Run Docker in Prod Mode

The Docker container currently runs the app in development mode. I tried modifying it to run in production, but it required spinning up too many services and setting a bunch of environment variables.
I had a similar experience when trying to deploy it on Vercel — the setup just felt a bit heavy.

2. Simplifying the Setup

To make deployments easier, I’d like to suggest introducing a new environment variable, something like:

INBOX_ZERO_MANAGED=false
  • When set to false, this mode would reduce the required environment variables to just the essentials: DB, REDIS, and Google credentials.
  • By default, this could be set to false for self-hosted and development builds, ensuring flexibility for advanced setups like your hosted setup.
  • When set to false, auto create a row in Premium table, during user signup, with features set to UNLOCKED. (If the premium features are intended to be available for self hosted instances)

3. OpenAI-Compatible API

Would it make sense to switch to an OpenAI-compatible API instead of integrating Ollama separately?
We could create a new provider type — OpenAI-Compatible — that collects the URL and token, and simply passes them to the existing OpenAI controllers.

--
For anyone trying on Coolify, I deployed Redis and Postgres separately and passed the URLs.
main...Plant-for-the-Planet-org:inbox-zero:deploy

Below is bare minimum of required environments with Ollama

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_ENCRYPT_SALT= # gen with openssl rand -hex 32
GOOGLE_ENCRYPT_SECRET= #openssl rand -hex 16
GOOGLE_PUBSUB_TOPIC_NAME=
NEXTAUTH_SECRET= #openssl rand -hex 16
NEXTAUTH_URL=
NEXT_PUBLIC_OLLAMA_MODEL=
OLLAMA_BASE_URL=
DATABASE_URL=
REDIS_URL=
UPSTASH_REDIS_TOKEN=#openssl rand -hex 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants