Skip to main content

Deploying

You can deploy your Kottster app using a cloud provider, self-host it on a Node.js server, or run it with a Docker image. Since it's basically a Remix app, you can deploy it anywhere Remix apps are supported.

Before starting the app in production mode, you need to build it first:

npm run start

This compiles the app and stores it in the build directory.

Once built, you can start the app in production mode:

npm run start

Unlike in development mode, the production app is optimized for performance and doesn’t support live changes to the code, pages, or configuration.

Cloud providers

Self-hosting

Method 1. Node.js Server

Requirements

To deploy your Remix app to a server, ensure your server has Node.js installed (version v20 or above).

Running a server

After installing all dependencies, run a Remix server using npm run start. By default, it will run on port 5480, but you can change it by setting up an environmental variable PORT.

Method 2. Docker Image

Create the following Dockerfile in the project directory:

FROM node:20
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 5480
CMD ["npm", "start"]

Build your Docker image

Run docker build -t your-app-name . in your project directory.

Deploy or Run Your Docker Container

You can now deploy this image wherever you want.

To run it locally, use the command:

docker run -d -p 5480:5480 your-app-name

This starts your app in a container, setting necessary environment variables.