Modern URL shortener with user management, Redis caching, and admin panel. Built with Go.
- URL shortening with custom short codes
- User authentication and personal dashboards
- Admin panel with user and link management
- Redis caching for fast performance
- Click tracking and statistics
- Catppuccin Mocha theme
- Serbian language UI (You can manually translate by changing
.htmlfiles)
- Start everything:
git clone https://github.com/crnobog69/vid.gitFirst copy docker-compose.yml.example to docker-compose.yml
cp docker-compose.yml.example docker-compose.ymlThen change the environment as in Configuration section.
After that you can start:
docker compose up -dsudo docker compose ud -d-
Access:
- App: http://localhost:13888
- Login:
admin@vid.crnbg.org/changeme
-
Stop:
docker-compose down
sudo docker compose down
-
Start Redis:
docker run -d -p 6379:6379 redis:7-alpine
-
Build and run:
go build -o vid main.go ./vid
-
Access: http://localhost:13888
Copy .env.example and customize:
PORT=13888
DOMAIN=vid.crnbg.org
# Redis (optional)
USE_REDIS=true
REDIS_ADDR=localhost:6379
# Admin user
ADMIN_EMAIL=admin@vid.crnbg.org
ADMIN_PASSWORD=changeme
# Access control
USER_SIGNUP=true # Allow new user registration
REQUIRE_LOGIN=false # Require login to use shortener
ALLOW_ANONYMOUS_CUSTOM_LINKS=true # Allow custom links without loginAlso change in Redis:
command: redis-server --requirepass
test: ["CMD", "redis-cli", "-a",
| Variable | Default | Description |
|---|---|---|
PORT |
13888 |
Server port |
DOMAIN |
vid.crnbg.org |
Your domain |
USE_REDIS |
true |
Enable Redis caching |
REDIS_ADDR |
localhost:6379 |
Redis address |
REDIS_PASSWORD |
`` | Redis password |
ADMIN_EMAIL |
admin@vid.crnbg.org |
Admin email |
ADMIN_PASSWORD |
changeme |
Admin password |
USER_SIGNUP |
true |
Allow user registration |
REQUIRE_LOGIN |
false |
Require login for shortening |
ALLOW_ANONYMOUS_CUSTOM_LINKS |
true |
Allow custom links for anonymous |
SESSION_SECRET |
(required) | Session encryption key |
# Session secret
openssl rand -hex 32
# Redis password
openssl rand -base64 32
# Database password
openssl rand -hex 32- Backend: Go 1.19+
- Database: SQLite
- Cache: Redis 7
- Sessions: gorilla/sessions
- Theme: Catppuccin Mocha
Access at /admin with credentials:
- Default:
admin@vid.crnbg.org/changeme
Features:
- View all links and users
- Delete links and users
- Change user passwords
- Create new users
- Platform statistics
Stop the containers:
sudo docker compose downThen:
git pullAfter that:
sudo docker compose up -d --build