Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Set Up a Basic Tinc VPN on a Linux VPS

A practical, two-node Tinc VPN guide for Debian-style Linux VPSs, covering network planning, configuration files, key handling, firewall rules, systemd startup, verification, and troubleshooting.
Length9 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A basic Tinc VPN on a Linux VPS is a small, routed private network made from named nodes. Each node has a network directory, a daemon configuration, a host file containing its public identity and reachable address, private keys that never leave the node, and interface scripts that bring up the VPN address. On a Debian-style system, a two-node network can be running with a private range such as 10.50.0.0/24, one address per node, and the named systemd service tinc@vpn.

The reliable order is: plan addresses and connectivity, install the distribution package, initialize each node, edit tinc.conf and the host files, exchange only public host files, open the transport port, start the network, and verify routes and peer connections. The examples below use a VPS named vps and a peer named laptop.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What you need before configuring Tinc

Prepare a Linux VPS with root or sudo access, a kernel with TUN/TAP support, and permission to add firewall rules. You also need administrative access to every peer that will join the VPN. If the VPS is behind a cloud firewall or security group, that control must allow the same transport port as the operating-system firewall.

  • A unique network name, such as vpn.
  • A unique tinc node name for every machine, such as vps and laptop.
  • A private, non-overlapping VPN range, for example 10.50.0.0/24.
  • A plan for whether the VPN only connects node addresses or also routes a LAN behind one of them.
  • A transport port policy. Tinc listens on port 655 by default unless you configure another port.

Do not choose a VPN range that is already used by a node’s local LAN, a container network, or another tunnel. Overlapping routes make traffic choose the wrong interface and are one of the most common causes of a tunnel that appears connected but cannot reach an intended service.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

How Tinc organizes a VPN

Tinc uses a named network containing named nodes. On Debian-style layouts, the network directory is /etc/tinc/<netname>/. For a network called vpn, the important paths are:

Path or item Purpose
/etc/tinc/vpn/tinc.conf Daemon-wide settings for this node, including its unique Name and peers it should contact with ConnectTo.
/etc/tinc/vpn/hosts/ Host files for this node and its peers. These files carry public identity information, reachable addresses, and advertised subnets.
rsa_key.priv and ed25519_key.priv Private credentials generated for the node. Keep them on that node and protect their permissions.
tinc-up Executable hook that assigns an address to the virtual interface and adds any required route when the tunnel comes up.
tinc-down Optional executable hook for removing the interface address or routes when the tunnel stops.

Tinc normally operates in router mode for routed IP traffic. Its routing table is built from Subnet declarations in host files. A host file’s Address is the real network address or hostname peers use to reach the daemon; its Subnet is the VPN address or network that node serves. The official rule is that a subnet declaration uses a network address and a CIDR prefix, not an arbitrary host address.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the topology and VPN addresses

Simple two-node routed network

For a VPS and one laptop, assign a single VPN address to each node while using the same virtual network mask on the interfaces:

Node Unique name VPN address Advertised subnet
Linux VPS vps 10.50.0.1 10.50.0.1/32
Laptop or second server laptop 10.50.0.2 10.50.0.2/32

The interface scripts can assign 10.50.0.1/24 and 10.50.0.2/24, which puts both virtual interfaces in 10.50.0.0/24. The host files advertise each node’s own address as a /32. This keeps ownership unambiguous while allowing the interface to recognize the VPN range.

Routing a network behind a node

If the VPS or another node serves a private LAN, advertise that LAN’s network address and prefix, such as 192.168.40.0/24, in that node’s host file. Add a route on the virtual interface and enable Linux IP forwarding according to the topology. Every advertised subnet must belong to one deliberate node and must not overlap another declaration.

Install Tinc from the distribution

Use the package supplied by the VPS distribution. On Debian or Ubuntu, the usual package-manager sequence is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
sudo apt update
sudo apt install tinc

Package names, service units, and command details can differ between distribution releases. Confirm the installed package’s documentation if the unit name or directory layout differs from the Debian-style examples in this guide.

Initialize the VPS node

Run the initialization command as root or through sudo:

sudo tinc -n vpn init vps

In the current 1.1-style workflow, this creates the network directory, a starting tinc.conf, hosts/vps, RSA and Ed25519 private keys, public-key material, and an initial tinc-up script. The node name vps must be unique inside the vpn network.

Older 1.0 installations document equivalent key generation with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo tincd -n vpn -K

Use the command that matches the installed version rather than mixing instructions from different releases. After initialization, inspect the directory and keep the private key files readable only by the account that runs the daemon.

Configure the VPS daemon

Edit tinc.conf

Open /etc/tinc/vpn/tinc.conf and set the node name and at least one peer to contact:

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Name = vps
ConnectTo = laptop

Name identifies this daemon in the VPN and must match the host file name hosts/vps. ConnectTo tells the VPS which named peer it should initiate a connection to. In a larger mesh, include the peers that this node should contact directly; nodes can still learn routes to other nodes through the mesh.

Edit the VPS host file

Create or edit /etc/tinc/vpn/hosts/vps:

Address = vpn.example.com
Subnet = 10.50.0.1/32

Replace vpn.example.com with the VPS’s public IP address or DNS name. This is the address peers use on the ordinary network to reach the tinc daemon, not the private VPN address. The Subnet line tells tinc that the VPS serves 10.50.0.1/32. Use a network address and prefix length for every subnet declaration.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Bring up the virtual interface

Edit the executable /etc/tinc/vpn/tinc-up:

#!/bin/sh
ip link set "$INTERFACE" up
ip addr add 10.50.0.1/24 dev "$INTERFACE"

The $INTERFACE variable is supplied by tinc for the network device it creates. Make the hook executable:

sudo chmod a+x /etc/tinc/vpn/tinc-up

If this node routes a LAN, add the route that covers the advertised LAN and enable IP forwarding. Keep the route specific to your topology; adding a broad route can divert unrelated VPS traffic into the tunnel.

Initialize and configure the peer

On the laptop or second server, install the same distribution package and initialize a different node name:

sudo tinc -n vpn init laptop

Its /etc/tinc/vpn/tinc.conf should identify the peer and, when it needs to initiate toward the VPS, include:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Name = laptop
ConnectTo = vps

Configure its host file, /etc/tinc/vpn/hosts/laptop, with the address peers can use to reach it and its owned VPN address:

Address = laptop.example.net
Subnet = 10.50.0.2/32

If the laptop is frequently behind changing NAT, its reachable address and inbound-connect behavior may require a topology-specific configuration. The basic example assumes the VPS can reach the address listed or that the laptop initiates the connection.

Set the peer’s tinc-up to use its own VPN address:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#!/bin/sh
ip link set "$INTERFACE" up
ip addr add 10.50.0.2/24 dev "$INTERFACE"

Then run chmod a+x /etc/tinc/vpn/tinc-up on that node as well.

Exchange host files, never private keys

Each node must have the other node’s public host configuration in its own hosts/ directory. Copy hosts/vps to the peer and hosts/laptop to the VPS using a secure administrative channel, then check that the file names match the Name values.

  • Exchange: host files containing public identity and address information.
  • Do not exchange: rsa_key.priv, ed25519_key.priv, or any other private key file.
  • Keep private keys in the originating node’s network directory and restrict their permissions.

When a node’s public address changes, update its host file on the other nodes. A stale Address can leave keys and names correct while preventing the initial connection.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Open the transport port

Port 655 is tinc’s default when no other port is configured. Permit the selected transport in both layers that protect the VPS:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • The VPS operating-system firewall must allow the required tinc TCP/UDP traffic on the selected port.
  • The hosting provider’s cloud firewall or security group must allow that same port.

If policy requires another port, set an explicit Port value in the relevant tinc configuration and open that port consistently on every firewall. A mismatch between the configured port and the permitted port produces a timeout that can look like a key or host-file failure.

Start the named network with systemd

Debian supplies a global tinc.service and a per-network [email protected] template. Start and enable the vpn instance so it comes up after reboot:

sudo systemctl enable --now tinc@vpn

Check the unit immediately:

sudo systemctl status tinc@vpn
sudo journalctl -u tinc@vpn

Older distributions can package the units differently. If tinc@vpn is not present, list the installed tinc units and follow that release’s service documentation rather than creating an unofficial unit.

Verify the tunnel without disrupting the VPS

  1. Confirm the service is active with systemctl status tinc@vpn.
  2. Confirm that the tinc interface exists and has the expected address, using your system’s normal link and address tools, such as ip link and ip addr.
  3. Check that the daemon reports a connection to the intended peer in the service journal.
  4. From one node, ping the other node’s VPN address, for example 10.50.0.2.
  5. Test the specific allowed service over its VPN address, such as SSH restricted to the VPN range.
  6. Inspect routes on both nodes and confirm that each advertised subnet points through the tinc interface.

Test the VPN address first. Testing a peer’s public address only proves that the ordinary network path works; it does not prove that tinc routing is correct.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot by symptom

Symptom Likely checks Correction
The service fails immediately Syntax, unknown variables, missing files, unsafe permissions, or a non-executable hook. Read journalctl -u tinc@vpn; correct the file, tighten key permissions, and run chmod a+x on interface scripts.
No peer connection or repeated timeout Wrong Address, missing host file, incorrect port, VPS firewall, or cloud security group. Verify the peer’s public address, exchange the correct host file, align the configured port, and permit it in both firewall layers.
Peers connect but VPN ping fails Missing interface address, absent route, wrong node name, or overlapping Subnet declarations. Inspect ip addr and routes, compare each Name with its host-file name, and assign each subnet to exactly one node.
One direction works only The reverse host file is absent or the peer is not advertising its own address. Place both public host files in both hosts/ directories and verify each node’s Subnet.
It worked until reboot The named instance was started but not enabled, or the interface hook is not executable. Run systemctl enable --now tinc@vpn and check the executable bit and journal after reboot.

The tinc command can validate configuration files for unsafe permissions, missing executable bits, unknown variables, and key problems. Use that validation before changing several settings at once; otherwise it becomes difficult to identify which change fixed the fault.

Security and maintenance practices

  • Use unique node names. Reusing a name causes identity and routing ambiguity.
  • Keep private keys on their originating machines and limit who can read them.
  • Advertise only the addresses and networks a node actually serves.
  • Restrict VPS services to the VPN interface or VPN source range where practical, rather than exposing administration ports publicly.
  • Document the VPN range, node names, transport port, and each advertised subnet.
  • After changing a public address, port, key, or subnet, update the affected host files and restart or reload the named network as required by the installed version.
  • Review routes after adding a LAN advertisement; a broad or overlapping route can interrupt ordinary VPS connectivity.

Configuration reference for the two-node example

Node tinc.conf Host-file lines Interface address
VPS Name = vps
ConnectTo = laptop
Address = vpn.example.com
Subnet = 10.50.0.1/32
10.50.0.1/24
Laptop Name = laptop
ConnectTo = vps
Address = laptop.example.net
Subnet = 10.50.0.2/32
10.50.0.2/24

Both nodes also store the other node’s public host file under /etc/tinc/vpn/hosts/. Neither node stores the other node’s private keys.

When this basic design is enough—and when it is not

This setup is appropriate for a small routed VPN: a VPS and a few machines that need private IP reachability or access to selected services. Tinc’s router mode and Subnet-based routing keep the design at layer 3, where each node advertises the networks it serves.

A different design is needed if you require a switched layer-2 network, automatic discovery of many changing peers, or a more centralized operational model. Before expanding, decide whether you want a full mesh or a hub-and-spoke arrangement, how peers behind NAT will initiate connections, how host files and keys will be distributed, and which Linux distribution packages and service units you will maintain. Those choices affect complexity more than the two-node configuration itself.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.