Kopia Alternate UI
This project provides a dropin replacement for the original KopiaUI!
Important
Kopia Alternate UI is not affiliated with or endorsed by the Kopia developers.
About The Project
Caution
This project is under active development, even though it might be a while between commits. It should be mostly operational, but usage will determine potential bugs. Please see the feature mapping issue for progress on implementing existing features.
I wanted a cleaner and easier to use UI for Kopia than the offical one. There are also some features I want to implement that is not in the official UI, such as multi server interaction, improved statistics and more.
If this project helped you or you are intere…
Kopia Alternate UI
This project provides a dropin replacement for the original KopiaUI!
Important
Kopia Alternate UI is not affiliated with or endorsed by the Kopia developers.
About The Project
Caution
This project is under active development, even though it might be a while between commits. It should be mostly operational, but usage will determine potential bugs. Please see the feature mapping issue for progress on implementing existing features.
I wanted a cleaner and easier to use UI for Kopia than the offical one. There are also some features I want to implement that is not in the official UI, such as multi server interaction, improved statistics and more.
If this project helped you or you are interested in using it, please consider giving it a ⭐️! It’s the only way I will be able to see the usage of this tool and how much time should be spent improving/finishing it.
Features
- 🎨 Clean UI
- 🇳🇴 Localized (Currently supports English and Norwegain)
- 🖥️ Multi repository server support
Getting Started
Configure
The support for multiple servers must currently be configured manually. We have an issue to have this happen automatically when the container start, and that feature will be implemented later on.
- Create a new json file. For examples we will use
instances.json. This file will contains all the instances you should be able to switch between.
[
{
"id": "primary",
"name": "docker-primary-01",
"default": true
},
{
"id": "secondary",
"name": "docker-secondary-01",
"default": false
}
]
id: Should be unique across all instances. This is the key we will route the Nginx proxy based on.name: The display name used in the dropdown in the UIdefault: Whentrue, will be the default selected instances in the UI
- Use the example nginx.conf as a reference and add new location blocks for your instances (You can remove the example
primaryandsecondaryblocks). During this step you will also need to decide how you want to authenticate aginst the servers. Please see Authenticating to servers for more information.
location /api/[INSTANCE-ID] {
rewrite ^/api/[INSTANCE-ID]/(.*) /api/$1 break;
proxy_pass https://[DOCKER-CONTAINER]:51515;
# --- AUTH OPTION TWO ---
proxy_hide_header WWW-Authenticate;
# --- AUTH OPTION TWO END ---
# --- AUTH OPTION THREE ---
proxy_hide_header WWW-Authenticate;
proxy_set_header Authorization "Basic ${INSTANCE_AUTH}";
proxy_pass_header Authorization;
# --- AUTH OPTION THREE END ---
expires -1;
}
Important
Currently the container is using a Nginx templating feature. This means you will have to re-create the container for changes to apply. An update will come later that will ensure you can only restart the container for changes to take effect.
- Mount the
instances.jsonfile and your customnginx.conffile to the container
See the releases page for the latest version
services:
kopiaaltui:
conatiner_name: kopia-ui
image: ghcr.io/joachimdalen/kopia-alternate-ui:v0.2
ports:
- 8080:80
volumes:
- ../docker/instances.json:/app/config/instances.json:ro
- ../docker/nginx.conf:/etc/nginx/templates/default.conf.template:ro
Authenticating to servers
Authentication is supported using three different methods
Option 1: Passthrough
Passthrough authentication uses the regular authentication popup that comes with KopiaUI. This can lead to you having to authenticate multiple times and often.
Option 2: Integrated authentication
This application offers a simple credential management feature that you can use at your own risk. When a server responds with a 401 status code - a login window will appear.
Caution
These credentials are stored in the browser session under the key kopia-alt-ui-auth in clear text. When switching between instances we lookup credentials in this storage and apply it to the request.
NOTE: Remember to remove the WWW-Authenticate in your Nginx configuration for this feature to work properly.
Option 3: Nginx authentication
The third option is to allow Nginx to handle the authentication. This means that all requests will be authenticated by default and anyone with access to UI will have the same access as the user.
To add this option:
base64 encode your username and password
echo -n "USERNAME:PASSWORD" | base64 # Outputs: VVNFUk5BTUU6UEFTU1dPUkQ=
Pass the encoded value to your container 1.
Use the username and password in your nginx.conf file like shown in the example configuration above
Development
The development setup requires a few instances of Kopia to run. These can be configured using the docker-compose.yml file.
- Uncomment the
--tls-generate-certargument - Run
docker compose up - Copy the value of
SERVER CERT SHA256that is outputted fromkopia-primary, you will need this later - Comment out the
--tls-generate-certargument again as Kopia will fail to start later if this is defined - Execute the command
kopia server user add root@kopia-secondaryin thekopia-primarycontainer. Make a note of the password you set for this user. - Start the application using
npm dev - Login using
USER_ONEandPASSWORD_ONEwhen prompted for credentials forrepo-docker-prod-01 / primary - Add a new
filesystemrepo targeting/repositoryand use the passwordPASSWORD_ONE - Switch to the
repo-docker-prod-02 / slaveinstance and login using the credentialsUSER_TWOandPASSWORD_TWO - Add a new
Kopia Repository Serverrepository.
- Use the url
https://kopia-primary:51515and theSERVER CERT SHA256value from step 3. - Use the password for the user created in step 5
You can now start using the application and configure backups as needed.
License
Distributed under the Apache License 2.0 License. See LICENSE for more information.