A full-stack URL shortener application built with Go backend and React frontend.
-
Lightweight app
- Built with Go for great performance and easy deployment
- SQLite database, no external dependencies
-
Advanced URL redirects
- Automatically merges subpaths and query parameters from short URL (higher priority) to the original URL
- Example: Short URL
yourdomain.com/docs/api?version=2redirecting to original URLexample.com/reference?version=1&lang=enwill result inexample.com/reference/api?version=2&lang=en
-
Admin interface with Material-UI
- Create, update, delete, search links
- Link access logs and analysis, including referer, UA and IP analysis
- Batch import / export links
- Customize home page and 404 page
- v 1.1.1 Support redirects with subpath and query
- v 1.1.0 First released version!
Customizable home page |
URL list page |
Access log analysis |
Batch import / export |
We provide prebuilt docker image, available at bytetopia/pikalink
PikaLink supports the following environment variables for configuration:
| Variable | Required | Default | Description |
|---|---|---|---|
DATA_PATH |
No | . (current directory) |
Path where SQLite databases and log files are stored |
GEO_IP_DB_PATH |
No | None | Path to directory containing GeoLite2 MMDB files for IP geolocation analysis |
CORS_ORIGINS |
No | http://localhost:3000 |
Comma-separated list of allowed CORS origins |
For IP geolocation analysis in access logs, you'll need to download GeoLite2 databases:
- Sign up for a free MaxMind GeoLite2 account at https://www.maxmind.com/en/geolite2/signup
- Download
GeoLite2-City.mmdbandGeoLite2-ASN.mmdbfiles - Place them in a directory and set
GEO_IP_DB_PATHto that directory path - Without these files, the app will work but won't provide geographic analysis of visitors
# Using Docker Hub
docker run -d \
--name pikalink \
-p 8080:8080 \
-v pikalink_data:/app/data \
-e DATA_PATH=/app/data \
--restart unless-stopped \
bytetopia/pikalink:latestWith GeoLite2 databases:
# Create directories for data and geolite databases
mkdir -p ./pikalink_data ./geolite2_data
# Download your GeoLite2 databases to ./geolite2_data/
# Run with geolocation support
docker run -d \
--name pikalink \
-p 8080:8080 \
-v ./pikalink_data:/app/data \
-v ./geolite2_data:/app/geolite \
-e DATA_PATH=/app/data \
-e GEO_IP_DB_PATH=/app/geolite \
--restart unless-stopped \
bytetopia/pikalink:latestYou can also use docker-compose for quick deployment. Update the volume path in docker-compose.yml to match your host system:
# Edit docker-compose.yml to set your host path, then:
docker-compose up -dNote
Visit https://your-own-url/admin for the admin portal.
Default credential: user admin, pwd admin123.
Please change the password after you login.
Use the provided build scripts for easy production builds:
Windows (PowerShell):
.\build.ps1Linux/macOS (Bash):
chmod +x build.sh
./build.shThis will create a dist directory with all production files ready for deployment.
dist/
├── pikalink # or pikalink.exe on Windows
├── frontend/ # Built React app
│ ├── index.html
│ ├── static/
│ └── ...
└── pikalink.db # SQLite database (created on first run)
Copy the dist directory to your server and run the executable, application will start on port 8080 by default.
Running with custom configuration:
# Set environment variables before running
export DATA_PATH=/path/to/your/data
export GEO_IP_DB_PATH=/path/to/geolite2/databases
export CORS_ORIGINS="https://yourdomain.com,https://anotherdomain.com"
# Run the application
./pikalink-
Navigate to the backend directory:
cd backend
-
Install dependencies:
go mod tidy
-
Run the server:
go run main.go
The backend will start on http://localhost:8080
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
npm install
-
Start the development server:
npm start
The frontend development server will start on http://localhost:3000/admin/
This project is licensed under the MIT License.



