Docker Install (experimental)
You can run the server part of Tenfingers in a simple docker container. This is easy and straightforward with only one caveat.
The problem with running the server in a docker is that it runs as a root user inside the container, and shared data is thus owned by the docker instance.
You can use chown to take ownership of files, but when manipulating the database, you will need superuser rights, or acquite those rights from the dockers root account. If you are not confident in doing so, you can run the docker with the local users permissions instead to avoid those problems:
Set up and run the docker with the local user
-
You must forward port 46000 to your PC like in the other types of install
-
Make a folder on your PC, for example on the desktop, then open it.
-
In that folder, make 4 folders:
mkdir db
mkdir data_shared
mkdir data_owned
mkdir translation_files
- Make a file named docker-compose.yml
Paste this into it:
services:
tenfingers:
image: kingvalmond/tenfingers_server:1
hostname: tenfingers
# Use this if you do not want to get files owned by root (& in root group)
# run id -u and id -g to find the UID and GID
# Note, you will have to manually create the folders db, data_shared, data_owned and translation_files
# in the same folder as this file
user: "1000:1000"
ports: # The first port is the one exposed in your system, you need to forward this from your public IP address (do not change the second 46000 port)
- 46000:46000
volumes: # LOCAL_MACHINE_FOLDER:DOCKER_FOLDER
# The folders on the local machine will be created if not existsing (create them if you want user to own them)
- ./db:/tenfingers/db
- ./data_owned:/tenfingers/data_owned
- ./translation_files:/tenfingers/translation_files
- ./data_shared:/tenfingers/data_shared
Run the command id:
> id
uid=1000(username) gid=1000(username),4(adm),24(cdrom),27(sudo),30(dip),46(plu...
It shows your user id and group id for users, get yours (here it is 'username') and update the numbers:
user: "1000:1000"
in the docker-compose.yml file and save.
Note: the first number is the user id (uid), the second is the group id (gid).
- Start the server:
docker compose up
Congratulations, the server is now up and running!
Part 2, the user interface
Now that the server part is up and running, you need to interact with it, or it will not be very useful at all.
- Download the python files
git clone https://codeberg.org/Valmond/Tenfingers.git
mv ./Tenfingers/tenfingers/*.py ./
rm -rf ./Tenfingers
Note: you can use this again to update the python files if a new version is out.
- Bootstrap the server node (so it can connect to the node swarm)
Now you can download the test link from the official website or just get it directly on the command line:
curl https://www.mindoki.com/10f/testlink.10f -o testlink.10f
- Use it:
python3 10f.py testlink
It should download and produce a file:
testlink.txt
And the /db/tenfingers.db should now have a node address in it (you need a SQLite reader to visualise the /db/tenfingers.db file).
There you are, all set up and running, bravo!
Now you can add files, make links and share content but beware, a key difference with the docker install is that you do not have access to the '10f' command everywhere on your machine, so to use commands you must be in the folder with the python files and precede commands with 'python3 10f.py'.
So when you see, for example:
10f -i my_stuff_to_share image.jpg
in the documentation, you will have to do:
python3 10f.py -i my_stuff_to_share image.jpg
Note: the key_* files in /db/ are what makes your node recognisable and unique, you would want to backup them. To restore, just put them in the /db/ folder before you run the server image.