Get Started
Install
Get Started
Install
Start installing Blinko under 5 minutes
Prerequisites
Docker is required to run Blinko.Visit Docker to install Docker.
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.
curl -o install.sh https://raw.githubusercontent.com/blinko-space/blinko/main/install.sh && bash install.sh
Docker Installation
Must mount the data volume of postgres or your data will be lost
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:
networks:
blinko-network:
driver: bridge
services:
blinko-website:
image: blinkospace/blinko:latest
container_name: blinko-website
environment:
NODE_ENV: production
# NEXTAUTH_URL: http://localhost:1111
# NEXT_PUBLIC_BASE_URL: http://localhost:1111
NEXTAUTH_SECRET: my_ultra_secure_nextauth_secret
DATABASE_URL: postgresql://postgres:mysecretpassword@postgres:5432/postgres
depends_on:
postgres:
condition: service_healthy
# Make sure you have enough permissions.
# volumes:
# - ~/your-name/.blinko:/app/.blinko
restart: always
logging:
options:
max-size: "10m"
max-file: "3"
ports:
- 1111:1111
healthcheck:
test: ["CMD", "curl", "-f", "http://blinko-website:1111/"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
networks:
- blinko-network
postgres:
image: postgres:14
container_name: blinko-postgres
restart: always
ports:
- 5435:5432
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: mysecretpassword
TZ: Asia/Shanghai
# Persisting container data
# Make sure you have enough permissions.
# volumes:
# - ~/your-name/.db:/var/lib/postgresql/data
healthcheck:
test:
["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"]
interval: 5s
timeout: 10s
retries: 5
networks:
- blinko-network
docker-compose -f docker-compose.yml up -d