How to Install OmniRoute on a VPS and Use It

If we previously discussed how to install 9Router on a VPS, this time we will cover how to install OmniRoute on a VPS and use it as an AI Agent anywhere.

OmniRoute is an AI gateway that allows you to connect various AI providers through a single API endpoint. Interestingly, OmniRoute offers many better options compared to using 9Router, such as Cookie-based AI, Free agents, RTK configuration, Caveman, and more.

In this tutorial, we will install OmniRoute on a VPS using Docker.

System Requirements to Install OmniRoute on a VPS

To use OmniRoute on a VPS, it is recommended to use a system with at least the following configuration:

  • OS: Debian 12, Ubuntu 22.04, or Ubuntu 24.04
  • CPU: 1 Core
  • RAM: 1 GB
  • Storage: 10 GB
  • Latest Docker

If you do not have a VPS yet, you can sign up for Vultr from this page to get $300 in trial credit!

How to Install OmniRoute on a VPS and Use It

In this tutorial, we will use a VPS configuration with Debian 12, 1GB RAM, 1 CPU, and 25GB of storage.

1. Update the VPS System

Before installing the application, it is recommended to update the system packages to get the latest security updates and dependencies.

sudo apt update && sudo apt upgrade -y
Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 1

2. Install Docker

Before running OmniRoute, make sure you have installed Docker. Check with the following command:

docker --version

If the result shows that Docker is not yet installed, you can install it first

curl -fsSL https://get.docker.com | sudo sh
Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 2

3. Create and Run the OmniRoute Container

If Docker is confirmed to be installed, you can create the container and run OmniRoute

docker run -d \--name omniroute \--restart unless-stopped \--stop-timeout 40 \-p 20128:20128 \-v omniroute-data:/app/data \diegosouzapw/omniroute:latest-web

Brief explanation:

  • --name omniroute names the container.
  • --restart unless-stopped makes the container automatically restart after a VPS reboot.
  • -p 20128:20128 opens port 20128.
  • -v omniroute-data:/app/data saves data so it is not lost when the container is updated.
Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 3

4. Ensure the Container is Running

After the container is created, check if OmniRoute is running:

docker ps

If successful, you will see a container named omniroute in the list of existing containers.

Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 4

5. Open the Firewall Port (Optional)

If the VPS uses a firewall such as UFW, make sure port 20128 is open.

sudo ufw allow 20128/tcp
Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 5

You can skip this step if you are not using a firewall on your VPS.

6. Access OmniRoute from a Browser

Now you can access the OmniRoute dashboard, for example, if your server IP is 45.76.152.16, then you can access http://45.76.152.16:20128 and complete the onboarding to configure your password, first agent, and more.

Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 6

7. Add Your First Agent

To add an Agent, you can open the page Providers and select the provider you want to use, then add the credentials.

Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 7

8. Create Your First OmniRouter API Key

Once onboarding is complete, you can create your first API Key from the page API Keys > Create API Key. Make sure to save the API Key you have successfully created, because the API Key cannot be displayed again later.

Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 8

9. Create Your First Combo

To use several Agents interchangeably, it is recommended to create a Combo from the page Combos > Create Combo and later you can choose the template that best suits your usage.

Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 9

10. Use OmniRoute

You can use OmniRoute for various needs, for example, for a Coding Agent you can use OpenCode, OpenRouter, or the extension Cline in VS Code.

If using Cline, you can use the optionBring my own API keyorBYOK, then configure it like this:

  • API Provider: OpenAI Compatible
  • Base URL:http://45.76.152.16:20128/v1(replace 45.76.152.16 with your server IP address, or domain name if you have set up a reverse proxy)
  • OpenAI Compatible API Key: The API Key you created in the Endpoint
  • Model ID: The name of the combo you created, for examplefree-stack
Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 10-1

After all data is filled in, you can try chatting in Cline, or try running a coding session directly.

Cara Install OmniRoute di VPS dan Menggunakannya - WPGan - 10-2

That is the easy way to install OmniRoute on a VPS and use it. For advanced configuration and increased efficiency, it is recommended to perform further configuration in the OmniRoute dashboard, such as RTK and Caveman configurations.

FAQ

Can OmniRoute be run without Docker?

Yes. OmniRoute also supports direct installation from source using Node.js. However, Docker is recommended because the installation, update, and application management processes become easier.

What are the minimum VPS specifications to run OmniRoute?

For personal or small-scale use, a VPS with 1 CPU and 1 GB of RAM is generally sufficient. However, for more intensive use, it is recommended to use a VPS with at least 2 CPUs and 2 GB of RAM.

Does OmniRoute automatically restart after a VPS reboot?

Yes. In this tutorial, the container is run using the option --restart unless-stopped, so OmniRoute will automatically run again after the VPS is restarted.

Will configuration data be lost when the container is updated?

No. All data is stored on a Docker Volume omniroute-data, so the configuration remains safe when the container is updated or recreated.

I cannot access OmniRoute through a browser, what should I do?

Check the following things:

  • The OmniRoute container is running (docker ps).
  • Port 20128 is not blocked by the VPS firewall.
  • The VPS provider does not block that port.
  • You are using the correct VPS IP address.

You can also check the container logs using:

docker logs -f omniroute

How do I change the domain or use HTTPS?

This tutorial only uses the VPS IP address. To use a domain and HTTPS, you can add a reverse proxy such as Nginx, Caddy, or Cloudflare Tunnel.

How do I update OmniRoute to the latest version?

Pull the latest image using:

docker pull diegosouzapw/omniroute:latest-web

Then remove the old container and run the container again using the latest image.

Is OmniRoute suitable for production use?

Yes, OmniRoute can be used for production. However, it is recommended to add a reverse proxy, HTTPS, strong authentication, and additional security before using it for production.

Written by

Muhammad Khoirun Nasikin

I enjoy tinkering with WordPress, hosting, VPS, web development, and various small experiments related to websites. I have over 3 years of experience in the web hosting industry.

COMMENTS

Loading...