Methodius AI Self-hosted
Deploy to Cloud VM
Methodius AI Installation Cloud Docker

Run Methodius AI on Cloud using Docker

Running Methodius AI on a cloud service is the best way to run a private multi-user instance of Methodius AI with full control while not having to worry about the underlying infrastructure.

💡

Easy Cloud Deployment

Methodius AI offers easily integrated one-click docker deployment templates with Railway (opens in a new tab) and Render (opens in a new tab).

This is the easiest way to self-host a cloud server version of Methodius AI

ProviderMinimum Instance size
Amazon Web Servicest3.small
Google Cloud Providere2-standard-2
Azure CloudB2ps v2
💡

Methodius AI offers community-maintained deployment templates for cloud providers https://github.com/Mintplex-Labs/anything-llm/tree/master/cloud-deployments (opens in a new tab)

Once you are prepared to run Methodius AI on your server the process is quite simple.

You should provision a folder somewhere on the host machine so that you can re-pull the latest versions of Methodius AI and persist data between container rebuilds.

⚠️

BACKWARDS COMPATIBILITY

The Mintplex Labs team takes great care to ensure Methodius AI is always backward compatible.

In the event this changes you will be alerted via code, deployment, or our regular communication channels on social, Discord, and email.

️💡

Note --cap-add SYS_ADMIN is a required command if you want to scrape webpages. We use PuppeeteerJS (opens in a new tab) to scrape websites links and --cap-add SYS_ADMIN lets us use sandboxed Chromium across all runtimes for best security practices.

 # Assuming that you want to store app data in a folder at /var/lib/Methodius AI
 
 # Pull in the latest image
 docker pull mintplexlabs/Methodius AI:master
 
 export STORAGE_LOCATION="/var/lib/Methodius AI" && \
 mkdir -p $STORAGE_LOCATION && \
 touch "$STORAGE_LOCATION/.env" && \
 docker run -d -p 3001:3001 \ # expose on port 3001 (can be any host port)
 --cap-add SYS_ADMIN \
 -v ${STORAGE_LOCATION}:/app/server/storage \
 -v ${STORAGE_LOCATION}/.env:/app/server/.env \
 -e STORAGE_DIR="/app/server/storage" \
 mintplexlabs/Methodius AI:master
 
 # visit http://localhost:3001 to use Methodius AI!

Done! You are using Methodius AI!

More Information

Backwards Compatibility

The Mintplex Labs team takes great care to ensure Methodius AI is always backward compatible. In the event this changes you will be alerted via code, deployment, or our regular communication channels on social, Discord, and email.

Scaling

Since the Methodius AI backend uses SQLite for its database, it is not recommended to attempt to scale the Methodius AI backend horizontally since you would then need to have many containers all reading and writing to the same database.

In this case, we recommend using a more robust database like PostgreSQL and our PostgreSQL image which will centralize the database as well as set PGVector as the vector database.

SSL/HTTPS Support

In order to use SSL/HTTPS with Methodius AI you should use a reverse proxy like NGINX (opens in a new tab) with a TLS certificate you can get from Let's Encrypt (opens in a new tab).

NGINX Configuration

Here is an example NGINX configuration that you can use to reverse proxy to Methodius AI:

# Default server configuration
# Example config for regular setup + SSL + Websockets.
server {
	listen 80;
	server_name your-domain.com;
	return 301 https://your-domain.com$request_uri;
}
 
server {
	listen 443 ssl;
	ssl on;
	server_name your-domain.com;
	ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
	ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;	
 
  # Enable websocket connections for agent protocol.
	location ~* ^/api/agent-invocation/(.*) {
		proxy_pass http://localhost:3001;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "Upgrade";
	}
 
	# Enable a custom 502 error page.
	# Must define template at /usr/share/nginx/html/502.html
	# error_page 502 /502.html;
    # location /502.html {
    #   index 502.html;
    # }
 
	location / {
		proxy_connect_timeout       605;
    proxy_send_timeout          605;
    proxy_read_timeout          605;
    send_timeout                605;
    keepalive_timeout           605;
    proxy_buffering off;
    proxy_cache off;
    proxy_pass         http://your-server-ip:3001$request_uri;
  }
}