-
Notifications
You must be signed in to change notification settings - Fork 0
Deploying the server
- Virtual Machine
- Docker
- DNS entries for (
tunnel.example.com
and*.tunnel.example.com
)
You need the following files to deploy the beaver server.
host: 0.0.0.0 # Address to bind the HTTP server
port: 8080 # Port to bind the HTTP server
domain: tunnel.example.com # Domain on which the server will be running (e.g., tunnel.example.com)
secure: true # Whether the server runs under https
timeout: 3000 # Time to wait before acquiring a WS connection to forward the request (milliseconds)
idletimeout: 60000 # Time to wait before closing the idle connection when there are enough idle connections (milliseconds)
[email protected]
TUNNEL_DOMAIN=tunnel.example.com
DNS_PROVIDER=cloudflare
# DNS specific
CLOUDFLARE_DNS_API_TOKEN=<token>
Check all the supported DNS providers and the required variables here
.env for route53
[email protected]
TUNNEL_DOMAIN=tunnel.example.com
DNS_PROVIDER=cloudflare
# DNS specific
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
Permissions for cloudflare API Token
Permissions for route53 Tokens
Copy the contents from here
Ensure you pin the docker image to the version you want (and do not use the latest
tag).
The server has two volumes.
-
/app/config/
to read the config file. You can map your local config file to/app/config/beaver_server.yaml
-
/app/data/
is where the badger database files exist. You need to map this to a local folder if you don't want to lose data on restart
To access the admin dashboard, you need to create a superuser.
docker compose run beaver createsuperuser
This will take you through the prompt to create the superuser.
Once the above steps are complete, you are ready to start your server.
Run the beaver server.
docker compose up -d
The first run will take some time as traefik needs to issue SSL certificates. After that, the certificates will be stored locally, and subsequent starts will be faster. Once the certificates are issued (track the logs), navigate to https://tunnel.example.com to access the admin dashboard.
Login using the superuser credentials created in the previous step and create a new tunnel user. Once the user is created, copy the secret key and set it in the client config file.
🥳 🥳 You have now successfully setup your tunnel