Cloud Technology

Is it possible to self-host Langfuse on AWS using a private Postgres instance?

SH Asked by Shawn Miller · 10-01-2025
0 upvotes 13,205 views 0 comments
The question

Our security policy forbids sending our LLM traces to a third-party cloud. Has anyone set up Langfuse as a self-hosted instance using Docker? I specifically need to know the requirements for the Postgres database and if there are any issues with using RDS instead of a local containerized DB.

3 answers

0
MO
Answered on 11-01-2025

Self-hosting is very well supported since it’s open-core. You can use the official Docker Compose file as a starting point. For AWS, running the web and worker containers on ECS Fargate works great. Regarding the database, using a private RDS Postgres instance is actually the recommended path for production. Just make sure your Postgres version is 14 or higher and that you have the pgvector extension enabled if you plan to use some of the experimental search features. You'll need to provide the DATABASE_URL and NEXTAUTH_SECRET as environment variables. Performance-wise, it's very efficient; a small t3.medium instance can handle a surprising amount of trace data if your ingestion rate isn't extremely high.

0
RA
Answered on 12-01-2025

What about the blob storage for things like large prompt templates or attachments? Does it support S3 or just local volume mounting?

SH 13-01-2025

It supports S3 for sure. You just need to configure the S3 bucket name and credentials in the environment variables. This is much better than local volumes if you're using Fargate, as it makes the application completely stateless. We've been running this setup for six months without any major issues, and it keeps all our sensitive prompt data within our own VPC, which kept our compliance team happy.

0
NA
Answered on 14-01-2025

Make sure you also set up a ClickHouse instance if you want the high-performance analytics features to work on millions of traces.

MO 15-01-2025

Good tip, Natalie. For smaller teams, Postgres is fine, but ClickHouse is a must once you hit that enterprise-level scale of data.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session