Deploy on Railway Directly

Railway uses Docker containers to deploy Blinko. when you click the “Deploy on Railway” button, Railway will:

  1. automatically setup the PostgreSQL database service
  2. configure the necessary environment variables
  3. deploy the latest version of the Blinko Docker image

Prerequisites

Security Warning: You must change the NEXTAUTH_SECRET value in all installation methods below. Using the default value poses a significant security risk. Generate a strong random string for production use.

Example of generating a secure secret:

openssl rand -base64 32
# or
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"

Bash Script Installation

The install.sh use docker run to deploy Blinko.If you feel it’s not safe, you can use the other method below.

Docker Installation

  1. Must mount the data volume of postgres or your data will be lost
  2. Replace NEXTAUTH_SECRET=my_ultra_secure_nextauth_secret with your own secure secret key
docker network create blinko-network
docker run -d \
--name blinko-postgres \
--network blinko-network \
-v <your-path>:/var/lib/postgresql/data \
-p 5435:5432 \
-e POSTGRES_DB=postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=mysecretpassword \
-e TZ=Asia/Shanghai \
--restart always \
postgres:14
docker run -d \
--name blinko-website \
--network blinko-network \
-v <your-path>:/app/.blinko \
-p 1111:1111 \
-e NODE_ENV=production \
-e NEXTAUTH_URL=http://localhost:1111 \
-e NEXT_PUBLIC_BASE_URL=http://localhost:1111 \
-e NEXTAUTH_SECRET=my_ultra_secure_nextauth_secret \
-e DATABASE_URL=postgresql://postgres:mysecretpassword@blinko-postgres:5432/postgres \
--restart always \
blinkospace/blinko:latest

Docker Compose Installation

To deploy Blinko using docker compose, create a docker-compose.yml file with the following configuration: