Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing config not imported #336

Open
mariusz-kraj opened this issue Dec 17, 2024 · 1 comment
Open

Existing config not imported #336

mariusz-kraj opened this issue Dec 17, 2024 · 1 comment

Comments

@mariusz-kraj
Copy link

mariusz-kraj commented Dec 17, 2024

Hi,

I installed the latest version with:
config.yml:

core:
  admin_user: admin
  admin_password: (paas)

advanced:
  log_level: trace
  log_pretty: true

web:
  external_url: http://localhost:8888
  request_logging: true

docker-compose.yml:

version: '3.6'
services:
  wg-portal:
    image: wgportal/wg-portal:latest
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
        #    network_mode: "host"
    ports:
      - "8888:8888"
    volumes:
      - /etc/wireguard:/etc/wireguard
      - ./data:/app/data
      - ./config:/app/config

Logs:

wg-portal_1  | time="2024-12-17T21:20:47Z" level=info msg="Starting WireGuard Portal V2..."
wg-portal_1  | time="2024-12-17T21:20:47Z" level=info msg="WireGuard Portal version: master-877cdae"
wg-portal_1  | DEBU[0000] WireGuard Portal Features:
wg-portal_1  | DEBU[0000]   - EditableKeys: false
wg-portal_1  | DEBU[0000]   - CreateDefaultPeerOnCreation: false
wg-portal_1  | DEBU[0000]   - SelfProvisioningAllowed: false
wg-portal_1  | DEBU[0000]   - ImportExisting: true
wg-portal_1  | DEBU[0000]   - RestoreState: true
wg-portal_1  | DEBU[0000]   - UseIpV6: true
wg-portal_1  | DEBU[0000]   - CollectInterfaceData: true
wg-portal_1  | DEBU[0000]   - CollectPeerData: true
wg-portal_1  | DEBU[0000]   - CollectAuditData: true
wg-portal_1  | DEBU[0000] WireGuard Portal Settings:
wg-portal_1  | DEBU[0000]   - ConfigStoragePath:
wg-portal_1  | DEBU[0000]   - ExternalUrl: http://localhost:8888
wg-portal_1  | DEBU[0000] WireGuard Portal Authentication:
wg-portal_1  | DEBU[0000]   - OIDC Providers: 0
wg-portal_1  | DEBU[0000]   - OAuth Providers: 0
wg-portal_1  | DEBU[0000]   - Ldap Providers: 0
wg-portal_1  | TRAC[0000] sysstat migration: <nil>
wg-portal_1  | TRAC[0000] user migration: <nil>
wg-portal_1  | TRAC[0000] interface migration: <nil>
wg-portal_1  | TRAC[0000] peer migration: <nil>
wg-portal_1  | TRAC[0000] peer status migration: <nil>
wg-portal_1  | TRAC[0000] interface status migration: <nil>
wg-portal_1  | TRAC[0000] audit data migration: <nil>
wg-portal_1  | TRAC[0000] skipping default user creation - admin user already exists
wg-portal_1  | INFO[0000] interface state restored
wg-portal_1  | TRAC[0000] started ping checks
wg-portal_1  | TRAC[0000] started interface data fetcher
wg-portal_1  | TRAC[0000] started peer data fetcher
wg-portal_1  | INFO[0000] started web service on :8888
wg-portal_1  | INFO[0000] started metrics service on :8787

wg0.conf:

[Interface]
Address = 10.0.21.111/32
ListenPort = 54606
PrivateKey = (...)

[Peer]
# Name = Peer1
PublicKey = (...)
AllowedIPs = 10.0.21.1/32, 192.168.21.0/24
Endpoint = (...)
PersistentKeepalive = 150

[Peer]
# Name = Peer2
PublicKey = (...)
AllowedIPs = 10.0.21.112/32, 192.168.74.0/24
PersistentKeepalive = 150

But no interface is visible in the UI:
CleanShot 2024-12-17 at 22 41 02@2x

@bonddim
Copy link
Collaborator

bonddim commented Dec 18, 2024

WgPortal imports existing interfaces, not config files.

Try to use host networking in your compose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants