Skip to content
프로젝트

소개

Redirect domains using DNS only

시스템 및 인프라

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

All Contributors Backers on Open Collective Sponsors on Open Collective

redirect.center

Redirect domains using DNS only.

Requirements

How do I install?

cd /opt
git clone https://github.com/udleinati/redirect.center.git
cd redirect.center

Environment Variables

Look at the file ./src/config.ts to see all available environment variables. You must set at least these variables:

export FQDN=redirect.center
export ENTRY_IP=54.84.55.102
export LISTEN_PORT=80
Variable Default Description
FQDN localhost Service domain (used to detect homepage vs redirect)
ENTRY_IP 127.0.0.1 IP users must set in their A record
LISTEN_PORT 3000 Server port
LISTEN_IP 0.0.0.0 Server bind address
ENVIRONMENT dev1 Environment name
PROJECT_NAME redirect.center Displayed in UI and meta tags
LOGGER_LEVEL debug Log level

How do I run in development?

deno task dev

How do I run tests?

deno task test

How do I run in production?

Option 1: systemd (recommended)

This runs the service in the background, auto-restarts on crash, and starts on boot. You can SSH in, start it, and disconnect without issues.

# 1. Copy the service file to systemd
sudo cp redirect-center.service /etc/systemd/system/

# 2. Edit the service file to match your environment
#    - WorkingDirectory: path to your project (default: /opt/redirect-center)
#    - User: the system user to run as (default: www-data)
#    - ExecStart: path to deno binary (check with: which deno)
#    In the editor, add:
#      [Service]
#        Environment=FQDN=redirect.center
#        Environment=ENTRY_IP=54.84.55.102
#        Environment=LISTEN_PORT=80
sudo nano /etc/systemd/system/redirect-center.service

# 4. Reload systemd, enable on boot, and start
sudo systemctl daemon-reload
sudo systemctl enable redirect-center
sudo systemctl start redirect-center

Common systemd commands:

sudo systemctl status redirect-center    # Check if running
sudo systemctl restart redirect-center   # Restart
sudo systemctl stop redirect-center      # Stop
journalctl -u redirect-center -f         # View logs in real-time
journalctl -u redirect-center --since today  # Today's logs

Log rotation (recommended):

To limit logs to max 1GB and 7 days, edit /etc/systemd/journald.conf:

sudo nano /etc/systemd/journald.conf

Set or uncomment these lines:

[Journal]
SystemMaxUse=1G
MaxRetentionSec=7day

Then restart journald:

sudo systemctl restart systemd-journald

To manually clean old logs:

sudo journalctl --vacuum-size=1G --vacuum-time=7d

Option 2: Direct (foreground)

deno task start

DNS Setup

Create a wildcard entry in your DNS:

*.redirect.center CNAME redirect.center

Contributors

This project exists thanks to all the people who contribute. [Contribute].


Udlei Nati

💻 📖 🤔 🚇

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

관련 프로젝트 살펴보기

불러오는 중…