Installation
There are two primary ways to install the FoundryVTT REST API Relay server: using Docker (recommended for ease of use and deployment) or manually.
Recommended: Docker Installation
Using Docker and Docker Compose is the simplest way to get the relay server running.
-
Clone the repository:
git clone https://github.com/JustAnotherIdea/foundryvtt-rest-api-relay.git
cd foundryvtt-rest-api-relay -
Start the server:
docker-compose up -dThis command will pull the latest Docker image and start the relay server in the background. The server will be available at
http://localhost:3010. -
Database Initialization: The default Docker setup uses an SQLite database for persistence, which is stored in the
datadirectory. When you first start the server, a default admin user is created.- Email:
admin@example.com - Password:
admin123
You can log into the web interface to get your API key.
- Email:
-
Stopping the server:
docker-compose down
Using PostgreSQL
If you prefer to use PostgreSQL for your database, you can use the provided docker-compose.postgres.yml file. See the PostgreSQL Setup Guide for more details.
Relay + Foundry + duckDNS
For an in depth guide for a full setup using duckDNS see Relay + App + DNS Example
Manual Installation
If you prefer not to use Docker, you can run the server directly using Node.js.
-
Prerequisites:
- Node.js (v18 or later)
- pnpm package manager (
npm install -g pnpm)
-
Clone the repository:
git clone https://github.com/JustAnotherIdea/foundryvtt-rest-api-relay.git
cd foundryvtt-rest-api-relay -
Install dependencies:
pnpm install -
Run the server:
- For development (with auto-reloading):
pnpm dev - For production:
First, build the project:
Then, start the server using SQLite:
pnpm buildOr with an in-memory database (not recommended for production):pnpm local:sqlitepnpm local
- For development (with auto-reloading):
The server will be running at http://localhost:3010.