Skip to content

Server Configuration

Config File

Default location: same directory as the binary (config.yml) or specified with --config.

yaml
server:
  domain: "tunnel.example.com"   # Your domain
  control_port: 8222             # Port for CLI connections
  http_port: 8223                # Port for HTTP proxy

storage:
  database: "/etc/unne/unne.db"  # SQLite database path

logging:
  file_path: "/var/log/unne/server.log"

admin:
  enabled: true                  # Enable admin panel
  port: 4041                     # Admin panel port
  session_ttl: "24h"             # Admin session duration

Git-Style Config Commands

Read and modify config values without editing YAML manually:

bash
# Get a value
unns config get server.domain
# → tunnel.example.com

# Set a value
unns config set server.domain newtunnel.example.com

# List all values
unns config list
# → server.domain = tunnel.example.com
# → server.control_port = 8222
# → server.http_port = 8223
# → storage.database = /etc/unne/unne.db
# → ...

Custom Config Path

bash
unns --config /path/to/config.yml

Config Reference

KeyTypeDefaultDescription
server.domainstringServer domain for subdomains
server.control_portint8222CLI connection port
server.http_portint8223HTTP proxy port
storage.databasestring/etc/unne/unne.dbSQLite database path
logging.file_pathstringLog file path
admin.enabledbooltrueEnable admin panel
admin.portint4041Admin panel port
admin.session_ttlstring24hAdmin session duration

Released under the MIT License.