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.
Prerequisites
Section titled “Prerequisites”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.
Server Preparation
Section titled “Server Preparation”SSH into your server and install Docker:
# Update packagessudo apt update && sudo apt upgrade -y
# Install Docker (Official Script)curl -fsSL [https://get.docker.com](https://get.docker.com) -o get-docker.shsudo sh get-docker.sh
# Start Dockersudo systemctl enable --now dockerSetup Project Files
Section titled “Setup Project Files”You do not need to clone the entire repository. You only need the Docker Compose file and the Environment Variables file.
# Create directorymkdir isekai-core && cd isekai-core
# Download production compose filewget [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 examplewget [https://raw.githubusercontent.com/isekai-sh/isekai-core/main/.env.example](https://raw.githubusercontent.com/isekai-sh/isekai-core/main/.env.example) -O .envConfiguration
Section titled “Configuration”-
Edit your environment variables:
Terminal window nano .env -
Start services:
Terminal window docker compose up -d -
Check logs to ensure everything is running:
Terminal window docker compose logs -f
Reverse Proxy
Section titled “Reverse Proxy”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.
Option A: Caddy
Section titled “Option A: Caddy”-
Install Caddy:
Terminal window sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curlcurl -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.gpgcurl -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.listsudo apt updatesudo apt install caddy -
Create Caddyfile:
Terminal window nano /etc/caddy/Caddyfile -
Paste the following (adjust to your domain name):
example.com {reverse_proxy localhost:3000}api.example.com {reverse_proxy localhost:4000} -
Restart Caddy:
Terminal window sudo systemctl restart caddy -
Test deployment by visiting your domain.
Option B: Nginx + Certbot
Section titled “Option B: Nginx + Certbot”-
Install Nginx:
Terminal window sudo apt install nginx certbot python3-certbot-nginx -
Configure Nginx block:
Terminal window sudo nano /etc/nginx/sites-available/isekaiPaste 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 -
Configure certbot
Terminal window sudo certbot --nginx -
Restart Nginx
Terminal window sudo systemctl restart nginx -
Test deployment by visiting your domain.