Skip to content

Manual Docker Installation

This guide covers deploying Isekai Core on a barebone Linux VPS (Virtual Private Server) like Digital Ocean Droplet, Linode, Hetzner, or AWS EC2.

Before you begin, ensure you have:

  • A Linux server (Ubuntu 22.04 LTS recommended).
  • A domain name pointing to your server’s IP.
  • Docker Engine and Docker Compose installed.

SSH into your server and install Docker:

Terminal window
# Update packages
sudo apt update && sudo apt upgrade -y
# Install Docker (Official Script)
curl -fsSL [https://get.docker.com](https://get.docker.com) -o get-docker.sh
sudo sh get-docker.sh
# Start Docker
sudo systemctl enable --now docker

You do not need to clone the entire repository. You only need the Docker Compose file and the Environment Variables file.

Terminal window
# Create directory
mkdir isekai-core && cd isekai-core
# Download production compose file
wget [https://raw.githubusercontent.com/isekai-sh/isekai-core/main/docker-compose.yml](https://raw.githubusercontent.com/isekai-sh/isekai-core/main/docker-compose.yml)
# Download env example
wget [https://raw.githubusercontent.com/isekai-sh/isekai-core/main/.env.example](https://raw.githubusercontent.com/isekai-sh/isekai-core/main/.env.example) -O .env
  1. Edit your environment variables:

    Terminal window
    nano .env
  2. Start services:

    Terminal window
    docker compose up -d
  3. Check logs to ensure everything is running:

    Terminal window
    docker compose logs -f

By default, the app exposes ports 3000 (Frontend) and 4000 (Backend). Do not expose these directly to the internet via HTTP. Use a reverse proxy to handle HTTPS.

  1. Install Caddy:

    Terminal window
    sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
    curl -1sLf '[https://dl.cloudsmith.io/public/caddy/stable/gpg.key](https://dl.cloudsmith.io/public/caddy/stable/gpg.key)' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
    curl -1sLf '[https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt](https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt)' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
    sudo apt update
    sudo apt install caddy
  2. Create Caddyfile:

    Terminal window
    nano /etc/caddy/Caddyfile
  3. Paste the following (adjust to your domain name):

    example.com {
    reverse_proxy localhost:3000
    }
    api.example.com {
    reverse_proxy localhost:4000
    }
  4. Restart Caddy:

    Terminal window
    sudo systemctl restart caddy
  5. Test deployment by visiting your domain.

  1. Install Nginx:

    Terminal window
    sudo apt install nginx certbot python3-certbot-nginx
  2. Configure Nginx block:

    Terminal window
    sudo nano /etc/nginx/sites-available/isekai

    Paste the following configuration (replace example.com with your actual domain):

    server {
    server_name example.com;
    location / {
    proxy_pass http://localhost:3000;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    }
    }
    server {
    server_name api.example.com;
    location / {
    proxy_pass http://localhost:4000;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    }
    }

    Enable the site and test the configuration:

    Terminal window
    sudo ln -s /etc/nginx/sites-available/isekai /etc/nginx/sites-enabled/
    sudo nginx -t
  3. Configure certbot

    Terminal window
    sudo certbot --nginx
  4. Restart Nginx

    Terminal window
    sudo systemctl restart nginx
  5. Test deployment by visiting your domain.