We analyze the entanglement properties of spins (qubits) close to the boundary of spin chains in the vicinity of a quantum critical point and show that the concurrence at the boundary is significantly different from the one of bulk spins. We also discuss the von Neumann entropy of dissipative environments in the vicinity of a (boundary) critical point, such as two Ising-coupled Kondo-impurities or the dissipative two-level system. Our results indicate that the entanglement (concurrence and/or von Neumann entropy) changes abruptly at the point where coherent quantum oscillations cease to exist. The phase transition modifies significantly less the entanglement if no symmetry breaking field is applied and we argue that this might be a general property of the entanglement of dissipative systems. We finally analyze the entanglement of an harmonic chain between the two ends as function of the system size.